PDA

View Full Version : silent mode in uninstall?



Enigmaaa
09-04-2006, 01:21 PM
Hello,
I would like to know how can i uninstall programs in Setup Factroy installer in silent mode, i have this uninstall string in registry:
"C:\Windows\MyProduct\uninstall.exe" "/U:C:\Program Files\MyProduct\MyProduct.xml"
What do i need to Add/remove so the unistallation will be completly silent?
i have tried the /S switch but it didnt work!
Thanks for the help!

Tek
09-04-2006, 02:21 PM
This is how I do silent uninstalls. I'm sure there are other similar ways to do this.

First, check the attached screenshot to enable silent uninstalls for your project. It is located in 'Uninstall > Settings'.

Second, add code to the following sections.

On 'On Startup':


sUninEXEPath = SessionVar.Expand(_WindowsFolder.."\\%ProductName%\\uninstall.exe");
sUninXMLPath = SessionVar.Expand("%AppFolder%\\irunin.xml");
sSUF7UninCLA = SessionVar.Expand("\"/U:"..sUninXMLPath.."\" /S".."\"");
sWinUninPath = SessionVar.Expand(_WindowsFolder.."\\%ProductName%");


On 'On Pre Install':


-- Check for the existence of a Setup Factory 7 installation and silently uninstall first
SUF7UninXMLExist = File.DoesExist(sUninXMLPath);
if SUF7UninXMLExist then
File.Run(sUninEXEPath, sSUF7UninCLA, sWinUninPath, SW_SHOWNORMAL, true);
end


When a new installer is run, it checks to see if a previous installer for that product exists. If it does, it is silently uninstalled first and then the new version is installed.

I hope this helps you.

Enigmaaa
09-04-2006, 02:36 PM
First thing, Thank you for your fast answer!
Hmm i'm not currently scripting a setup factory installers
Im trying to research about setup factory 7.0's silent uninstallers,
so... what exactly should i write in the registry/command line so this will uninstall silently (if it is available)
Thanks again for your effort!

Tek
09-04-2006, 03:11 PM
I don't understand what you're asking. Others can correct me if I'm wrong but I believe the installer has to be built with support for silent uninstalls in the first place. That is enabled with the checkbox in the screenshot I provided.

Second, the run command is there to do it. You run the uninstall.exe file with the command line arguments in the variable I posted called 'sSUF7UninCLA'. It would be the same as typing this at the command prompt:



C:\WINDOWS\ProductName>uninstall "/U:C:\Program Files\ProductName\irunin.xml" /S

Enigmaaa
09-05-2006, 01:09 AM
Thanks again for your fast answer, and sorry for my bad english :(
i was looking for that silent command you have just givven,
Thank you very much, and have a good day;)