![]() |
#1 |
Senior Member
Join Date: Jul 2008
Posts: 157
|
![]()
I came across this problem while testing the uninstall part of an NSIS script:
Despite not changing anything in the -un.post section that takes care of removing all Start Menu entries: PHP Code:
So, I decided to place a MessageBox line right after the 'RMDir $MUI_TEMP' line: PHP Code:
PHP Code:
Most importantly: How would you suggest that I solve (or workaround) this problem? Thanks! |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
ExecWait ALWAYS waits, I have not seen a single case yet where it is actually broken (and it will probably never happen, it is just WaitForSingleObject on a process handle) If you think it does not wait, the command you are executing is probably wrong (Or it spawns subprocesses and has no option to wait on them)
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Member
Join Date: Jun 2006
Location: Austria
Posts: 92
|
Hello nsnb
Anders is right with is assumption, vc_redist spawns his own process actually I don't understand what you try to achieve with your command with your command you decompress the contents of vc_redist, there you start again a vc_redist where you decompress the contents and start the MSI installer!!! so there are probably 3 childprocess spawend! I simply use '"$TEMP\VS2008_SP1_vcredist_x86.exe" /q' if a real feedback for the user is needed you should install the redistributable files manually decompress the content and add it file by file to your installer. Also I wouldn't uninstall the VC redist Because other programms installed after your application my depend on it!! so your uninstaller will probably break other apps! Last edited by thek; 28th June 2010 at 16:07. Reason: further information found |
![]() |
![]() |
![]() |
#4 | |
Senior Member
Join Date: Jul 2008
Posts: 157
|
![]()
Thank you Anders and thek for your answers.
Quote:
After experimenting with this a little more, I discovered that the MessageBox actually solves the problem... This is not practical of course for the real installer, so I wonder what types of workarounds can I come up with? Perhaps placing a delay of several hundreds milliseconds? |
|
![]() |
![]() |
![]() |
#5 | |
Senior Member
Join Date: Jul 2008
Posts: 157
|
![]() Quote:
PHP Code:
Suggests a timing problem? |
|
![]() |
![]() |
![]() |
#6 |
Senior Member
Join Date: May 2005
Posts: 119
|
We have unpacked the vcredist.msi and vcredist.cab files and ExecWait the following:
vcredist.msi /passive /norestart That works for us. |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Join Date: Jul 2008
Posts: 157
|
![]() Quote:
As I described above, testing for errors after RMDir $MUI_TEMP solves the (timing) problem, so I am able to deliver a working uninstaller using Microsoft's required method. |
|
![]() |
![]() |
![]() |
#8 |
Senior Member
Join Date: May 2005
Posts: 119
|
Well, we got the instructions on how to extract the two files from within the redist from an MSDN blog article. We have shipped 2 retail products like this. I cannot see how this could violate a MS EULA. All we are doing is unpacking an archive we are NOT redistributing the actual VC runtime files themselves.
|
![]() |
![]() |
![]() |
|
Tags |
$smprograms, execwait, uninstall, windows 7 |
Thread Tools | Search this Thread |
Display Modes | |
|
|