Computing.Net > Forums > Windows Server 2003 > Logon Scripts/Folder Redirection

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Logon Scripts/Folder Redirection

Reply to Message Icon

Name: m0p
Date: November 2, 2005 at 06:12:21 Pacific
OS: Win2k3 Server Enterprise
CPU/Ram: 3.4ghz 1gig
Comment:

Hi, I’ve recently installed windows 2003 Server enterprise edition (my first real server environment). Created a DC, and a login script for some AD users. The purpose of the login script is to map a few network drives and a printer. The script works fine.

The problem I’m facing is, if a new user who doesn't have a profile on the local pc to which they are loggin on to ( i.e in c:\documents and settings\username" .. the script doesn't get executed, but after the first logon and there after, it gets executed fine.

The same also applies to folder redirection, made a custom GPO, applied to an OU, which the users are under. The folder is not created on server, on users first initial logon. As usual on logons & there after, redirection works fine.

So what is the solution to get things working on first logon if no profile for the user exists? I would assume making some type of default profile on the server...and roaming profiles. Which I heard is a thing of the past....

Any tips tricks is appreciated

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Mario (by mpartida)
Date: November 2, 2005 at 07:19:47 Pacific
Reply:

Post your script so we can see exactly what you are doing and what the possible causes for you problem could be.

-Mario-


0

Response Number 2
Name: m0p
Date: November 2, 2005 at 07:46:24 Pacific
Reply:

My script as requested:


Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath, strUserName, strUNCPrinter
strDriveLetter = "J:"
strRemotePath = "\\hq-con-dc-01\homedir"

' Purpose of script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method. Result J: drive

Set objNetwork = WScript.CreateObject("WScript.Network")

' Here is where we extract the UserName

strUserName = objNetwork.UserName
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _
& "\" & strUserName

Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "H:" , "\\hq-con-dc-01\home"

strUNCPrinter = "\\hq-con-dc-01\HP2500CS"
'Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strUNCPrinter
objNetwork.SetDefaultPrinter strUNCPrinter
WScript.Echo "Your Default Printer is:" & strUNCPrinter

'WScript.Echo " Launch Explorer, check: "& strDriveLetter

WScript.Quit



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


XP Local user rights thro... Remote Desktop Connection



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows Server 2003 Forum Home


Sponsored links

Ads by Google


Results for: Logon Scripts/Folder Redirection

GPO's and Folder Redirection www.computing.net/answers/windows-2003/gpos-and-folder-redirection-/7208.html

Folder redirection / User profiles www.computing.net/answers/windows-2003/folder-redirection-user-profiles/6130.html

Logon Script Dependencies? Need DC? www.computing.net/answers/windows-2003/logon-script-dependencies-need-dc/2203.html