1

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
echo STARTING

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?

1 Answer 1

2

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.

1
  • 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, 2013 at 17:35

You must log in to answer this question.

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