[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Portable NB batch file
Here's Robert's .bat file to launch a portable NB flash-drive installation.
--------------
@echo off
::LAUNCHNB.BAT for Portable Nota Bene RJHolmgren 4 Dec 2004
if exist Z:\ goto substerr
::SET variable NBFOLDER below to the "\PATH" where portable NB is located
SET NBFOLDER=\NB8GA
FOR %%a 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
%%a:%NBFOLDER%\SWSYS.DLL goto setdrv
:err
echo NotaBene portable installation not found
goto end
:substerr
echo Drive Z: already in use! Aborting...
goto end
:setdrv
FOR %%a 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
%%a:%NBFOLDER%\SWSYS.DLL SUBST Z: %%a:%NBFOLDER%
Z:
start /min Z:\NOTABENE.EXE
:end
--------------
When I run it from a cmd prompt [F:\ launchnb] on a host machine, I
get "the syntax of the command is not correct." The first obvious
place to check was to make sure I'd substituted the right variable
for SET NBFOLDER= , which I did. Then it occurred to me, that I might
have to map the Z: drive on the host machine first, since *Z:* at the
cmd prompt turned up "The system cannot find the drive specified." If
that's the case, I'm not sure how to proceed.
Michael Norman