The windows_package
resource from the Windows cookbook also supports an installer type of :nsis
(Nullsoft Scriptable Installer System) and states in the README:
For proper idempotence the resource’s package_name should be the same as the ‘DisplayName’ registry value in the uninstallation data that is created during package installation. The easiest way to definitively find the proper ‘DisplayName’ value is to install the package on a machine and search for the uninstall information under the following registry keys:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall
HKEY_LOCAL_MACHINE\Software\Wow6464Node\Microsoft\Windows\CurrentVersion\Uninstall
That is, the provider will check for uninstall data in the Registry and not install the package again if it finds it. Seems like that should do what you want.
-Matt Moretti
Sean,I'm not sure if there's a windows command line argument for idempotency, however within your resource you can add a "not_if file exists" (not the correct syntactic btw) & just check to see if the folder created within Program Files or whatever the default location is for your executable exists. If the folder exists, it won't install again.Hope this helps,Ben
Sent from my iPhoneHi All,
I’m in a situation where I need to run an executable (a nulsoft installer fyi) to install a product silently on windows.
What is the best way of running an executable with commandline arguments so the install is idempotent?
Kind regards
Sean.
Archive powered by MHonArc 2.6.16.