Run autoexec.bat on XP Startup?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Even though I am new to XP I am not new to Windows. But I can't find
information (XP Help or Internet) anywhere that tells me how to make
"autoexec.bat" run on Windows XP Pro startup.

Maybe I need to use "autoexec.nt"?

I just want to execute the MSDOS command shown below:

subst s: c:\

I put a shortcut to the autoexec.bat file in my logon user's startup
folder. I see an MSDOS window open and close very fast but the
"subst" command does not get executed or does not work because
after startup there is no "S:" disk.

Anyone know what I'am doing wrong? Seems like a simple thing
to do but it just won't work for me.

Any help will be greatly appreciated. Thanks.

Len
 
Hi

XP doesn't use autoexec.bat. As you have suggested, try using autoexec.nt
instead. Have a look, from a command prompt, for the switches available for
'subst' when using XP.
 
I did try using the "autoexec.nt" file but it did not work either.
I did the same thing as with "autoexec.bat" - I inserted the
MSDOS command "subst s: c:\" and added a shortcut to the
"autoexec.nt" file in my logon user's startup folder.

Any other ideas? More feedback would be great for this seemingly
simple task. Thanks.

Len
 
Autoexec.bat is read at user logon (not system startup) and only environmental commands are processed. It must be turned on. Autoexec.nt is run whenever a Dos or Win 3.1 program is started (although as standard the second program that runs uses the first programs settings).

In short you can's subst from Autoexec.
 
Hi,

Thanks for the many replies. I am going to setup a logon script as has been
suggested. This I believe will work. The only item I am not certain about
is what was meant by "environmental commands are processed ... It must
be turned on.". How do I turn the environmental commands On?

Thanks very much for the great feedback.

Len
 
It's on unless your turn it off. Commands that affect the environment are all that are processed. Prohrams aren't. Internal commands (except the environmnental) aren't. This is commands like Path & Set.
 
If I understand correct then you cannot run any MSDOS commands
in "autoexec.bat" at logon time. The only commands that could be
used would be Environmental commands.

Well, is there any way to execute the one MSDOS command "subst s: c:\"
at user logon time or at startup? I guess I am asking to be spoon feed
here since I can't make it work with anyone's suggestions or my own
tests.

If someone knows how to do this (above) then I would greatly appreciate
it if you just show me by writing the procedure or whatever has to be done.

This would be like salvation to make this work. I would be indebted.

Thanks very mush.

Len
 
When something works, especially when it was a simple solution, the
solution's author deserves accolades. I did the following as suggested:

entered the 1 line command shown below in a file named "vdiskofc.bat"

subst s: c:\

I then made a shortcut to "vdiskofc.bat" and placed the shortcut in my
logon user's "Startup" folder.

Magic!! It works!!

Thanks you all for the many suggestions provided to me. Special thanks to
David. This shows how a Technical User's Community can benefit many.

Thanks again.

Len
 
You don't need the bat, Just put it directly into the shortcut
subst s: c:\

Then set the properties to run minimised so you don't get the flashing black screen.
 
Back
Top