Solved

Software Deployment Through Group Policy

Posted on 2008-06-14
49
424 Views
Last Modified: 2013-12-12
I am looking to deploy a software package through Group Policy and was wondering if there was a way to specify a different install path that deviates from the default location? If so, how do I do that? Thanks!
0
Comment
Question by:jbyrd1981
  • 22
  • 19
  • 6
  • +2
49 Comments
 
LVL 58

Accepted Solution

by:
tigermatt earned 340 total points
Comment Utility
The installation path to which a deployed MSI file will be installed to is whatever the default path in the MSI file is. To change the path you would have to edit the MSI file in some way to achieve this. The Group Policy side of things is purely to deploy the MSI - all the settings and the changes it makes to the OS are stored within the MSI itself.

You can use Microsoft's Orca tool to edit an MSI file, which may allow you to locate where the default installation path is located and perhaps change it. More information at http://support.microsoft.com/kb/255905.

If this is a Microsoft Office MSI, you can use the Custom Installation Wizard (or the Office Customization Tool for Office 2007) to generate an MST file with your installation location changes.

-tigermatt
0
 
LVL 29

Expert Comment

by:matrixnz
Comment Utility
As TigerMatt mentioned you could edit the MSI or create an MST file, but in most cases you should also be able to specify it on the commandline i.e MYMSI.MSI /QN INSTALLDIR="%ProgramFiles%\MyPath" /NORESTART.

Hope that helps.

Cheers
0
 
LVL 12

Expert Comment

by:StuFox100
Comment Utility
Check out this site:
http://www.appdeploy.com/packages/
It is very useful for different apps when packaging and deploying through AD.
Cheers
Stu
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Tigermatt, your awesome! I used the orca tool on the MSI and miraculously found the line that contained the default path, changed it and ran it to see if it changed, and it did! I think I even found the lines that have the install for just me or everyone buttons but I do not know what to change to get it to default to everyone. Any ideas? Thanks!
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
I wonder, does the latter part of this article help? http://support.microsoft.com/kb/835460

-tigermatt
0
 
LVL 29

Expert Comment

by:matrixnz
Comment Utility
use the switch AllUsers=2 or change the property AllUsers within the MSI
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Also, another problem... I have the GP setup with the package and it does seem to be installing. Any ideas on what could be hanging me up? Thanks again!!!
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
Which part of the GPO have you implemented it in, Computer or User Configuration?
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Computer configuration. The path is correct using UNC and I know the MSI works because I ran it manually. I thought that maybe the _ in the MSI was a problem so I changed that. The GPO is linked and enforced to the OU that I want to apply it to and I have checked the computers that reside there which it hasn't installed. We have never deployed this app via GP before but there is a previous version on there and the MSI is supposed to install to the same directory. That should not matter right?? because it should just upgrade the app. Thanks for you help!
0
 
LVL 58

Assisted Solution

by:tigermatt
tigermatt earned 340 total points
Comment Utility
Can you please add the "Domain Computers" security group as a permission - with full control - over the directory containing the MSI?
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Domain Computers have full control permissions all the way down to the MSI file now. I have rebooted one of the machines a couple of times and the prograqm is still not getting updated.
0
 
LVL 58

Assisted Solution

