PDA

View Full Version : Startup Script (W2K)



aaucoin
04-13-2004, 12:34 PM
I'm trying to use group policy to distribute a startup .vbs script that will map network drives. This is currently done by a batch file that runs when the user logs in. On most of the pc's that I have applied the .vbs scripts to, the scripts work fine. On others, though, I get the following error message: An attempt was made to remember a device that had previously been remembered, Error: 800704b2. I have disconnected the drive letters that are causing the problem before I restart the pc, but it still gives the error after it comes back up. I can login in to these pc's, after receiving the error, and execute the scripts manually and they work. I have reinstalled windows on one of the pc's that didn't work before and that fixed the problem. The pc seems to think that the drive letter is in use even though it's not. Any suggestions?

meagain35
04-22-2004, 11:26 AM
Can I ask what the reason is for using vbs over a simple batch for mapping drives? I know you said you have deleted the mapped drives, rebooted and then ran the script again, have you had the same problem when using the shell to map the drive? can you paste your script up so we can see? Here is the most basic vbs for mapping drives, I think its always a good idea to disconnect before mapping, you might try that:

On Error Resume Next
Dim WSHNetwork
Set WSHNetwork = WScript.CreateObject("WScript.Network")


WSHNetwork.RemoveNetworkDrive("S:")
WSHNetwork.MapNetworkDrive "S:", "\\server\share"