• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

login.vbs doesn't always execute

Morning everyone,

This question relates to a windows 2000 server running AD.  I have my OU set up to execute a simple vbs script to map network drives and printers when users sign into our network.  we only have about 5 computers in the building.  I just set this up a few months back, and I suspect I know where my problem lies...but before I tell you that let me explain what is going on.

We bought a new Dell 1800 poweredge server, and I wanted to move from the .bat login scripts to the more powerful vbs ones.  so I made the following script:
============================================
Dim wshNetwork

on error resume next

WshShell.Run "NET TIME \\HARLEY /SET /YES", 0, TRUE

Set wshNetwork = CreateObject("Wscript.Network")

wshNetwork.RemoveNetworkDrive "p:"
wshNetwork.RemoveNetworkDrive "k:"
wshNetwork.RemoveNetworkDrive "s:"

wshNetwork.MapNetworkDrive "p:", "\\harley\user folders"
wshNetwork.MapNetworkDrive "k:", "\\harley\kci files"
wshNetwork.MapNetworkDrive "s:", "\\harley\software"

wshNetwork.addwindowsprinterconnection "\\harley\Ricoh RPCS"
wshNetwork.addwindowsprinterconnection "\\harley\Ricoh-LANFAX"
wshNetwork.setdefaultprinter "\\harley\Ricoh RPCS"

WSCript.Quit
============================================

When it runs, it runs perfectly...but occasionally I'll hear complaints that the K and S drives did not map.  The P I think is redundant in this script because in the user profiles page I map a user home directory to P as well.

Here is what I suspect is the problem.  I bought Mcafee Active Virus scan SMB edition, it is 8.0i with patch 11 installed for those familiar with it.  Could this be blocking the vbs script from executing when the computers login?  I checked the logs and can't seem to find anything hinting to it, but right around the time this started happening was when we loaded mcafee SMB edition.

I'm just looking to get this resolved as soon as possible.  It isn't hampering the ability to perform routine tasks on the network, but it does get annoying when users start to work and then realize they can't save data to the drive in question.

Thanks!
--Justin
0
mrjking2000
Asked:
mrjking2000
  • 4
  • 3
1 Solution
 
DLCECommented:
I bet your desktops are Windows XP If so, modify the GPO (Computer Configuration / Administrative Templates / System / Logon) and select "Always wait for the network at computer startup and logon."

If theya re not XP, let us know...
0
 
mrjking2000Author Commented:
They are indeed XP, I do not see the always wait for the network option, but I do see one in there called "Maximum wait time for group policy scripts." Could this be what I'm looking for?

Thanks,
0
 
DLCECommented:
Yes
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
DLCECommented:
My bad, it should be "run logon scripts synchronously"
0
 
DLCECommented:
Sorry about my fragmented replies, here MS's data on those GPO objects:
http://tinyurl.com/oc2o6

Strange, checking one of my DC's the "always wait.." option didn't show up until I browsed away from that GPO key and came back, see if that works for you.
0
 
mrjking2000Author Commented:
No worries, I just enabled the run logon scripts synchronously and enabled the max wait time for 2 minutes basically as a "just in case" scenario.

I am going to let things run a couple of days before I close this out to make sure that it is fixed.  Thanks for the help DLCE.  And if anyone else has comments I'm always open to checking out more.  But I'm betting we have this one resolved.

I'll update in a few, and award then as well.
Thanks!
--Justin
0
 
mrjking2000Author Commented:
Problem has been solved and points have been awarded.  Thanks again DLCE.

--Justin
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now