by:tigermatt
tigermatt earned 340 total points
Comment Utility
If you run an rsop.msc at one of the problem stations, does the policy actually show up as if the application should be installed?
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Yes, it shows up as assigned in the rsop on one of the machines. I am glad you have some ideas because I am pretty much clueless at this point.
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
Is this the modified MSI which you are installing? What happens if you manually try to install it on a station - does the installation go successfully, or does it fail? I'm starting to think the MSI is corrupt for some reason.
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Well, I ran the MSI on another machine just to test it out and the modified one worked fine. So I do not hink it is corrupt. If it already sees files in the directory it is installing to will it not install?
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
>>> "If it already sees files in the directory it is installing to will it not install? "
That could be causing a problem. If it sees files there, it might think it's already installed, and therefore fail because it is asking to do a Repair/Reinstall instead.
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Is there any way to force it? If I have to go around and unistall this app before I use the GP to install it that would kind of defeat the purpose of the GP.
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
Not that I'm aware of, I've had a look in Orca but can't see a place to force it to repair itself as such.
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Well, I am trying it on a machine that has never had it installed to see if it actually goes through so then maybe we can rule that out. I will let you know.
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Ok, test done and it installed on a machine that has never had it without a problem. So I need to figure out an automated way to remove the program from all the machines and redeploy via GP. Ths app also requires permissions set on the application folder so that non admins can use it. Any idaes on accomplishing this? Thanks!
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
You can set permissions on the folder through a Group Policy. There's an interface which allows you to push permissions changes for both the file system and registry. I suggest that in the same deployment policy which you are using to push the application MSI, you go to Computer Config, Windows Settings, Security Settings, File System, and follow the instructions there. There's more information on this at http://windowsitpro.com/article/articleid/82361/jsi-tip-8724-how-can-i-use-group-policy-to-set-file-system-andor-registry-permissions.html.

As for forcing it to install, I'm not sure how you would go about this. What method was used to install it previously? A manual installation?

-tigermatt
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Yes, it was a manual installation. It looks like the only thing that it installs is a new shortcut for the program. As far as updating the files it does not change the files which are already there. That is a problem... There will probably be updates to this program in the future and getting the setup via GP to push the software out will greatly ease administration.
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
Perhaps you could add

msiexec /package <Path to old MSI> /uninstall /quiet

to your logon or startup script in order to remove the application?
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
So I would add msiexec /package c:\program files\myprogram /uninstall /quiet to the GP? Would I just create a little batch file with this in it and add it to the logon scripts under computer settings for the same GP? Would this also result in that command running and completing before it initiates the package install. Would I need to remove that command after they are all updated so it doesnt continually uninstall/reinstall? Sorry for all the questions. You have been really helpful and have more knowledge than I do. This makes the whole process of getting this figured out easier. Thanks!
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
It's only a suggestion, it depends on how the program is configured as to whether it will work. You'll need to actually reference that command in your logon or perhaps a computer startup script, but you have to have the path to the OLD MSI which the old version of the program was installed with.

It might work, it might not.
0
 
LVL 29

Assisted Solution

by:matrixnz
matrixnz earned 160 total points
Comment Utility
Have you tried /fvomus to force a re-install using your version?  As mentioned everything above could easily be done using switches rather than editing the MSI directly and/or creating an MST.  The whole path would be something like:
MYMSI.MSI /QN REINSTALLMODE=VOMUS INSTALLDIR="%ProgramFiles%\MyPath" /NORESTART

Another option which would require you to remove the first install is to create an Administrative Install using:
MYMSI.MSI /a

Repair Options
      /f[v|o|m|u|s] <Product.msi | ProductCode>
            Repairs a product
            v - runs from source and recaches local package
            o - if file is missing or an older version is installed (default)
            m - all required computer-specific registry entries (default)
            u - all required user-specific registry entries (default)
            s - all existing shortcuts (default)

This method is recommended because any future updates can easily be pushed out using the Administrative Install Source.
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Ok I have this script and tested it by manually running it on the tartget machine and it uninstalls.

msiexec /uninstall "\\server\My original install app\myapp.msi" /quiet

I put it in the GP as a computer startup script and it does not seem to uninstall the program. Any ideas? I feel that I am really close to getting this issue resolved. Thanks!
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
And again, the Domain Computers account has full control over the path on the server in both NTFS and Share permissions to read the MSI?
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Yes both NTFS and share permissions have been set for Domain Computers. The uninstall command I posted is in startup scripts under computer settings. The actual batch file is in the sysvol folder as well.
0
 
LVL 29

Expert Comment

by:matrixnz
Comment Utility
'tap' 'tap' hello is this thing turned on...

