Old 13th March 2017, 12:46   #1
kalverson
Senior Member
 
Join Date: May 2007
Location: Maple Grove, Minnesota
Posts: 124
Question Waiting for uninstaller

I have an application which is rebranded and will run under a new path. However, the database still has some of the old paths stored (in customers data). The simple solution is to run a batch file that creates symbolic links to point the old path to the new path. This works fine when done manually after an install has completed. I have found that trying to create the symbolic links at the end of an install sometimes results in the silent uninstall also done near the end - taking out just installed files in the new path. Is there a way to schedule a batch process that will run after the install and silent uninstall of old application is completed such that there won't be any overlap?

Last edited by Anders; 16th March 2017 at 16:07. Reason: Changed title
kalverson is offline   Reply With Quote
Old 13th March 2017, 13:14   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,610
Are you waiting correctly for the uninstaller before creating the symlinks?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th March 2017, 14:41   #3
kalverson
Senior Member
 
Join Date: May 2007
Location: Maple Grove, Minnesota
Posts: 124
I used ExecDos synchronous but I think the process is launched anyways and returned to the installer before it completes the remove of all folders and files. Possibly using Exec instead might work.
kalverson is offline   Reply With Quote
Old 13th March 2017, 19:06   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,610
Use execwait and the special _?= parameter from the documentation.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 16th March 2017, 15:32   #5
kalverson
Senior Member
 
Join Date: May 2007
Location: Maple Grove, Minnesota
Posts: 124
Thank you so very much Anders. The execwait and _?= parameter did work to complete the uninstall before they symbolic links were created. It all works as it should now. Your a life saver
kalverson 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