Logon Script - using Microsoft script

Discussion in 'Windows Server' started by Fabricel, Oct 25, 2006.

  1. Fabricel

    Fabricel Guest


    I would like to map drive based on membership in a group.
    I copied a VBscript from Technet website :
    I just change the server/ share name to reflect my situation.

    But this script doesn't work. I receive a pop-up screen with error "Object
    is not a collection" and code 800A01C3.

    I didn't find a solution until now. Do you have an idea ?

    Fabricel, Oct 25, 2006
    1. Advertisements

  2. Fabricel

    Fabricel Guest

    I forgot to say : it's the line "For Each strGroup in objUser.MemberOf"
    which is causing the problem.
    I'm in an aWindows 2003 SP1 Active Directory with Windows XP SP2 workstations.

    Fabricel, Oct 25, 2006
    1. Advertisements

  3. Here is the batch file solution:

    @echo off
    ifmember.exe "Pentagon\staff" || net use S: \\server\staff

    ifmember.exe comes with the Windows Resource Kit.
    Pegasus \(MVP\), Oct 25, 2006
  4. Fabricel

    Fabricel Guest

    OK thank you
    This solution works for sure but I was trying to use .vbs which is more
    powerful than a batch file. May be am I wrong.
    I'm a beginner in VBS...
    Fabricel, Oct 25, 2006
  5. In this case you're in the wrong newsgroup. Try a scripting newsgroup.
    Pegasus \(MVP\), Oct 25, 2006
  6. Fabricel

    Fabricel Guest

    Yes, thank you for your answer.
    Unfortunately there's no scripting newsgroup in the Technet Managed
    Fabricel, Oct 25, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.