[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

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


Open in new window

1 Solution
try batch script with test computer and startup script in test GPO:
net use G: \\stormwind\group
Just for testing... let's try an equivalent DOS batch file version of this script.   That will tell us if this is related to the scripting language or the action operation.
The script would be something like this:
Net Use G: \\stormwind\group
Net Use R: \\stormwind\ITD
 Net Use T: \\stormwind\JDLInfo
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.
New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

JDL_TechAuthor Commented:
the .bat file works. amazing how we have to resort back to windows 95 days to make new systems work
JDL_TechAuthor Commented:
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.

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

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