Back in the popular days of Novell NetWare, there was a nice ability to define 'search drives' in a login script. These were special network drive mappings that appeared as if they were in the local computer's PATH.
Therefore my first question would be: does anyone know of some equivalent app to use for Windows?
Assuming the answer of 'no', my next question is: can anyone provide some pointers on improving an existing script?
Enclosed is a script my predecessor used to accomplish the goal. I don't know VB myself, but I can follow along with what it's supposed to do. While the script does come close to what I need, it also has some drawbacks:
1. It doesn't seem to work on Vista workstations.
2. On some workstations it doesn't recognize that the script has been processed before. It's not uncommon to see a machine with these drives added three, four, sometimes even five times to the local PATH. Meanwhile other machines have the PATH set correctly.
3. I'd like the ability of removing these entries altogether when a user logs out from the LAN (mainly for people working offline). I know this would be a separate script, but I'm uncertain on how to do this.
I appreciate any advice you can offer. Thanks!
Const ForReading = 1
Set WSHShell = WScript.CreateObject("WScript.Shell")
strOrgPath = WSHShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\path")
If Wisthere=0 then
If Xisthere=0 then
If Yisthere=0 then
If Zisthere=0 then
If MaybeneedZ=1 Then
If MaybeneedY=1 Then
If MaybeneedX=1 Then
If MaybeneedW=1 Then
WSHShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\path", strNeed