/build/static/layout/Breadcrumb_cap_w.png

Shared dll (RefCount)

Hi,

Been a while since my last posting, and as always your help is appreciated.

I have been given an .msi that I am trying to tailor with a transform, but I have a problem with it's uninstall that i'm hoping for some help with.

If I install my app, and then uninstall it, everything is removed correctly, and the app behaves as it should.

If I install an older version of my app, then install my new version, it upgrades the old version to the new one. If I then uninstall my new version, it leaves 1 dll file behind in the INSTALLDIR.

After a bit more digging I have found that it is related to the Shareddll reference count. When the app is upgraded the count on this .dll is increased to 2, hence on the uninstall it still has a reference count of 1 and is not uninstalled. During A standard install the ref count is just 1 so the file is uninstalled as expected.

Is there a way to tell my app that it does not need to increase this count on an upgrade? I am using Wise Packaging Studio, and there is a tickbox for 'Always increment shared .DLL count' that is ticked, but if I untick this box will the dll stop reference counting all together?

Thanks in Advance,

Gary.

0 Comments   [ + ] Show comments

Answers (14)

Posted by: anonymous_9363 14 years ago
Red Belt
0
That's odd...

Where is the RemoveExistingProducts action in the sequence?
Posted by: beefy66 14 years ago
Orange Belt
0
It is at number 1410, between InstallValidate and InstallInitialize
Posted by: mekaywe 14 years ago
Brown Belt
0
Component GUID have to be same for that particular file in both versions of application.
This will resolve your problem
Posted by: beefy66 14 years ago
Orange Belt
0
Thanks Mekaywe,


I have just checked the GUIDS for this component and they are the same in both versions. The content of the components is different though, The old version has a component error(it has no keypath)with a single file in it, where as the newever version has this same file and a removefile item, and it has the filke as a keypath. I dont know whether this would effect it's behaviour?
Posted by: cygan 14 years ago
Fifth Degree Brown Belt
0
just a quick note

your components must have exactly the same resources ie regkeys or files if you want to enable refcount

GUID must be the same

COMPA COMPB

name.dll version1 name.dll version 2
Posted by: mekaywe 14 years ago
Brown Belt
0
does the component has 24 attribute in Older version ?
Posted by: shweta_kar 14 years ago
Blue Belt
0
Hi,

Create a VBS file say 'CleanUp.vbs' & add below script to it . & make this file as permanent.

Const ForWriting = 2
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFile = fso.OpenTextFile("C:\Program Files\CleanUp.vbs", ForWriting, True)
oFile.WriteLine "on error resume next"
oFile.WriteLine "CreateObject(""WScript.Shell"").Regdelete ""HKCU\Software\Microsoft\Office\11.0\Excel\Options\Open"""

Note: In my case addin was not getting removed due to the entry HKCU\Software\Microsoft\Office\11.0\Excel\Options\Open,hence it has been deleted.
Also the cleanUp.vbs is kept directly under program files, it just an e.g. I suggest that keep the file under program files\app name folder.

Script to be used in CUSTOM ACTION
Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\<appname>\StubPath", "cscript.exe ""C:\Program Files\CleanUp.vbs""", "REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\<appname>\Version", "1,0,0,0", "REG_SZ"
Posted by: anonymous_9363 14 years ago
Red Belt
0
Once again, I'm afraid, we have here a display of ignorance about how XL add-ins are set up in the registry.

Your code works fine PROVIDED that the add-in recorded in the 'OPEN' value is the only add-in present. If it's not, your code will remove some other add-in. This is not a way to endear yourself to your users: they get a bit annoyed by things like that.

Search AppDeploy for 'add-in' and read the myriad of posts on the subject.

Then, take a look at the posts in this thread: how does your response marry up in any way to any of them? :)
Posted by: beefy66 14 years ago
Orange Belt
0
mekaywe, my component has an attibute of 8 in the old versions component.

Im not sure how this helps me out shweta_kar/VBScab - The software I am on about is called QPulse, it has nothing to do with Excel or Microsft Add-Ins etc.
Posted by: mekaywe 14 years ago
Brown Belt
0
hmm... even Im wondering how this app is related to ADD-IN

Just a try.... remove keypath for the component in the current version of your application n give a try... Not sure what the result will be :)
Posted by: anonymous_9363 14 years ago
Red Belt
0
I'm sorry but why would you think removing the key path would help?

@OP, the '8' means that the file will be reference-counted. See here for details.
Posted by: beefy66 14 years ago
Orange Belt
0
***Update***

I tried removing the removefiles entry from the component and this has made no difference, however when I removed the keypath so that the component was broken, it worked. The component now has exaclty the same content in bothe the old and new version (except of courase, the .dll is a newer version and file size in the newer install).
Posted by: anonymous_9363 14 years ago
Red Belt
0
Now that you have removed the key path, that file will not be repaired. Sub-optimal.
Posted by: beefy66 14 years ago
Orange Belt
0
I know, thanks for the help yet again

Until next time....
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