/build/static/layout/Breadcrumb_cap_w.png

Msiexec & Psexec Unistall problem

Hi Peeps,
Just started using PSEXEC with msiexec to start automating some package updates that we have to do on a regular basis...

So far I can Install the apps with no Hassle using the following

c:\PSTOOLS\psexec \\%rempc% -u xxxxx -p xxxxx -w "c:\temp" msiexec /i "ConsumptionAdministrator-2.0.6.msi" ALLUSERS=1 /qb
pause

however the problem being I have to UINSTALL the software first before applying the new install

I am using the following to try and uninstall on MY PC as new test

c:\PSTOOLS\psexec \\%rempc% -u xxxxx -p xxxxx -w "c:\temp" msiexec /uninstall "ConsumptionAdministrator-2.0.6.msi" /qb

however it says "this action is only valid for products installed"

If I try it in the remote system the same error comes up in the cmd window but slightly different "this installation package could not be opened.....error 1619"

I had a read around and also tried the GUID instead of the package installer name but hit the same problem. I am launching the bat files as domain admin and running the psexec stuff on the remote machine as the local admin...

not sure if I hit a dodgy mis package or what but thought this could be the place to find out whats going on, thanks

I am using PSEXEC version 1.98.0.0 too !

0 Comments   [ + ] Show comments

Answers (3)

Posted by: anonymous_9363 13 years ago
Red Belt
0
- any decent package (MSI) should already cater for uninstalling/upgrading older versions. There should be no requirement to explicitly uninstall these first.
- normally, that error occurs if the package was originally installed per-user and an uninstall is attempted by an admin account. The perceived wisdom is that such packages can only be uninstalled using the account which originally installed it but you can bypass that by removing the registry data which records the application's managed status.
- lastly, you should include the full path to the MSI in your command line. The lack of a path is why you see 1619 when executing locally.
Posted by: technotika 13 years ago
Senior Yellow Belt
0
thanks!

"removing the registry data which records the application's managed status"

which part of the reg is it please VBSCAB?
Posted by: anonymous_9363 13 years ago
Red Belt
0
That's the kind of information I'd expect a packager to know, that's why I didn't include it.

It's not particularly straightforward, as the ProductCode is stored in the tree as a packed GUID so you need code to pack and unpack those, too. The list of keys I compiled for building my MSIZap clone includes:'HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\Managed\{usersid}\Installer\Features\[Packed GUID]
'HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\Managed\{usersid}\Installer\Products\[Packed GUID]
'HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\Managed\{usersid}\Installer\UpgradeCodes\[Packed GUID], [Packed GUID]
'HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\{usersid}\Components
'HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\{usersid}\Products\[Packed GUID]
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