damn must be talking to myself..
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Oh yes Matrixnz I hear you now your last post was sort of in Greek.  I am trying to keep this simple because I am an aspiring expert not an expert yet. :) I think I am almost there if I could just get the old program uninstalled then the package would install no problem. What script/GP change do you think I should try to get this to work? Thanks!
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
Try using the commands matrixnz has recommended - MYMSI.MSI /QN REINSTALLMODE=VOMUS INSTALLDIR="%ProgramFiles%\MyPath" /NORESTART - should get the entire application reinstalling, without the need for the GPO.
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Me again... :)

Ok lets recap on what is going on. I have 30+ machines that need a new version of an app that was originally installed with an older version by manually going around to each machine to install it. I have successfully created an app deployment in GP (computer settings) that puts the app on the machine only if the app old or new has never been installed. Because all the machines that need the deployment have the old version, I then I proceeded to create a script that would remove the old version so the new version would install.  This scripts syntax is msiexec /uninstall "\\server\My original install app\myapp.msi" /quiet, however when added to the GP it does not run on the target machines leaving me back a square one. I have tried the various suggestions by tigermatt and matrixnz and they have not worked. One of the vomus commands used actually changed the date on the apps executable but when it is run still reflect the old version!?!?!?!?
If it helps I have both the old and new MSI installer files on a network drive and the location of the program on the target machines are in program files, of course. If anyone could provide me with the exact syntax so all I would have to do is insert the location of the files I have that would be great. Who knows maybe I am typing something wrong when using these suggestions by all the experts, so maybe with the exact switches and syntax provided by everyone and all I have to do is fill in the file paths then maybe I can get this working. Thanks!!!
0
 
LVL 29

Assisted Solution

by:matrixnz
matrixnz earned 160 total points
Comment Utility
Hi jbyrd1981

For uninstall try:
msiexec.exe /x "\\server\My original install app\myapp.msi" /qn

However before doing this try running the following line to see if the software is upgraded
msiexec.exe /fvomus "\\server\My new install app\myapp.msi" /qb
Note: Try to run this using the new original msi not one edited with Orca.
Note2: If this is an upgrade then this version should overwrite the local version.

Cheers
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Well, I tried with this one msiexec.exe /x "\\server\My original install app\myapp.msi" /qn and it worked even through the gp. I tested it out on a couple of other machines and after a couple of reboots the software uninstalled/reinstalled all through group policy with the new version. I went to try a third and it uninstalled but would not reinstall. Here is what I got when looking at the RSOP through the affected machine.
Group Policy Infrastructure failed due to the error listed below.
The specified domain either does not exist or could not be contacted.

Note:  Due to the GP Core failure, none of the other Group Policy components processed their policy.  Consequently, status information for the other components is not available.

Any ideas?
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
There should be an associated log in either the Application or System Event Viewer. Can you post it here for us please?
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Are these what you are looking for?

Event Type:      Error
Event Source:      Userenv
Event Category:      None
Event ID:      1054
Date:            6/21/2008
Time:            2:42:51 PM
User:            NT AUTHORITY\SYSTEM
Computer:      CC1-comp-07
Description:
Windows cannot obtain the domain controller name for your computer network. (The specified domain either does not exist or could not be contacted. ). Group Policy processing aborted.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Event Type:      Error
Event Source:      NETLOGON
Event Category:      None
Event ID:      5719
Date:            6/21/2008
Time:            2:03:39 PM
User:            N/A
Computer:      CC1-comp-07
Description:
No Domain Controller is available for domain mydomain due to the following:
There are currently no logon servers available to service the logon request. .
Make sure that the computer is connected to the network and try again. If the problem persists, please contact your domain administrator.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 5e 00 00 c0               ^..À    
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
And just to clarify, this has only happened on one computer?

Can you check its IP and DNS servers are correctly set, so the ONLY DNS servers are your Domain Controller(s).
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
So far I have only tried about three or four.

They are all getting their IP address as reservations through DHCP and the DNS servers configured there are our DCs.

Do you think that the computer account needs reset or unjoined and rejoined??
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
Oh, so it didn't want to uninstall on all four PCs, if I understand what you're saying correctly? That's a blow. Yes, you might want to look at removing the PC and re-adding it to the domain.
0
 
