Logon script help

Discussion in 'Scripting' started by Omar Rodríguez, Apr 21, 2009.

  1. I have a server (W2003) and I had try to setup a windows logon script but
    does not work at all.

    The script is a batch file as follow:
    @echo Off
    net use /delete z: /yes
    net use z: \\myserver01\folder
    xcopy z:\validator /e /y c:\
    @echo on

    Can you please help us?
     
    Omar Rodríguez, Apr 21, 2009
    #1
    1. Advertisements

  2. You need to tell us what happens. Put a "pause" command on the line after
    "xcopy" if you do not yet know yourself.
     
    Pegasus [MVP], Apr 21, 2009
    #2
    1. Advertisements

  3. Also, can the user (not an admin) run the batch file successfully after
    logon? Or does it just appear to not run at all during logon? I have an FAQ
    on how to setup logon scripts linked here:

    http://www.rlmueller.net/LogonScriptFAQ.htm
     
    Richard Mueller [MVP], Apr 21, 2009
    #3
  4. From: "Richard Mueller [MVP]" <>



    | Also, can the user (not an admin) run the batch file successfully after
    | logon? Or does it just appear to not run at all during logon? I have an FAQ
    | on how to setup logon scripts linked here:

    | http://www.rlmueller.net/LogonScriptFAQ.htm

    I'm glad you mention KiXtart in your page. However not enough mention.

    It is most likely more powerful than VBScript, JScript, or other WSH scripting language
    and easy to implement.
    Peeking and poking the registry, COM automation, WMI, all are very simple in KiXtart and
    the wealth of commands that are available have greatly expanded since it was first
    introduced in the NT Resource Kit.

    http://www.kixtart.org KiXtart is CareWare.

    PS: My Multi AV Scanning Tool is written exclusivley in KiXtart
     
    David H. Lipman, Apr 22, 2009
    #4
  5. Hello,
    Thank you for reply.
    I read the webpage that you suggest me, but I dont have any progress yet.
    Any other suggestion?
     
    Omar Rodríguez, Apr 22, 2009
    #5
  6. Did you try the "pause" command I suggested? Did you look at Richard's
    suggestions?
     
    Pegasus [MVP], Apr 22, 2009
    #6
  7. Yes, I did (pause commands and Richard's suggestions) and nothing. The
    script batch file run in the computer without problems if the user click it,
    but using the policies does not work.

    Thank you.
     
    Omar Rodríguez, Apr 22, 2009
    #7
  8. This means that there is something wrong with your policy or with the batch
    file name/location you specify in the policy.
     
    Pegasus [MVP], Apr 22, 2009
    #8
  9. The file name of the batch is Logon.bat and the path of the file is:
    \\servername.local\SysVol\servername.locall\Policies\{0788D9F7-F816-405B-863F-34C10C805F4F}\User\Scripts\Logon

    Thank you in advance.
     
    Omar Rodríguez, Apr 22, 2009
    #9
  10. Can you please tellme the news group for policy issues?

    Thank you.
     
    Omar Rodríguez, Apr 23, 2009
    #10
  11. Omar Rodríguez

    \RemS Guest

    Was this user a member of the local Administrators group?
    A default Policy can disallow normal users to write files into the root of
    the system drive. Is xcopy also copying files to the root?

    Or, Is it possible that Z: previously was mapped to an other network path?
    Then there should to be a 2-3 seconds pause in the batch before you can
    reliable re-use the same drive letter that was just released for connecting
    to an different path.

    btw,
    xcopy does not nessesarily need a mapped drive as the source when the source
    path is a share.
    You can try this batch (it provide some time between remapping ther drive)


    @echo Off
    Net Use z: /d /y
    xcopy "\\myserver01\folder\validator" /e /y c:\
    net use z: "\\myserver01\folder" /PERSISTENT:no
    echo on


    \Rems
     
    \RemS, Apr 23, 2009
    #11
  12. I note that you're using Outlook Express as a newsreader. Click
    "news.microsoft.com", then type the word "policy" to see all the newsgroups
    with "Policy" in their name.
     
    Pegasus [MVP], Apr 23, 2009
    #12
  13. Thank you for reply.
    I just tried your suggestion Rems, but nothing.
     
    Omar Rodríguez, Apr 24, 2009
    #13
  14. Ok. I'll look in others news group too.
     
    Omar Rodríguez, Apr 24, 2009
    #14
    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.