- NSIS Discussion
- How to call uninstall of redistribute of VC++ on NSIS
Archive: How to call uninstall of redistribute of VC++ on NSIS
sunlight112
31st October 2006 09:39 UTC
How to call uninstall of redistribute of VC++ on NSIS
Please help me!
I have to install vcredist_x86.exe instead of .net framework.
When I create uninstall, I can not know exactly HKLM of vcredist_x86.exe .
I also use regshot to find them but the end I can not
This is one of uninstall content of regshot file which I get it.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\AuthorizedCDFPrefix: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\Comments: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\Contact: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\DisplayVersion: "8.0.50727.42"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\HelpLink: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\HelpTelephone: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\InstallDate: "20061031"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\InstallLocation: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\InstallSource: "C:\DOCUME~1\DUONGP~1\LOCALS~1\Temp\IXP000.TMP\"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\ModifyPath: "MsiExec.exe /X{A49F249F-0C91-497F-86DF-B2585E8E76B7}"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\NoModify: 0x00000001
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\NoRepair: 0x00000001
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\Publisher: "Microsoft Corporation"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\Readme: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\Size: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\EstimatedSize: 0x00001448
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\UninstallString: "MsiExec.exe /X{A49F249F-0C91-497F-86DF-B2585E8E76B7}"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\URLInfoAbout
: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\URLUpdateInfo: ""
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\VersionMajor: 0x00000008
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\VersionMinor: 0x00000000
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\WindowsInstaller: 0x00000001
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\Version: 0x0800C627
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\Language: 0x00000000
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}\DisplayName: "Microsoft Visual C++ 2005 Redistributable"
In my code I also use:
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
ReadRegStr $R0 HKLM \
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\unvcredist_x86" \
"UninstallString"
StrCmp $R0 "" end done
done:
ExecWait '$R0_?=$INSDIR'
IfErrors end
end:
FunctionEnd
The name of uninstall on VCREDIST_X86, I do not know, so i can not call them, so I only use this
unvcredist_x86. I hope it is true.Uninstall vcredist_x86 is not uninstalled when I uninstall my program.
Please help me!!
Thank a million!!!!
kichik
31st October 2006 10:13 UTC
You shouldn't start deleting files and registry keys from your installer. If you've used their installer to install, you should use their uninstaller to uninstall.
The key name under Uninstall is {A49F249F-0C91-497F-86DF-B2585E8E76B7}, as you can easily see from the RegShot log you've posted. You should execute the string there as is. It's not a NSIS uninstaller, so _?= won't work.
Note that these files are used by many applications and not just by yours. You should be absolutely sure that uninstalling this will not cause other programs to suddenly stop functioning. I don't think the uninstaller keeps a reference count and only uninstalls the files once all programs using it are uninstalled. Even if it did, I'm sure there are other programs that skip executing vcredist_x86.exe, if they find the files they need.
sunlight112
31st October 2006 11:00 UTC
Thank Kichik for your quickly reply,
My application is coded on VC++, so I need vcredist_x86 to redistribute these DLL which VC++ to support.Consequently, If I uninstall vcredist_x86, I am sure the other program is not influently.
I used to think the same way which you give, and I do it but I can not run and display some error and run my uninstall and vcredist_x86 is not uninstalled
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
ReadRegStr $R0 HKLM \
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}" \
"UninstallString"
StrCmp $R0 "" end done
done:
ExecWait '$R0=$INSDIR'
IfErrors end
end:
FunctionEnd
I think I have problems with ExecWait. Actually, I do not know how to call their uninstaller.
If someone know, please help me!!
Thank alot,
I also enclose file error when I use above command
kichik
31st October 2006 11:31 UTC
How can you be so sure it won't influence other programs? Other programs are built with VC++ as well.
As I said in the last reply, remove _?=. It's not a NSIS uninstaller.
sunlight112
1st November 2006 01:23 UTC
Please help me!!
Thank kichik a lot,
Kichik posted
How can you be so sure it won't influence other programs? Other programs are built with VC++ as well.
As I said in the last reply, remove _?=. It's not a NSIS uninstaller.
I am sure about it because I use to install vcredist_x86.exe in my computer which It does not install .net framework, my application work well. When I uninstall vcredist_x86 on Control Panel -->Add/Remove Program.., the other application still run well. At that time, my application is uninstalled.
I understand your idea but I do not know how to call uninstall vcredist_x86 :(
Command
remove _?= I see on Wiki link
this link which it shows me how to uninstall program on computer.
I only want to know how to uninstall VC redistribute if we do not know exactly place which uninstall file is put.
Normally,If I want to uninstall programs, I can find folder which store file uninstall or on Control Panel.
Although on Control Panel, redistribute is displayed but I do not know place which file uninstall is set on which folder in my computer.
Thank you for your help,
kichik
1st November 2006 09:27 UTC
The link you've posted is only for NSIS uninstallers. You are not dealing with a NSIS uninstaller here. Remove _?= and simply ExecEait $R0.
As for the redistributable not being used by other programs, that might be the case on your computer. But what happens if you install two programs that require the redistributables? I'm not talking about your specific case. You have to think about the general case.
sunlight112
1st November 2006 11:32 UTC
Thank Kichik for your reply,
I think your idea may be right on the other case. Because I think when I set up program for user, I must uninstall all applications which I install on that computer. So, I am trying to find a method which I can uninstall vcredist_x86. I think when I call uninstall vcredist_x86,if it supports for the other program on that computer, It will display information and abort this process. At that time, I do not need to uninstall it and finish my uninstall.
My problem here is I do not know how to call uninstall of vcredist_x86.Actually, I do not know vcredist_x86 's uninstall is stayed where???So I could not call it.
I hope Your idea can help me solve this problem!!!!
Thank a lot,
kichik
1st November 2006 11:34 UTC
Just use
ExecWait $R0
No _?=, no nothing. Just that.
Joost Verburg
1st November 2006 11:35 UTC
If you don't want to use the Microsoft installer you can put the run-times in the application folder along with Microsoft.VC80.CRT.manifest with the following contents:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright © 1981-2001 Microsoft Corporation -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable/>
<assemblyIdentity
type="win32"
name="Microsoft.VC80.CRT"
version="8.0.50608.0"
processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"
/>
<file name="msvcr80.dll"/>
<file name="msvcp80.dll"/>
<file name="msvcm80.dll"/>
</assembly>
sunlight112
1st November 2006 11:50 UTC
Thank Kichik and Joost Verburg a lot,
I have one more question.
May I ask this question wrong forum but it has just appeared on my mind.
If I used vcredist_x86 (my framework at that time version 2.0) on my installer, in the future, dotnetfx appear version 3.0. The user install vcredist_x86 with new version (overwrite the old version), what happen with my application?
May my application run with it???
Sorry, this is a thought which I have just had.
If you can answer me, I thank your idea too much.
Once again,
Thank alot for your hellp,
Joost Verburg
1st November 2006 16:19 UTC
The CRT is unrelated to the .NET framework. You also won't have any version conflicts, the manifests handle all these things.
sunlight112
2nd November 2006 01:40 UTC
Thank Joost Verburg for your reply,