LVL 5

Expert Comment

by:Feroz Ahmed
Comment Utility
Hi,
Software Deployment is done through Domain Controller or Administrator on any workstation ,and the process is just goto Active Directory users and Domaincontrollers there select domain and right click onto it and it opens with MMC (Microsoft Management Control) to GPedit.msc and give the path for the software which is to be installed on any workstation here you can specify the installation to automatic or on restart of that particular workstation.In this way software deployment is done.
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
@sm_feroz: Have you even read the entire question? This is NOT as simple as just explaining how to deploy an MSI file through Group Policy. If you had read some of the author's last comments, you would realise we are having a terrible time attempting to get the MSI to install, because the previous one must first be removed. In any event, I had already stated in my very first comment how to distribute the MSI by Group Policy! (http:#21786687)
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
tigermatt, I unjoined the computer from the domain and rejoined. I tried to deploy again with the same result, it runs the removal script but does not deploy the app and shows the same error message in the RSOP. I checked the machine in AD and the creation date says 2006, shouldn't it say 2008? I don't think it was completely removed. Any more ideas, thoughts? Thanks for hanging!
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
The only last suggestion I've got in that case is to use a small program known as PsExec to manually do the uninstallation (using the uninstall code you are already using) on the remote stations. You can find more information on that tool at http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx, but essentially, it simply allows you to remotely execute commands on the remote workstation(s) you specify. You can also set a username and password to execute the command at the remote station with.

As stated in the article, you can use the command \\* where the computer name goes to run the command against all computers in the domain. This is probably the easiest solution for you, and the setup program should just quit immediately if it cannot find the program on a particular station to uninstall.

Hopefully after running PsExec and one or two restarts, the new MSI should be deployed correctly through GPO.

-tigermatt
0
 
LVL 29

Expert Comment

by:matrixnz
Comment Utility
Can you tellus what the name of the application is that you're trying to install?
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Matrixn,

I could probably attach the program to this question but I think this is pretty much solved at this point. I have tried what you all have given me here on and it has succeded on 5 of 6 machines it was tested on. That should be good enough to warrant not spending any more time troubleshooting because once we do this on the rest we may not even have any issue with anymore. The only other thing that I can think of is that this machine was imaged with the setup from another machine without running sysprep maybe creating some kind of insufficient trust relationship with the domian??? I dont know... Thanks for all your help. You and tigermatt got me through a lot. Now I just have to figure out how to award the points.
0
 
LVL 58

Expert Comment

by:tigermatt
Comment Utility
Hi there,

Glad to hear it is eventually working! There is a section in the Experts-Exchange help guide specifically detailed on how to assign points to expert comments and accept as the solution. See the sections on closing questions at http://www.experts-exchange.com/help.jsp#hs7.

-tigermatt
0
 
LVL 1

Author Closing Comment

by:jbyrd1981
Comment Utility
You guys were awsome in answering this! We deviated from the orginal question a little but you guys stuck in there. I think that I may have figured out why we were having problems running this on that other mahcine. The machine was built using an image without sysprep being run. Could that be the issue?? It joins to the domain fine but has issues running all of the GPs, particularly this one. Anyway I hope that I have distributed the points fairly and thank you all again for all the help!
0
 
LVL 1

Author Comment

by:jbyrd1981
Comment Utility
Just an FYI,

It looks like there was a problem with the indel NICs and them talking to our routers and switches. This is why the RSOP was showing the error that it did. I had to go in there and change them from auto to 100MB Full Duplex. Once I rebooted the RSOP error went away. There were still some machines that would not install and I had to manually and remove the program and even delete the directory once the uninstall was done. Things should go a lot smoother next time since all the software was installed through the GP. Thanks again for all your guys help!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Change company name for 1000 users in AD 2 130
Lockdown of laptops 10 36
Server Login Issue 4 38
SolarWind and DNS Server 12 33
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Resolve DNS query failed errors for Exchange
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
Viewers will learn how to use the Hootsuite Dashboard.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now