Post a reply to the thread: Custom Uninstall failure
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
Will turn www.example.com into [URL]http://www.example.com[/URL].
Re: Custom Uninstall failure Does this help? Yes, your instructions helped. Thank you.
Re: Custom Uninstall failure
Re: Custom Uninstall failure IMO, the task is not complex at all. "New Project..." | "Uninstall Include Script...". Then add whatever you would like to do in your custom uninstall. The IDE generates all the default script lines for you in the standard custom uninstall. Add this newly created uninstall .sbi to your main script, compile and you are done. Very often, adding lines to the uninstall .log is simply not enough. You can use ALL script functions (except Install Files of course) in a custom uninstall. Similar to the attached... Just let me know if you need more help. Friedrich
Re: Custom Uninstall failure Hello, You have to add your uninstall (.sbi) script to your MAIN .sbp project and then compile. Or send me your main .sbp and I'll do it for you. Does this help? Friedrich
Custom Uninstall failure All I wish to do is instruct the uninstaller to remove a few files that will exist in a folder which were not present during the installation. These would be scratch files that did not exist during the install. I am used to Wise Install permitting the developer to insert a line of code into the install.log which would easily perform this task, but with SetupBuilder, the task seems overly complex. As per the sbuilder.pdf, I tried to follow the instructions on creating a custom uninstall script. The instructions seem lacking in detail. I can't even get the following script to compile. SB10Dev generates a "Unable to compile an Include script" message with the following code: Code: #pragma UNINSTALL = "1" If %_SB_INSTALLERFLAG% Does Not Equal "1" on Position "$SB_SILENTMODEFLAG$" Then Display Message Box "#UNINST_CONFIRM#" -- "#UNINST_HEADING#" Else Set Variable %_SB_RETURN% to "$IDYES$" End If %_SB_RETURN% Equals "$IDYES$" Then ! --- Process uninstall queue --- /* Delete Files "%_CSIDL_LOCAL_APPDATA%\[PRODUCTNAME]\zipcodes.ndx" */ /* Delete Files "%_CSIDL_LOCAL_APPDATA%\[PRODUCTNAME]\zipdiffs.ndx" */ /* Delete Files "%_CSIDL_LOCAL_APPDATA%\[PRODUCTNAME]\zipdiffs.dbf" */ Process Uninstall Queue If %_SB_ERRORCODE% Equals "0" And %_SB_INSTALLERFLAG% Does Not Equal "1" on Position "1" Then Display Message Box "#UNINST_FINISH#" -- "#UNINST_HEADING#" End Else /* Display Message Box "SKIPPED\n\n%_CSIDL_LOCAL_APPDATA%\[PRODUCTNAME]\zi..." -- "SKIPPED" */ End The sbuilder.pdf makes no mention whether variables defined in the install script are accessible in the uninstall script. I don't know if [PRODUCTNAME] is valid, even if I were to un-comment the commented out lines above. Moreover, the sbuilder.pdf file does explain how a custom uninstall script (even if it were to compile successfully) gets linked to the install project. How does the install project know that a separately compiled uninstall script is supposed to be relevant and linked to the final deployment?
Custom Uninstall failure
#pragma UNINSTALL = "1" If %_SB_INSTALLERFLAG% Does Not Equal "1" on Position "$SB_SILENTMODEFLAG$" Then Display Message Box "#UNINST_CONFIRM#" -- "#UNINST_HEADING#" Else Set Variable %_SB_RETURN% to "$IDYES$" End If %_SB_RETURN% Equals "$IDYES$" Then ! --- Process uninstall queue --- /* Delete Files "%_CSIDL_LOCAL_APPDATA%\[PRODUCTNAME]\zipcodes.ndx" */ /* Delete Files "%_CSIDL_LOCAL_APPDATA%\[PRODUCTNAME]\zipdiffs.ndx" */ /* Delete Files "%_CSIDL_LOCAL_APPDATA%\[PRODUCTNAME]\zipdiffs.dbf" */ Process Uninstall Queue If %_SB_ERRORCODE% Equals "0" And %_SB_INSTALLERFLAG% Does Not Equal "1" on Position "1" Then Display Message Box "#UNINST_FINISH#" -- "#UNINST_HEADING#" End Else /* Display Message Box "SKIPPED\n\n%_CSIDL_LOCAL_APPDATA%\[PRODUCTNAME]\zi..." -- "SKIPPED" */ End
Forum Rules