Link to home
Start Free TrialLog in
Avatar of JDL_Tech
JDL_TechFlag for United States of America

asked on

windows 7 logon script

I have been banging my head with this one so its time for the experts. I have a nice little script that maps drives that runs out of the user profile in AD. we have two DCs 2008/2003. XP clients work fine, vista clients work, windows 7 doesn't. When I run this manually after start up it does its job no problem. I am currently running with administrative privileges. I have tried with uac on and off, which it is currently off. all the special security features such as network discovery are turned on and wide open. I have tried the suggested methods of making the user a standard user because of something to to with account tokens. anyhow below is my script it is very basic ty for any help.... oh one more thing I have symantec endpoint on the computers but I have uninstalled that too.
Option Explicit
Dim objNetwork, strRemotePath1, strRemotePath2, strRemotePath3
Dim strDriveLetter1, strDriveLetter2, strDriveLetter3

strDriveLetter1 = "G:"
strDriveLetter2 = "R:"
strDriveLetter3 = "T:"
strRemotePath1 = "\\stormwind\group"
strRemotePath2 = "\\stormwind\ITD"
strRemotePath3 = "\\stormwind\JDLInfo"

Set objNetwork = CreateObject("WScript.Network")

' Section which maps two drives, M: and P:
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
objNetwork.MapNetworkDrive strDriveLetter3, strRemotePath3

Wscript.Quit

Open in new window

Avatar of Vaidas911
Vaidas911
Flag of Lithuania image

try batch script with test computer and startup script in test GPO:
.bat:
net use G: \\stormwind\group
ASKER CERTIFIED SOLUTION
Avatar of graye
graye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Do you set the script as Logon-script in an AD-policy? And how exactly? Do you use %USERNAME% or %USERPROFILE% in this command?

Can you enable "Run logon scripts visible" to see what happens (it's under User Configuration, Administrative Templates, System, Scripts) ? Perhaps cscript.exe will give you the output you need.

I suspect Windows 7 to disallow some objects or network access, or some properties have not yet been initialized.
Avatar of JDL_Tech

ASKER

the .bat file works. amazing how we have to resort back to windows 95 days to make new systems work
we had problems in the past using .bat files and the vb scrips seemed to work well. This does work, so well enough for me.