Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to install software with GPO at comptuer shutdown.

My first question is it is possible to do it with Software Install in Win2003 Server?

Then I tried to put a batch script to shutdown script of computer from GPO. Script is like that:

if exist c:\mydlp-0.7.12.txt goto end
echo %date% %time% >> c:\mydlp-0.7.12.txt
msiexec /i \\10.0.0.201\deploy\mydlp-endpoint-0.7.12.msi /qb /passive /forcerestart /l* C:\log.txt
:end

It does not install it on shutdown, it starts to install however it does not complete installation. However, when I run batch script normally it runs and installs software successfully.

Thanks in advance.

share|improve this question
    
Hi, why are you choosing the install software on shutdown? surely using the group policy to deploy software would be more efficant and cause less problems? –  JamesK Jan 19 '11 at 13:31
    
Our users are not patient enough to wait software installation on startup :) –  Burak Oguz Jan 19 '11 at 15:39
add comment

2 Answers

The specific problem you're having is that MSIEXEC, called in that manner, runs asynchronously. Run it with a start /wait msiexec ... command and you'll get what you're looking for.

Having said that, you're replicating a subset of functionality that's already built into the Group Policy client. You should research Software Installation policy to see what it can do for you. You can create a reasonably scalable, deterministic automated software installation environment without writing any scripts. It's not perfect but it does the job in a lot of cases. It'll also be much easier for The Next GuyTM to understand than a maze of batch scripts that you'll create this way.

share|improve this answer
1  
Thank you.. I will try that.. Our users are not patient enough to wait software installation on startup :). –  Burak Oguz Jan 19 '11 at 15:01
    
My users are equally as anal :) (not all of them, in case they find this post!) –  Mister IT Guru Jan 19 '11 at 15:08
    
Tried it. Not working :(, still same problem. Not waiting for installation and shutting down the computer. –  Burak Oguz Jan 19 '11 at 15:13
    
@Burak: I'm occupied with a Customer right now. When I get some time I'll take a look at this. Shutdown scripts will be forcibly terminated after 10 minutes, by default. How long does this install take, normally? –  Evan Anderson Jan 19 '11 at 15:47
    
It is not a huge file. msi size is ~10 MBs and installed size is 20 MBs. It should not take longer than 2 mins under normal circumstances. –  Burak Oguz Jan 19 '11 at 17:27
add comment

Use the User logoff script. Not Computer shutdown. Network service is not available at shutdown, only at logoff.

You could copy the .msi file to the local drive and change the setup path so it doesn’t point to \\10.0.0.201\* but to c:\*.

share|improve this answer
add comment

Your Answer

 
discard

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.