GPO Logon.bat doesn't set path

Discussion in 'Windows Server' started by DennisFP, Nov 28, 2006.

  1. DennisFP

    DennisFP Guest

    Windows Server 2003 R2 (Standard)

    Using an OU GPO that is linked to a logon.bat, the command to set a path in
    the logon.bat does not seem to work. Why?

    (Command to map a drive works fine. I'll post an example below).

    Here is logon.bat:

    net use G: \\server\data\ou

    I've tried using... Set Path=%path%;Y:\ and also Set Path=%path%;Y:, but
    still no go.

    Basically, the Default Domain GPO maps a Y: drive, and I want to adjust the
    path on each domain user's machine to have Y:\ appended to the user's path.

    Yes, the OU user is under the OU where logon.bat is linked, and I've run
    gpupdate after editing & saving logon.bat.

    Help! Thanks very much.

    dennisfp ( at )
    DennisFP, Nov 28, 2006
    1. Advertisements

  2. Your command works very nicely - but only for the process that
    is active while the logon batch file runs. Remember that every
    process inherits its environmental variables from its parent and
    that any changes made by this process are NOT passed back to
    the parent process.

    You can use either of these tools to set environmental variabls globally:
    setx.exe (Win2000 Resource Kit)
    setenv.exe (
    Pegasus \(MVP\), Nov 28, 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.