Ed Bronson wrote:

> Thanks, that does help. I accomplished step 2 by using the DOS subst
> command; I didn't have map.exe.

My bad, I meant to write subst.exe - that's what I'm using.

> But, how do I search for a unique filename or vol label?
> How do I grab that Drive letter and place it into a variable?

The filename thing is an old DOS trick, here it is, mind folded lines. 
Save the following as AUTORUN.BAT in your USB root folder, and run 
AUTORUN.BAT to set CMD/DOS variable RootDrv to the first (in reverse 
alphabetical order) drive that has \AUTORUN.BAT in it.

@echo off
rem Full path to this file without drive letter, example \AUTORUN.BAT
set ThisFile=\AUTORUN.BAT
rem Drive letter (and colon) we wish to use if possible, example z:
rem   WishDrv can be used to hardwire paths inside ini files, for 
example,
rem   total commander's. There is no guarantee that WishDrv will be
rem   available, so don't rely on it for critical functions. To be safe
rem   you should always assume that this tool environment is running off
rem   of a dynamically allocated drive letter RootDrv (initialized 
below).
set WishDrv=v:

rem Find out drive ThisFile is running from
for %%v in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist 
%%v:%ThisFile% set RootDrv=%%v:

if NOT "%RootDrv%"=="" goto LBL1
echo ERROR: can't find this file "%ThisFile%" on any drive. Quit.
break
:LBL1

rem Hopefully we can preempt drive WishDrv
subst %WishDrv% %RootDrv%\
if exist %WishDrv%%ThisFile% set RootDrv=%WishDrv%
echo ********************************************
echo * ROOT DRIVE SET TO %RootDrv% - WISH DRIVE WAS %WishDrv% *
echo ********************************************







------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h83slpa/M=362131.6882499.7825260.1510227/D=groups/S=1706030409:TM/Y=YAHOO/EXP=1122996523/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to