Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use a batch script to automate the updates of some apps using ninite with a group policy log off script.

Here is my script:

echo Copying ninite
mkdir C:\temp
mkdir C:\temp\ninite

robocopy /xo /"\filesever01\shared data\IT\SoftwareUpdate\/" \temp\ninite\ NiniteOne.exe

echo installing Chrome and Skype...
c:\temp\ninite\NiniteOne.exe /select Chrome Skype /cachepath "\\fileserver01\shared data\IT\SoftwareUpdate\NiniteCache"

echo Installing Java and Reader without autoupdates...
c:\temp\ninite\NiniteOne.exe /select Java Reader /disableautoupdate /cachepath "\\fileserver01\shared data\IT\SoftwareUpdate\NiniteCache" /silent report.txt

When the script runs at logoff it fails. I ran it at log on and noticed that it fails because ninite asks for administrator permission and I am assuming that it's failing at logoff for the same reason.

Does anyone have any recommendations on what I should do? Is ninite the right tool for what I am trying to do? Is a batch script the right path or should I try using powershell?

share|improve this question
up vote 2 down vote accepted

Logoff scripts run as the user. In any sensible Windows environment users should not have Administrator rights and won't able able to install software.

You'd be better off installing software in a Startup or Shutdown script, which run as the computer (SYSTEM).

I have no familiar with Ninite so I can't say if it will work in a Startup or Shutdown script, but I can say that any issues with needing elevated privileges won't be an issue.

share|improve this answer
Thanks Evan! That worked. I run a logoff script to copy ninite over and then a shutdown script to install. I tried to do it all in one script but the network connection was timing out during shutdown. – Nick Feb 20 '13 at 17:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.