Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Script per User 1

Status
Not open for further replies.
Dec 24, 2003
132
0
0
US
Greetings-

Single site, single domain; W2K3 DCs; XP Pro workstations.

I want to use a supplementary login script for some users (in addition to the one pushed by a Group Policy Object) by specifying a login script from the Profile Tab in the user object. The file will map some additional drives.

I created a batch file at \\Domain\SysVol\Domain\scriptsnamed Steve.bat

The single command in the file is:
NET USE Q: \\Server1\Share1\Data\Steve

I log out and back in and no drive is mapped.
I also tried a .VBS with no luck. I can run the scripts from my workstation and they are successful.

Am I missing something?!


Thanx
OregonSteve

"..You should never, never doubt what nobody is sure about." -Willy Wonka
 
this may help. quoted from
Sample of VBScript - Mapping a network drive based on the group

' Map a network drive if the user is a member of the group.
' Alert the user if the drive cannot be mapped.
If IsMember(objUser, "accounting") Then
If Not MapDrive("Q:", "\\chicagotech\data") Then
MsgBox "Unable to Map Q: to AdminShare"
End If
End If


Robert Lin, MS-MVP, MCSE & CNE
Windows, Network, Internet, VPN, Routing and How to at
 
I am with Robert. VBScript it the way to go.

Dare I say that Assigning VBScripts via group policies is the way of the future. User Property pages and batch files are the way of the past.

That said, creating Logon VBScripts is not that hard, my guess is that people just copy existing scripts and make a few changes.

Here is a good place to get started.




Guy Thomas

Scripting Ezine
 
Greetings-

Thank you, and I am familiar with creating login scripts via VBS. That's not my problem; The problem is that the script is not executing. What factors might prohibit/inhibit the script from running from (\\Domain\SysVol\Domain\scripts\)? I did check to make sure that Authenticated Users had Read&Execute permissions to this location.


Thanx
OregonSteve

"..You should never, never doubt what nobody is sure about." -Willy Wonka
 
Greetings-

Yes, the scripts work on their own; I run them from my workstation to verify that and then copy them to the network.

This isn't being run from a Group Policy Object; This setting is on the Profile tab of the user object in AD.

Thanx
OregonSteve

"..You should never, never doubt what nobody is sure about." -Willy Wonka
 
More News...

I tested this on our W2K3 test server and the script runs GREAT. It just doesn't work on our production system. I've checked production and the script is being replicated. The same Share permissions are on SYSVOL on both test and production. The same Share permissions are on the Scripts folder on both systems.

PLEASE HELP. As there are numerous users who need to have special drive mappings the solution to this will be most welcome!!!

Thanx
OregonSteve

"..You should never, never doubt what nobody is sure about." -Willy Wonka
 
Try assigning the script to a GPO and place that GPO in an OU. Then add your users to that OU and it should work for you.
 
Greetings-

That would be great, BUT each of the users who gets this additional login script will be mapping different drives. So using a GPO isn't possible.

Thanx
OregonSteve

"..You should never, never doubt what nobody is sure about." -Willy Wonka
 
Put the batch file in the DOMAINCONTROLLER\NETLOGON folder.

In the login script properties for the user, just specify the file name (e.g. STEVE.BAT) with no path.
 
Greetings-

Thanks, Philly, but this has been done already.

Thanx
OregonSteve

"..You should never, never doubt what nobody is sure about." -Willy Wonka
 
Put a PAUSE in your script to make sure that the script is even running (just to make sure there isnt an error mapping the drive). By default, the script hides itself so you won't "see it" run necessarily.

Just a tip.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top