Link to home
Start Free TrialLog in
Avatar of andre_st
andre_st

asked on

Deploying software through startup/login script in Group Policy

I am trying to deploy software by using either startup or login script in Group policy. But I cant get it to work. Feels I am missing out on something basic here. The command I am running in a ".bat"-file is as follow=

msiexec /i \\SERVER1\programs\dtb.msi ALLUSERS=1 /qb

I can run the .bat file manually and the install runs without problems. How ever it doesnt seem to work with Group Policy. I can see (using "gpresult /v") that the computer client sees the GP and that it applies it with no error messages.

I have read some similar threads out there that mention problems with permissions when using Group Policy, startup script for a computer. But since I am having the same problem with both user and computer based, I would think it is something else. It doesnt work either (using GP login) when I log in as an administrator - and no errormessage pops up, and I cant see anything in the event viewer. And still, as I mentioned, GPresult shows that the script is beeing applied.

Is there something missing in the script?

And also it would be nice if you could give me an example of a basic bulletproof script -.bat/.cmd that you use deploying software with GP!

I am currently testing on one DC and a Vista machine.
Avatar of bluntTony
bluntTony
Flag of United Kingdom of Great Britain and Northern Ireland image

Is there a reason why you're not using the built in Software Installation policy in Group Policy? This would be preferrable to using a script.

If you running it as a startup script, it will run in the context of SYSTEM (machinename$), login will run in the context of the user.
Avatar of Brian Pierce
You can avoid problems with permissions by utilising software deployment rather than trying to run installs via logon scripts see http://support.microsoft.com/kb/324750
ASKER CERTIFIED SOLUTION
Avatar of Irwin W.
Irwin W.
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Check this link out: support.microsoft.com/kb/816102
Avatar of andre_st
andre_st

ASKER

Thanks for all the quick replies - I am well aware of the possibility of the "software installation" function in GP. The reason I need to get the startup or logon installation, using script to work - is that I work for a company who is a reseller/distributor for many different softwares. And our clients use many different methods of deploying software in theire network. So therefore I need to evaluate and test the many possibilites one has of deploying software.

Besides that - My experience with software installation in GP, is that it can be a bit cumbersome. By that I mean that Group Policy does not always update itself like it should, resulting in the need to restart the computer 2-3 time before it works...
Its far more reliable than a logon script - use the correct tool for the job :-)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did you take a look at the last page of the PDF I posted?  It describes what you have to do to fix the software deployment issues.
Nappy_d: yes, I immediately began trying out your advice in the pdf on using group policy to force "always wait for network" during startup/login. I added the "always wait for network" policy, both locally and in the domain policy (just to be safe ;-).  

And, YES, it seems to be working rather well now :-)

I managed to install all except one software this way, trying both user and computer based deployment. In the end I discovered though that this one program which was failing...actually got installed, except for all the shortcuts. (which is usually never a problem with this software...)

I havent got a clue why the shortcuts werent created, but that seems to me like another matter - which isnt necessaraly related to the script and deployment method?

Thanks alot for the help all - in the future, it will be very nice to dont have to update or restart the computer several times to update the GP!

If you want shortcuts created on the desktop etc, you will need to create an MSI package that specifies these options.