windows 7 logon script

Posted on 2009-12-29
Last Modified: 2013-12-04
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

Question by:JDL_Tech
    LVL 6

    Expert Comment

    try batch script with test computer and startup script in test GPO:
    net use G: \\stormwind\group
    LVL 41

    Accepted Solution

    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
    LVL 5

    Expert Comment

    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.
    LVL 24

    Expert Comment


    Author Comment

    the .bat file works. amazing how we have to resort back to windows 95 days to make new systems work

    Author Closing Comment

    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

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Suggested Solutions

    The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
    This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
    The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now