Need a script to decide if to copy a file based on membership

Discussion in 'Scripting' started by Bryan, Aug 22, 2003.

  1. Bryan

    Bryan Guest

    Trying to do this:
    IF "UserA" is a MEMBER of "GroupB" THEN
    COPY "\\server\share1\ShortcutC" to "c:\documents and
    settings\%username%\nethood\"

    I think I got the file copy part down, but can't figure
    how to do a statement on if the user is in the deciding
    group or not. Any help is GREATLY appreciated.
     
    Bryan, Aug 22, 2003
    #1
    1. Advertisements

  2. Bryan

    Bryan Guest

    Yes, this is a logon script for some Win XP machines, and
    I was in the process of recearching how to bind the
    script to the current user on the machine, so I really
    appreciate that extra bit of info. I'll be at work later
    to try it out, so I'll give an update of my progress then.

    Bryan
    \ShortcutC.lnk", "c:\documents and
     
    Bryan, Aug 23, 2003
    #2
    1. Advertisements

  3. Bryan

    Bryan Guest

    Now I realize that no matter what I do I con not get the
    file to copy, all other line are working properly it
    seems. I get a "Permission Denied" Error #800a0046. In
    the process of troubleshooting I have given a test user
    full control of the share and file. In Explorer I can
    access the file, but the script is having trouble.
    \ShortcutC.lnk", "c:\documents and
     
    Bryan, Aug 26, 2003
    #3
    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.