Hi
I am using it as a logon script
I'm pretty sure it's in the right area in logon/logoff scripts.
Main Topics
Browse All TopicsI used the below script in my group policy for staff which contains all our staff
and someone tried to log on and received an error. It seemed to work fine for my self when i tested it.
Attached is the error msg.
Can anyone tell me what i've done wrong please..
Thanks
Dim objFSO
Set objFSO = CreateObject("Scripting.Fi
Dim objNetwork
Set objNetwork = CreateObject("WScript.Netw
Dim objWinntUser
Set objWinntUser = GetObject("WinNT://" & objNetwork.UserDomain & "/" & objNetwork.UserName & ",user")
Dim strGroupToCheck, strGroupShare, strDrive, strShare
'POP UP MESSAGE BOX FOR NEOS SCRIPT
dim naptime, objDOS
naptime = 2
set objDOS = CreateObject ("WScript.Shell")
objDOS.Popup "Running the Neos Script" , naptime, "Neos-IT" , 64
' Specity the group name, a colon symbol, and the network share
' in this case, the drive letter is taken as the first letter of the group name
arrGroupShares = Array( _
"Sales;S;\\Hera\Sales", _
"Technical;T;\\Hera\Techni
"Finance;U;\\Hera\Clients"
"All Staff;N;\\Hera\Templates" _
)
For Each strGroupShare In arrGroupShares
strGroupToCheck = Split(strGroupShare, ";")(0)
strDrive = Split(strGroupShare, ";")(1)
If Right(strDrive, 1) <> ":" Then strDrive = strDrive & ":"
strShare = Split(strGroupShare, ";")(2)
If IsMemberOfGroup(objNetwork
'MsgBox "You are a member of " & strGroupToCheck
If objFSO.DriveExists(strDriv
objNetwork.MapNetworkDrive
ElseIf IsMemberOfGroup(objNetwork
'MsgBox "You are NOT a member of " & strGroupToCheck
ElseIf IsMemberOfGroup(objNetwork
'MsgBox "There was no group found called " & strGroupToCheck
End If
Next
Function IsMemberOfGroup(strUserDom
IsMemberOfGroup = False
Dim objGroup
On Error Resume Next
Set objGroup = GetObject("WinNT://" & strUserDomain & "/" & strGroup & ",group")
If Err.Number Then
IsMemberOfGroup = "Error"
Else
IsMemberOfGroup = objGroup.IsMember(objUser.
'MsgBox objUser.ADsPath
End If
End Function
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: canaliPosted on 2008-05-28 at 05:08:02ID: 21659613
Are you using it as logon script?
Probably you are using it, as startup script (script (arresto/avvio)) is not the right position...
ciao
Gastone Canali