reconnect at startup

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

Guest

I have an application that requires a drive on the computer be mapped to a
drive letter on the same computer. I go through the map drill, checking the
"Remap on logon" box, but the mapping does not survive a restart.

I have made up a batch file with the command line
NET USE X: \\ALAN-DESKTOP\ACSNET /PERSISTENT:YES
which does the job when run from a command prompt but I haven't been able to
find a spot to call it from on startup or restart. Any suggestions?
 
I have an application that requires a drive on the computer be mapped to a
drive letter on the same computer. I go through the map drill, checking the
"Remap on logon" box, but the mapping does not survive a restart.

I have made up a batch file with the command line
NET USE X: \\ALAN-DESKTOP\ACSNET /PERSISTENT:YES
which does the job when run from a command prompt but I haven't been able to
find a spot to call it from on startup or restart. Any suggestions?

Try "subst", instead of "net use".
<http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/subst.mspx?mfr=true>
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/subst.mspx?mfr=true
 
Chuck,
Thanks for the suggestion, "subst" worked as well as "net use" but again,
only from the command line. I need some way to invoke the batch file when XP
starts.

Once you create the subst drive, you should not have to do so again. But the
same applies, for a mapped drive, when created with "/PERSISTENT:YES".

So, should you feel the need, you can certainly create a batch file:
subst @: /d
subst @: %:\path

Where "@" and "%" are drive letters, and "path" is the path to the folder on
drive %:. See the above linked article.

Having created a working .cmd file, you can put a shortcut to the file into
[HKLM \ ... Run], and it will run at logon. Or are you thinking that it needs
to be run BEFORE logon? If so, you will need to create a service. You can do
this using SC.exe.
<http://support.microsoft.com/?kbid=251192>
http://support.microsoft.com/?kbid=251192
 
Chuck said:
Chuck,
Thanks for the suggestion, "subst" worked as well as "net use" but again,
only from the command line. I need some way to invoke the batch file when XP
starts.

Once you create the subst drive, you should not have to do so again. But the
same applies, for a mapped drive, when created with "/PERSISTENT:YES".

So, should you feel the need, you can certainly create a batch file:
subst @: /d
subst @: %:\path

Where "@" and "%" are drive letters, and "path" is the path to the folder on
drive %:. See the above linked article.

Having created a working .cmd file, you can put a shortcut to the file into
[HKLM \ ... Run], and it will run at logon. Or are you thinking that it needs
to be run BEFORE logon? If so, you will need to create a service. You can do
this using SC.exe.
<http://support.microsoft.com/?kbid=251192>
http://support.microsoft.com/?kbid=251192
Chuck, I stuck the .bat file with the subst command in the doc&set\all
users\ programs\startup folder and it seems to be working OK. At least for
new. Thanks for the lead.
Alan
 
Chuck said:
:

On Mon, 17 Apr 2006 15:11:02 -0700, telegrapher

I have an application that requires a drive on the computer be mapped to a
drive letter on the same computer. I go through the map drill, checking the
"Remap on logon" box, but the mapping does not survive a restart.

I have made up a batch file with the command line
NET USE X: \\ALAN-DESKTOP\ACSNET /PERSISTENT:YES
which does the job when run from a command prompt but I haven't been able to
find a spot to call it from on startup or restart. Any suggestions?

Try "subst", instead of "net use".
<http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/subst.mspx?mfr=true>
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/subst.mspx?mfr=true
Chuck,
Thanks for the suggestion, "subst" worked as well as "net use" but again,
only from the command line. I need some way to invoke the batch file when XP
starts.

Once you create the subst drive, you should not have to do so again. But the
same applies, for a mapped drive, when created with "/PERSISTENT:YES".

So, should you feel the need, you can certainly create a batch file:
subst @: /d
subst @: %:\path

Where "@" and "%" are drive letters, and "path" is the path to the folder on
drive %:. See the above linked article.

Having created a working .cmd file, you can put a shortcut to the file into
[HKLM \ ... Run], and it will run at logon. Or are you thinking that it needs
to be run BEFORE logon? If so, you will need to create a service. You can do
this using SC.exe.
<http://support.microsoft.com/?kbid=251192>
http://support.microsoft.com/?kbid=251192
Chuck, I stuck the .bat file with the subst command in the doc&set\all
users\ programs\startup folder and it seems to be working OK. At least for
new. Thanks for the lead.
Alan

Thanks for the update, Alan. Drop by any time. 8-D
 
Back
Top