Can I pass user defined parameter to uninstaller.exe?



  • Avatar

    The uninstaller does not accept custom command line flags but you could wrap it in a bat file that will define the options as environment variables, and then use them inside the uninstaller as ${env(SOME_VAR)}. For example, if you want to call the uninstaller as:

      uninstaller savePreferences saveDocs

    You could create a bat file uninstaller.bat:

       echo off
       set savePreferences=%1
       set saveDocs=%2
  • Avatar
    Adam Johnson

    Just in case others search for this and find this posting, can the "persist" flag on setinstallervariable allow this to work. For example we are using a flag to reboot the computer on uninstall and would like to specify that during uninstall using the command line.


Please sign in to leave a comment.