VOGONS


First post, by Nikoh

User metadata
Rank Newbie
Rank
Newbie

Hello, i have this batch to mount isos:

SHSUCDHD /F:C:\GAMES\SOME.ISO
SHSUCDX /D:SHSU-CDH /I

and this to umount:

SHSUCDX /D:SHSUCDH /U
SHSUCDHD /U

I would like to create a script that works on many PCs, all those that have a "normal" configuration...
SHSUCDX use the first available letter which generally is D, E or F printing the result on the screen but i can't know it before, because every pc is different ...
I looking for command/syntax to grab SHSUCDX returned (mounted) letter or unit, then use that letter in the next script to start the game like SHSUCDX set drive=F environment variable so i can drive:\startgame.exe

Discord server for italian retrogamers that love CRT
https://discord.gg/x7HQqDWmvw

Reply 3 of 7, by Nikoh

User metadata
Rank Newbie
Rank
Newbie
maxtherabbit wrote on 2022-05-17, 16:19:

I don't know, there is a switch for SHSUCDX to assign a specific letter though

it exists but it is the opposite of what I want to do

Discord server for italian retrogamers that love CRT
https://discord.gg/x7HQqDWmvw

Reply 4 of 7, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
Nikoh wrote on 2022-05-17, 16:21:
maxtherabbit wrote on 2022-05-17, 16:19:

I don't know, there is a switch for SHSUCDX to assign a specific letter though

it exists but it is the opposite of what I want to do

Not really. If you were to programmatically derive the next available letter, and then pass it to SHSUCDX, then you would know exactly what letter was assigned. You would already have your environment var for the rest of the script

Reply 6 of 7, by Nikoh

User metadata
Rank Newbie
Rank
Newbie
maxtherabbit wrote on 2022-05-17, 16:39:
Nikoh wrote on 2022-05-17, 16:21:
maxtherabbit wrote on 2022-05-17, 16:19:

I don't know, there is a switch for SHSUCDX to assign a specific letter though

it exists but it is the opposite of what I want to do

Not really. If you were to programmatically derive the next available letter, and then pass it to SHSUCDX, then you would know exactly what letter was assigned. You would already have your environment var for the rest of the script

i can't find a way to do this in dos, would you know how to do it?

Discord server for italian retrogamers that love CRT
https://discord.gg/x7HQqDWmvw

Reply 7 of 7, by davidrg

User metadata
Rank Member
Rank
Member

Easiest option is just to pick a drive letter that will always be free on every machine you use - X: or something. Then you don't have to mess around with finding the first available drive letter and communicating to the user what that letter happens to be.

If you really want a way of finding the first available drive letter I'm not sure you can do it just with a batch file. The NetWare DOS boot disk I use uses a program, dready.com, to inspect each drive letter to see if there is anything there. The utility is in nwdsk340.exe\NWDSK\CABS\UTILZ.CAB\bin along with a batch file, drd.bat, which inspects each drive letter outputting the results.