Reply to Thread

Post a reply to the thread: Silent Uninstall requiring reboot

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 12-28-2018, 10:55 AM
    MarkDynna

    Re: Silent Uninstall requiring reboot

    Sure you can show me your other idea as well.
  • 12-28-2018, 10:33 AM
    linder

    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
  • 12-27-2018, 03:02 PM
    MarkDynna

    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?
  • 12-27-2018, 12:19 PM
    linder

    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
  • 12-27-2018, 12:05 PM
    linder

    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
  • 12-27-2018, 10:36 AM
    MarkDynna

    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?

Posting Permissions

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