View Full Version : Launch an URL at uninstall

02-03-2003, 06:34 PM

I want to launch IE with a specified URL when uninstalling. The purpose of this is mainly quality requirement. We want to know why people uninstall the product and ask them to tell us what to improve in future versions (or errors or issues they had when evaluating the product).

Do you have suggestions ?

Thanks in advance !

02-04-2003, 06:01 PM
I'm sure there is an easier way to do this but this is what pops to my head right now.

1. Create a text file named "Test.url" type the following inside it:


2. Add this file to the English node of "Setup Files" view
3. Add the following VBScript as a Custom Action

Dim WShell
Set WShell = CreateObject("WScript.Shell")
SupDir = Session.property("SUPPORTDIR")
FileLoc = SupDir & "\Test.url"
WShell.run FileLoc

02-04-2003, 07:00 PM
Thanks now I get an error when uninstalling and it's impossible to uninstall... It says there is an error in the script. The error is that i can't find the file. The file is in the setup dir, I verified.

How can i get out of this very unpleasant situation please ?

02-05-2003, 03:07 PM
Hello Again,

Please reply, we are completely blocked here.

Thanks !

02-05-2003, 03:56 PM
I finally found a way to "force" the uninstall and found what's the problem. When I add the uninstall.url file in English node, it doesn't add it as a file, but as a shortcut, so it resolve to the URL in it. It try to add the page that is on the website.

Any idea ?

02-05-2003, 06:24 PM
Sorry about that! That problem with the Setup Files View is pretty interesting. Here is something else I tried (that actually worked).

1. Add test.url to [WindowsFolder] in Files View
2. Set this file's Permanent property (so that remains even after your other files are removed)
3. Add the following VBScript as a Custom Action in the Uninstall Sequence

Dim WShell
Set WShell = CreateObject("WScript.Shell")
SupDir = Session.property("WindowsFolder")
FileLoc = SupDir & "Test.url"
WShell.run FileLoc

This worked for me. I tried putting the file in INSTALLDIR but the VBScript has problems resolving the path (probably because of spaces in the path name).

02-06-2003, 06:12 PM
I followed what you asked me to do, but the problem is that nothing seem to be executed...

I have no error.

I tried to change several settings, but nothing...

Any idea ?

02-07-2003, 06:32 AM
Ok I found the problem. For some reasons, I had to quit VS.NET.

But I have a quesiton :

How to tell the script to run at uninstall and not upgrade ?


02-07-2003, 06:08 PM
That might not be possible because an upgrade is essentially uninstalling the previous version. One thing you could do is associate this action with the "Setup Complete Success" dialog and disable the "Remove" button in "General Information" view. This way during an upgrade the file won't launch. During an uninstall user will HAVE to go through maintenance mode. This will launch the Setup Complete success dialog which will in turn launch the URL.

02-07-2003, 08:18 PM
So I must remove my msiexec /X{productcode} in my shortcuts too ?

02-11-2003, 09:54 AM
Can't you simply run a batch file that simply contains "start iexplore URL" ? (make the changes for a VB script). Maybe you need to work on this a bit, and it is a problem when users does not use IE as default browser (but this is a very common problem - URL-s starting in IExplore no matter what the default browser is).


02-11-2003, 06:45 PM
Windows Installer doesn't directly support batch files. SO you will be pretty much runnning a script that launches a batch file instead of a url file. If a bat file works however he pmengal can put this batch file in the "Setup Files" view and avoid the other problems he is having (like changing the way the uninstall behaves).