Re: [wpkg-users] Check command
Thanks Rainer for your hints. Using the batch file sound lkike a better idea to make sure all old version of Acrobat reader is remove. Just one more question. Removing Acrobat reader or any programs. I've notice with Acrobat Reader it needs msiexec /x {x} Where {} is a long idea code, where can I get the id code from I've checked registry. Also, is it possible to msiexec /x acrobat? Also at the same time I want to remove Acrobat.com Acrobat air,? Is they a command that removed file as listed in the Add/remove control panel? Thanks again Dan At 16:14 11/06/2009, Rainer Meier wrote: Hi, Please respond to the list as well, so everybody can see your answers and might profit from the open discussions. ds10...@cam.ac.uk wrote: I think I began to understand what is going on. If I want WPKG to remove old version of Acrobat reader first. I put the remove command as before the install command? Yes, exactly. But remember that for most applications this is not necessary because the installers are intelligent and will perform an upgrade if they find an outdated version. So in most cases just running the same command as for installation works for upgrades too. But feel free to execute as many (remove-) commands before executing the installation process. One more hint: You might have to specify exit code='x' / nodes for your remove commands which are likely to fail. For example if you add a command to remove Adobe reader 5.0 (msiexec /x {ID} /qn) it might exit with a specific exit code that it was unable to execute the command (in case reader 5.0 was not installed). You might also use a batch-script to batch-uninstall all previous versions. For example add a command to execute uninstall-previous-versions.cmd and add all commands to this script like... @echo off :: removing Reader 5.0 msiexec /x {x} /qn :: removing Reader 6.0 msiexec /x {y} /qn ... exit /b 0 One example of a bad installer is the old Java installer. It left all versions on the system and you had to manually remove old versions in case you want to get rid of the binaries on the HDD. br, Rainer - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Check command
Hi, ds10...@cam.ac.uk wrote: Where {} is a long idea code, where can I get the id code from I've checked registry. If you still have a machine where this old version is installed you can grab the uninstall code from its uninstall entry within the registry: For example on my system I found it here: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1033-7B44-A911} It needs some explanations I guess... The Wow6432Node sub-key is only there if you use a 64-bit system. On such systems all 32-bit HKLM\SOFTWARE\* entries are re-located to that sub-key. So on your 32-bit system it will be here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1033-7B44-A911} The best way to find it is to go to the enclosing Uninstall key and then search for a string as it appears within the control-panel. You should end up finding the DisplayName entry within the corresponding key. Then have a look at the UninstallString. This is the uninstall command-line used if you click remove within the control-panel - add/remove software. Sometimes there is a QuietUninstallString entry too which already contains the values to silently uninstall the application. This value usually can be used 1:1 within a remove command in WPKG. Also the UninstallString can usually be transformed into a silent uninstaller by adding some commands. Most uninstallers support an option like -s or /s to run it silently. In case of Adobe Reader it looks as follows on my system... UninstallString: MsiExec.exe /I{AC76BA86-7AD7-1033-7B44-A911} As you can see the command-line contains the correct ID to uninstall it and can be easily transformed into a silent uninstall string: MsiExec.exe /x {AC76BA86-7AD7-1033-7B44-A911} /qn It depends on the application packager which key is chosen. In case of Adobe Reader this key unfortunately changes with each release or patch. This means you really need to know all of them - or guess them by naming scheme (have a look at the latest part of the ID, it includes the version of the reader). Also, is it possible to msiexec /x acrobat? No. You have two possibilities to use msiexec or software uninstall. Either you have to specify the ID (as above) or you have to refer to the MSI package. So for Adobe Reader the following works: MsiExec.exe /x {AC76BA86-7AD7-1033-7B44-A911} /qn MsiExec.exe /x \\path\to\AcroRead.msi /qn Also at the same time I want to remove Acrobat.com Acrobat air,? I don't have Acrobat.com and Acrobat Air installed but I guess they will create their own Uninstall entry. If there is one follow the procedure above to find its ID in order to uninstall it. Personally I preferred to extract the Adobe installer and then use the Adobe Customization Wizard 9 to modify some parameters (like disabling all online features) so Acrobat.com does not get installed at all. Download it from: http://www.adobe.com/support/downloads/detail.jsp?ftpID=3993 it will generate some MST transform file, then you can use msiexec /i \\path\to\AcroRead.msi /qn TRANSFORMS=\\path\to\AcroRead.mst /update \\path\to\AdbeRdrUpd912_all_incr.msp In order to install Adobe Reader 9 using the transform created with the wizard and directly apply the latest 9.1.2 patch. Somebody might find some time to add this to the WPKG wiki... Is they a command that removed file as listed in the Add/remove control panel? The control panel does not list files. It lists installed programs - there is one entry for each entry within the registry key I referred to on top. And there is no way to uninstall these entries silently - only the ones having a QuietUninstallString might work but it's more an exception than the default that applications specify a QuietUninstallString. So it's not possible to automatically read the necessary commands from the registry. As you can see from the Adobe Reader example Adobe does not even use the correct 'msiexec /x ...' syntax for uninstall - they use the install syntax (msiexec /i ...) instead. This will make you enter the installation routine when you click the remove button within the control panel. In case of the Adobe installer this will show you an option to modify or to remove the reader (maybe also to repair it). The same effect you get if you try to (re-)install the reader by running the installer again. br, Rainer - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Check command
Hi ds10025 ds10...@cam.ac.uk wrote: Does the check command behave like a while loop. I'm trying to understand the flow of the script. Like WolframAlpha is used to say... I am not sure what do do with your input. ;-) Each package can define one or more checks. Checks can be combined using logical AND/OR conditions. Surely there is an internal loop evaluating the statements. The most common use-case of WPKG is to synchronize software. Which means WPKG figures out which packages are assigned to this host (via profiles) and then uses the checks of each package to find out if it is properly installed or not. If it is not installed, then it will be installed and if the checks are true then the package considered to be already installed correctly. br, Rainer - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Check command
Thanks Rainer I'm writing a script for Acrobat reader security updates using examples suplied. It need to look like:- While latest version of Acrobat reader is NOT install Remove old version Install new version Install any patches Endwhile Cobverting this into WPKG XML If the check is false how best to group codes together? Dan At 13:41 11/06/2009, Rainer Meier wrote: Hi ds10025 ds10...@cam.ac.uk wrote: Does the check command behave like a while loop. I'm trying to understand the flow of the script. Like WolframAlpha is used to say... I am not sure what do do with your input. ;-) Each package can define one or more checks. Checks can be combined using logical AND/OR conditions. Surely there is an internal loop evaluating the statements. The most common use-case of WPKG is to synchronize software. Which means WPKG figures out which packages are assigned to this host (via profiles) and then uses the checks of each package to find out if it is properly installed or not. If it is not installed, then it will be installed and if the checks are true then the package considered to be already installed correctly. br, Rainer - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Check command
Hi, Please respond to the list as well, so everybody can see your answers and might profit from the open discussions. ds10...@cam.ac.uk wrote: I think I began to understand what is going on. If I want WPKG to remove old version of Acrobat reader first. I put the remove command as before the install command? Yes, exactly. But remember that for most applications this is not necessary because the installers are intelligent and will perform an upgrade if they find an outdated version. So in most cases just running the same command as for installation works for upgrades too. But feel free to execute as many (remove-) commands before executing the installation process. One more hint: You might have to specify exit code='x' / nodes for your remove commands which are likely to fail. For example if you add a command to remove Adobe reader 5.0 (msiexec /x {ID} /qn) it might exit with a specific exit code that it was unable to execute the command (in case reader 5.0 was not installed). You might also use a batch-script to batch-uninstall all previous versions. For example add a command to execute uninstall-previous-versions.cmd and add all commands to this script like... @echo off :: removing Reader 5.0 msiexec /x {x} /qn :: removing Reader 6.0 msiexec /x {y} /qn ... exit /b 0 One example of a bad installer is the old Java installer. It left all versions on the system and you had to manually remove old versions in case you want to get rid of the binaries on the HDD. br, Rainer - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users