Best way to use SUBST command?

J

JoeSpareBedroom

I need to designate one folder (in root dir) as P: drive using the SUBST
command. It does NOT have to be available to all 3 users on this machine,
although it would not matter if it ended up working that way. In my root
dir, I see empty CONFIG.SYS & AUTOEXEC.BAT files (XP Pro machine). Should
the command work in one of those?
 
B

Bob I

make a bat file containing the SUBST command and parameters, drag and
drop a shortcut to it into the Start, Programs, Startup folder for
anyone that needs it.
 
J

JoeSpareBedroom

Any reason NOT to use AUTOEXEC.BAT for this, if I don't mind the P: drive
being available to all users?
 
B

Bob I

Here is a couple reasons
1. The autoexec.bat file isn't used by XP.
2. If you want every one to have it, D&D the shortcut to the "All Users"
Startup folder instead of the individual one.
 
D

David H. Lipman

From: "JoeSpareBedroom" <[email protected]>

| Any reason NOT to use AUTOEXEC.BAT for this, if I don't mind the P: drive
| being available to all users?
|

AUTOEXEC.BAT is NOT interpreted as it was in Win9x/ME.

I use the SUBST command and place the assignment in the Registry RUN locale...

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"ENGINE"="subst f: C:\\Program Files\\Common Files\\Network Associates\\Engine"

The above will work for ALL users.
To work for a particular user you can use the K\HKCU Regustry Run locale...

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"ENGINE"="subst f: C:\\Program Files\\Common Files\\Network Associates\\Engine"

You can also create a BAT or CMD file and create a shortcut in...
"C:\Documents and Settings\All Users\Start Menu\Programs\Startup"

Again this will work for all users.

To work for a particular user you can also create a BAT or CMD file and create a shortcut
in...
"C:\Documents and Settings\<account profile>\Start Menu\Programs\Startup"

Where <account profile> is the name of the user login name.
 
J

JoeSpareBedroom

JoeSpareBedroom said:
I need to designate one folder (in root dir) as P: drive using the SUBST
command. It does NOT have to be available to all 3 users on this machine,
although it would not matter if it ended up working that way. In my root
dir, I see empty CONFIG.SYS & AUTOEXEC.BAT files (XP Pro machine). Should
the command work in one of those?


Thank you all for your suggestions. Since all are valid, I'm going to use a
different technique for each day of the week.
 
H

HeyBub

JoeSpareBedroom said:
Thank you all for your suggestions. Since all are valid, I'm going to
use a different technique for each day of the week.

You could probably configure a batch file for that. I think it would be more
interesting if the batch file picked today's technique randomly.
 
J

JoeSpareBedroom

HeyBub said:
You could probably configure a batch file for that. I think it would be
more interesting if the batch file picked today's technique randomly.

.....based on what I ate for dinner. :)

IF
ISSTEAK()
THEN
AUTOEXEC PER USER
ELSE
AUTOEXEC PER MACHINE
ENDIF()

:)
 

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