0

I'm trying to write some .bat files for GPO. I would like a way to see the output of the script to help debug problems. For the life of me I can't get it to log anything.

I have tried the following...

I created two batch files. The first had one line "call startup.bat > c:/startup.log", and the 2nd one was real startup.bat file. It didn't create the log file when I rebooted the computer the GPO was applied to. I did a "gpresult /z" which showed the policy being applied to the computer in question.

Then I delete the first batch file and change the policy to have the Parameters of " > c:\startup.log" still not working.

The startup.bat file is just some commands to generate some output. dir ipconfig /all

Never mind it seems to be working now. Not sure what I did to get it working. ???

2
  • 2
    Could you show us what you've tried? Nov 21, 2012 at 23:03
  • 1
    Can you show us the actual .bat files?
    – MDMarra
    Nov 26, 2012 at 15:24

1 Answer 1

0

It sounds like the user is not an administrator and/or the CMD prompt is not running with elevated privileges. Try piping your output to a safer folder like so:

call startup.bat >%temp%\startup.log

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .