Announcement

Collapse
No announcement yet.

logon script for homepath

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • logon script for homepath

    I tried the following code to create a homefolder (right now my system is doing it at the profile level and I would like it at the GPO level.

    All machines are running xp and the server is 2003

    Set WSHShell = CreateObject("WScript.Shell")
    Set WSHNetwork = CreateObject("WScript.Network")
    Set fso = CreateObject("Scripting.FileSystemObject")
    DomainString = "jubileehome.local"
    UserString = WSHNetwork.UserName
    HomeDriveLetterString = "Z:"
    HomePathString = "\\SERVER01\USERS"

    I am teaching myself this stuff on the fly so please be understanding.

  • #2
    Re: logon script for homepath

    Code:
    Option Explicit
    Dim objNetwork
    Dim strDriveLetter, strRemotePath
    strDriveLetter = "Z:"
    strRemotePath = "\\SERVER01\USERS" 
    objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
    WScript.Quit
    Technology is only as good as those who use it

    My tech blog - wiredtek.wordpress.com

    Comment


    • #3
      Re: logon script for homepath

      Moved to Scripting Forum
      Tom Jones
      MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
      PhD, MSc, FIAP, MIITT
      IT Trainer / Consultant
      Ossian Ltd
      Scotland

      ** Remember to give credit where credit is due and leave reputation points where appropriate **

      Comment


      • #4
        Re: logon script for homepath

        Make sure to tun this from the GPO logon script and not from the startup script, because this scripts runs as the system account.

        Comment

        Working...
        X