Re: Running a DOS command at startup

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hey thanks, this worked! I also had to add another line in the batch file
which specified a path to the working directory. Otherwise, some dll's
wouldn't load. Thanks again!!!

"Dave Patrick" wrote:

> Add a couple of lines to your batch. The second line will allow 5 seconds or
> so for subst before starting the program.
> subst z: d:\
> ping.exe -n 6 127.0.0.1 >nul
> start "" "Z:\Program Files\myprog.exe"
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "thadpole" wrote:
> | Hello,
> | I want to run the following dos command: subst z: d:\ when my Server
> 2003
> | starts up because I have a program that can only read and write to the
> "z:"
> | drive. It needs to be available at all times, no matter which user is
> logged
> | in. I tried putting it into a batch file, then running the batch file in
> the
> | "startup" menu for all users. This works fine, except I also want the
> users
> | to be able to automatically start this particular program using the RDP
> | client when they login to Terminal Services. The trouble is that the
> "subst
> | z: d:\" command doesn't run before the program starts. Hence, the program
> | doesn't work. If the user logs in normally using the RDP client, then
> runs
> | the program manually, it works fine.
> | What can I do?
> | Thanks!!!
>
>
>
.



Relevant Pages

  • Re: Tweak MCE Watched Folders for Recorded TV
    ... use the "subst" command in it to create new drives on your slave pc for the ... Place the batch file in the startup folder and hay presto!! ... I think Tweak MCE only works with local drives, ...
    (microsoft.public.windows.mediacenter)
  • Re: Running a DOS command at startup
    ... Add a couple of lines to your batch. ... so for subst before starting the program. ... I tried putting it into a batch file, then running the batch file in ... If the user logs in normally using the RDP client, ...
    (microsoft.public.windows.server.setup)
  • Re: reconnect at startup
    ... "Remap on logon" box, but the mapping does not survive a restart. ... I have made up a batch file with the command line ... I need some way to invoke the batch file when XP ... Once you create the subst drive, you should not have to do so again. ...
    (microsoft.public.windowsxp.network_web)
  • Running a DOS command at startup
    ... I want to run the following dos command: subst z: d:\ when my Server 2003 ... I tried putting it into a batch file, then running the batch file in the ... The trouble is that the "subst ... If the user logs in normally using the RDP client, ...
    (microsoft.public.windows.server.setup)
  • Re: autoexec.bat file
    ... When Windows is started the autoexec.bat file is parsed for path variables only, the option to parse the file can be changed by way of a registry edit. ... To subst your folder/drive just create a batch file containing your subst command and put the batch file or a shortcut to the file in your startup folder. ...
    (microsoft.public.windowsxp.basics)