Archive: Uninstaller taking out system files


Uninstaller taking out system files
The two files comdlg32.ocx and msstdfmt.dll are required for VB6 and also are in the deployment package for my prog.
Thanks to the Nuttall VB6 to NIS Converter, I am as far as I am but these two files are not being incremented on install apparantly.

in the install section.....
ReadRegDWord $Version HKLM "Software\VBGenerator\Pgm" Version
IfErrors new_installation <errors? why not 0>
StrCpy $ISeeIt 1
new_installation....
!insertmacro InstallLib REGDLL $ISeeIt REBOOT_PROTECTED \
"Support\COMDLG32.OCX" "$SysDir\COMDLG32.OCX" "$SysDir"
..and for MSSTDFMT.DLL

then in the Uninstall section....
!insertmacro UnInstallLib REGDLL SHARED REBOOT_PROTECTED "$SysDir\COMDLG32.OCX"
..and for MSSTDFMT.DLL

The removal details show the DLL and OCX each being unregistered and then deleted.

A leg up on this will be greatly appreciated.
tcfred


Do you properly delete that registry key in the uninstaller? If it stays there, future installers will not increment the share count because they'd think an installer for an older version has already done so for them.


The uninstall registry folder was in fact intact after the uninstallation process. Should the Uninstaller section have this line added?
DeleteRegKey HKLM "Software\\Micr...\Uninstall\MyProg"
...to get rid of the folder that remains?
There is also a curious line in the UnInstall details window "Could not find symbol: DllUnregisterServer.

tcfred


Yes, you must use DeleteRegKey in the uninstaller.

The DllUnregisterServer line means you've tried to unregister a DLL that doesn't require registration.


Outstanding. I will fix it up tonight. Thank you for your kind assist.

tcfred


I ran Uninstaller from Add/Remove
MSSTDFMT.DLL, COMDLG32.OCX were again removed from System32 folder.

Add/Remove entry is eliminated. OK
Registery folders properly removed.
StartMenu /MyProg folder is still present but is empty.
Program Files /MyProg folder contains only uninstaller.
_____________
Reboot
StartMenu folder still there & empty
Program Files/MyProg folder still there with uninstaller.
_____________
I can't see anything in the code that would cause the 2 files to get removed but I am assuming that the installmacros would increment the file count for the 2 DLLs. Could it be that my problem is really with the VB6 Service Pack 6 installation that I am doing to replace the 2 files, and this is not incrementing the related registry from 0 to 1 so when I remove my program, the system thinks that my prog is the only one using them?

My script is attached if you could see anything else or can see why the SM folder and Program File folder/ uninstaller are not deleting.

I'm getting this gradually.

tcfred


StartMenu folder still there & empty
Program Files/MyProg folder still there with uninstaller.
Did you add at the bottom of uninstall section,
RmDir "$SMPROGRAMS\Myprog"
Delete "$INSTDIR\unistaller.exe"
RmDir "$INSTDIR"

tcfred, it's probably because previous uninstallers have already eliminated the reference count for those files. After installing your application again, manually increment the reference count. Then, when you uninstall, the files won't be removed because the reference count won't yet be zero.