Questions

Windows Server 2003 Logon script

+
0 Votes
Locked

Windows Server 2003 Logon script

dhegner
Does any-one know of a central repository where I can get a list of all valid system logon commands?
  • +
    0 Votes
    faradhi

    A login script is just that, a script that is launched at login.

    Usually this is a command shell script (DOS batch file), vb script or J script. However, I believe that it can be any scripting language as long as the client has the interpreter.

    Of course, I may be just misunderstanding the question. Which probably means it is in plain english and since I live in the south (US) I do not speak english.

    +
    0 Votes
    dhegner

    I am not accustomed to writing Windows scripts. For years I worked in the Novell environment. I'm looking for the actual commands that I would put into a batch file to say map a drive based on group membership. The standard DOS batch commands do not have a NETUSE command or an IF MEMBER OF command so I'm lost. There has to be some kind of listing of commands used in WIndows .bat login scripts, I just don't know where to look.

    +
    0 Votes
    faradhi

    http://technet2.microsoft.com/WindowsServer/en/library/552ed70a-208d-48c4-8da8-2e27b530eac71033.mspx?mfr=true

    However, I do not think that will help you with the task to map drives according to group membership. I can think of two ways.

    One, write a batch file that used the net use command. Create a group policy object to apply the script. Assign the group to have the mapped drive to the group policy object.

    Two, create a vbscript, jscript or perl script that determines the if the user is a member of a group and map the drive.

    I would use the second option. I am sure that there are other ways as well.

    +
    0 Votes
    support

    ifmember was a utility on the W2K resource CD. We use it to check group membership before adding icons to a users desktop works great

    +
    0 Votes
    dhegner

    This will save me a ton of time !!!

    +
    0 Votes
    computerguyinmi

    Set ObjGroupDict = CreateMemberOfObject(strUserDomain, strUserName)

    If MemberOf(ObjGroupDict, "Domain Users") Then
    WSHNetwork.MapNetworkDrive "P:", "\\dtlmain\" & strUserName & "$"
    WSHNetwork.MapNetworkDrive "R:", "\\CLDTL1\Centerline"
    WSHNetwork.MapNetworkDrive "S:", "\\dtlmain\shared$"
    End If

    +
    0 Votes
    lsp

    I think it is a lot easier with a fasttrack script. When you want to do more than just a few mappings, it really great. Look at www.fasttrackscript.com.

  • +
    0 Votes
    faradhi

    A login script is just that, a script that is launched at login.

    Usually this is a command shell script (DOS batch file), vb script or J script. However, I believe that it can be any scripting language as long as the client has the interpreter.

    Of course, I may be just misunderstanding the question. Which probably means it is in plain english and since I live in the south (US) I do not speak english.

    +
    0 Votes
    dhegner

    I am not accustomed to writing Windows scripts. For years I worked in the Novell environment. I'm looking for the actual commands that I would put into a batch file to say map a drive based on group membership. The standard DOS batch commands do not have a NETUSE command or an IF MEMBER OF command so I'm lost. There has to be some kind of listing of commands used in WIndows .bat login scripts, I just don't know where to look.

    +
    0 Votes
    faradhi

    http://technet2.microsoft.com/WindowsServer/en/library/552ed70a-208d-48c4-8da8-2e27b530eac71033.mspx?mfr=true

    However, I do not think that will help you with the task to map drives according to group membership. I can think of two ways.

    One, write a batch file that used the net use command. Create a group policy object to apply the script. Assign the group to have the mapped drive to the group policy object.

    Two, create a vbscript, jscript or perl script that determines the if the user is a member of a group and map the drive.

    I would use the second option. I am sure that there are other ways as well.

    +
    0 Votes
    support

    ifmember was a utility on the W2K resource CD. We use it to check group membership before adding icons to a users desktop works great

    +
    0 Votes
    dhegner

    This will save me a ton of time !!!

    +
    0 Votes
    computerguyinmi

    Set ObjGroupDict = CreateMemberOfObject(strUserDomain, strUserName)

    If MemberOf(ObjGroupDict, "Domain Users") Then
    WSHNetwork.MapNetworkDrive "P:", "\\dtlmain\" & strUserName & "$"
    WSHNetwork.MapNetworkDrive "R:", "\\CLDTL1\Centerline"
    WSHNetwork.MapNetworkDrive "S:", "\\dtlmain\shared$"
    End If

    +
    0 Votes
    lsp

    I think it is a lot easier with a fasttrack script. When you want to do more than just a few mappings, it really great. Look at www.fasttrackscript.com.