start /wait - Not working?

R

RDI

I've got an executable that I'm running from my login script. The
executable requires a mapped drive (can't use a UNC path). We don't want to
leave this drive permanently mapped. So I tried to use the "Start" command
to run the executable and wait 'til it finished. The executable finishes,
the loginscript needs to Unmap the drive.

rem When the Net Use command tries to unmap the drive
rem I get a message that files from the o: drive are still being used.
rem Why is the script regaining control BEFORE the executable
rem finishes?
start o:\SCAN\HSLAUNCH.EXE O:\SCAN /wait
net use /delete o:


The following comes from the help:

<<When executing an application that is a 32-bit GUI application, CMD.EXE
does not wait for the application to terminate before returning to
the command prompt. This new behavior does NOT occur if executing
within a command script.
When it says "script" wouldn't that be a batch file?
 
R

RDI

I tried that FIRST. But I'll try again.
Ritchie said:
You're passing '/wait' to hslaunch.exe

As per START's documentation use:-

start /wait o:\SCAN\HSLAUNCH.EXE O:\SCAN
 
R

RDI

There are open files and/or incomplete directory searches pending on the
connection to o:.

Is it OK to continue disconnecting and force them closed? (Y/N) [N]:

The ONLY program that uses the O: drive is this HSLauch.exe. Therefore it
is obviously still using those files in one way or another.
 
R

RDI

Thanks for the assist. That seemed to work.
Ritchie said:
There are open files and/or incomplete directory searches pending on the
connection to o:.

Is it OK to continue disconnecting and force them closed? (Y/N) [N]:

Try:-

net use o: /d /y
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top