Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-20-2007, 09:19 AM   #1
Member (11 bit)
 
Join Date: Jul 2003
Posts: 1,060
Help with Server 2003 logon script

Hey guys I'm trying to create a working logon script for server2003 and am having trouble getting it to function.

I basically found a Microsoft tehcnical webpage that had an example script of what I'm trying to do, so I copied it and changed the info relating to my network. I know I have it in the right place on the server and assigned to the right groups because when I log in on one of the computers it gives a VBS scripting error.

Here is the script I'm using. The servername is 'recservices02' and the active directory group where the users are in is 'Staff'. I know I've got at least some of it messed up so any advide is appreciated!

Const STAFF_GROUP = "cn=staff"


Set wshNetwork = CreateObject("WScript.Network")
wshNetwork.MapNetworkDrive "V:",
"\\recservices02\Users\" & wshNetwork.UserName

Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" &
ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))

If InStr(strGroups, Staff) Then

wshNetwork.MapNetworkDrive "Q:",
"\\recservices02\shared files\"
wshNetwork.AddWindowsPrinterConnection
"\\recservices02\SAVIN205"

End If
jimmyrules712 is offline   Reply With Quote
Old 11-20-2007, 10:59 AM   #2
Member (9 bit)
 
Join Date: Dec 2004
Posts: 289
You should have quotations around Staff in your InStr function.

HTH
__________________
Dell Inspiron 9300
Intel Pentium M 740
17" Wide Screen XGA+ Display
1GB PC-4200 Dual Channel DDR2
256MB NVIDA GeForce Go 6800

Apple MacBook (Black)
Intel Core 2 Duo 2.16 Ghz
13" Wide screen Display
2GB Memory
PCBrandon is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 2003 Server Help Requested Remdul Windows Legacy Support (XP and earlier) 5 12-28-2005 10:35 AM
windows server 2003 Fox 3 Internet, Web Applications, & The Cloud 6 02-13-2005 11:49 PM
Windows NT Server to...2000 server or 2003 server? DarknessDragonm2k Windows Legacy Support (XP and earlier) 0 02-08-2005 08:50 AM
Small Business Server 2003 thefultonhow Software Discussion & Support 4 02-01-2005 01:17 PM
Integrate Microsoft Project 2003 in Microsoft SharePoint 2003 Server ??? gicio Software Discussion & Support 0 03-17-2004 11:23 AM


All times are GMT -5. The time now is 03:38 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2