+ Reply to Thread
Results 1 to 6 of 6

Thread: Silent Uninstall requiring reboot

  1. #1

    Default Silent Uninstall requiring reboot

    During an update to a new version, our installer uninstalls any previous version found on the machine. We want to do this silently since we don't want the user to have the option not to uninstall the previous version or anything. To do this we pass the "/S" switch to the uninstall program. What we have found is that the uninstall sometimes produces a pending file deletion operation that is then completed the next time the computer is rebooted. Is there some flag or return code that can be checked after the Uninstall program runs to determine if one of these pending operations has been queued?

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Silent Uninstall requiring reboot

    Hi Mark,

    the uninstall only asks for a reboot if one or more files to be uninstalled are in-use (locked) during the uninstallation process.

    You have several different options. What about the following: you can write a custom uninstall to have full control over the uninstallation process. Then, at the end of your custom uninstall, check the reboot status of the uninstaller (Get System Info -> Reboot Status; a return code of "1" means that a reboot is required) and write it to a specific location. Then read the value from your installer (after the call to the uninstall operation).

    Or use the "Get Pending File Operations..." script function from your setup.exe before and after the uninstall process. This should tell you if a new file deletion operation is pending.

    Does this help?

    Friedrich

  3. #3
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Silent Uninstall requiring reboot

    And I have more options available to handle this. If you need help or a demo project, just let me know.

    Friedrich

  4. #4

    Default Re: Silent Uninstall requiring reboot

    Ok, so if "Get Pending file Operations" is greater than 0 after the Uninstall, then some file(s) are pending deletion?

  5. #5
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Silent Uninstall requiring reboot

    Hi Mark,

    if the function succeeds, the %_SB_ERRORCODE% return value is nonzero and contains the number of found items. If you check this before running the uninstall and it returns a value >0 then the pending file operations are from another install / uninstall.

    BTW, I have another idea on how to handle your scenario. If you are interested, I can develop and upload a quick demo.

    Friedrich

  6. #6

    Default Re: Silent Uninstall requiring reboot

    Sure you can show me your other idea as well.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •