Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch File as Logon Script

Status
Not open for further replies.

itd17

IS-IT--Management
Jan 24, 2002
84
0
0
US
I recently added a batch file as a GPO, but it doesn't run upon loggin in. The file works fine....what am I missing?

@ECHO OFF
cd
"\\mgt-in01\bginfo$\bginfo.exe" \\mgt-in01\bginfo$\servers.bgi /timer:0
 
First, you certainly don't need the "cd" command.
Second, you mention that the file works fine. I'm assuming you've tested using the same account each way?

Pat Richard, MCSE MCSA:Messaging CNA
Microsoft Exchange MVP
Want to know how email works? Read for yourself -
 
I was able to put the batch file in the startup folder of several servers with no problem. I just can't do that on 80+ servers.

Thanks
 
I just can't do that on 80+ servers.

Why not?

Code:
for /f "tokens=*" %%a in (serverlist.txt) do (
    copy "x:\path\to\batch\file\batchfile.cmd" "\\%%a\c$\Documents and Settings\all users\programs\startup"
    if "%errorlevel%" == "1" echo %%a>>failedservers.txt
)
[code]

I will admit, it would be good to learn why the group policy isn't working for you... but putting a batch file on 80+ servers shouldn't be a problem.  The code above will do it using a list of servers and even tell you which servers failed to copy to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top