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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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.
Answered 05/05/2011 by: VBScab
Red Belt

Please log in to comment
0
thanks!

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

which part of the reg is it please VBSCAB?
Answered 05/05/2011 by: technotika
Senior Yellow Belt

Please log in to comment
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]
Answered 05/05/2011 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity