Old 27th March 2003, 06:34   #1
vpoptom
Junior Member
 
Join Date: Mar 2003
Posts: 2
Uninstall and Add/Remove Programs

My uninstaller is quite simple and works great if it is called directly. But if I access it via Add/Remove Programs, it still works but it freezes the Add/Remove Programs window. I am using ExecWait in the un.onUninstSuccess function to fire up Internet Explorer with a specific URL after the uninstaller completes. If I remove that portion, all works fine. And again, it works fine if called directly, even with the ExecWait call. But that bloody Add/Remove Programs window freezes up on me if I launch IE at the end.

UPDATE:
Here is the basic uninstall instruction:

Section "Uninstall"
call "un.CloseIE" ; Kill all running IE's
UNRegDLL "$INSTDIR\my.dll"
DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProg"
DeleteRegKey HKLM SOFTWARE\MyProg"
SectionEnd

Function "un.onUninstSuccess"
ExecWait "$PROGRAMFILES\Internet Eplorer\iexplore.exe http://www.me.com"
FunctionEnd


Uninstall occurring on WinXP and built using NSIS v1.9

Any suggestions?
Thanks,
-tom

Last edited by vpoptom; 27th March 2003 at 07:32.
vpoptom is offline   Reply With Quote
Old 27th March 2003, 12:02   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
If you are using ExecWait the installer will wait until you close the Internet Explorer window and so will the add/remove control panel as it's waiting for the installer. You should use ExecWait "open" "http://www.me.com". This command will not make the installer freeze and will call the user's default browser which will be a bit nicer then forcing him to use IE. If you want to force IE use Exec instead of ExecWait, it should work too.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 27th March 2003, 15:26   #3
vpoptom
Junior Member
 
Join Date: Mar 2003
Posts: 2
I couldn't get ExecWait "open" to work and simply using Exec was causing the same problem. But I did find a solution based on your answer:

ExecShell open "http://www.me.com"

It indeed opens the user's default browser but that is a better way to go.

Thank you very much!

-tom
vpoptom is offline   Reply With Quote
Old 27th March 2003, 15:36   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Heh, meant ExecShell

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 13th January 2010, 00:04   #5
jdt2oo7
Member
 
Join Date: Oct 2009
Posts: 72
I ran into the same issue. I just created a sample script to verify the solution posted on this thread, but it doesn't allow me to do anything until I close the internet browser (this was on XP).

On Vista, I click on another application under Add/Remove window then select to uninstall. A message "Please wait until the current program is finished..." is displayed.

===

Function un.onUninstSuccess
HideWindow
ExecShell open "http://www.yahoo.com"
FunctionEnd
jdt2oo7 is offline   Reply With Quote
Old 13th January 2010, 01:03   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
as usual, blame MS for this, they are using a job object to wait for all child processes started by the main uninstaller

To work around it, try http://nsis.sourceforge.net/Escape_A...th_New_Process but I think the name of the job object has changed, so you might have to use Process Explorer to find the name and adapt the code

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th January 2010, 19:09   #7
jdt2oo7
Member
 
Join Date: Oct 2009
Posts: 72
Hi Anders,

I have no idea "the name of the job object" that you mention. What should I look for using Process Explorer? Thank for your help!
jdt2oo7 is offline   Reply With Quote
Old 13th January 2010, 21:34   #8
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
The lower pane, it should be listed as a handle (there is also a job tab in the properties for the process, not sure if the name is listed there)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 17th January 2010, 07:22   #9
jdt2oo7
Member
 
Join Date: Oct 2009
Posts: 72
Don't see it with Process Explorer.
The name of the job object should be "ARP Job", I see that in the function. Another forum also says that:

http://community.flexerasoftware.com...d.php?t=181670

Anyone has any idea why it's not working?
jdt2oo7 is offline   Reply With Quote
Old 17th January 2010, 09:08   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Well, either the job name is wrong, or the security for the object is locked down (To find the job object, you look for the handle in the lower pane for the add/remove process, not "your" process)

The other option is to use a out of process COM object, that way you don't have to deal with job objects at all (But you would have to register this COM object etc)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump