0

I'm new to Installshield. In attempting to add a newly used library to the install project, I've found that it is seemingly adds two references every time during install, and only subtracts one on the uninstall, resulting in it getting left behind. I can see the count go from non-existence to 2 when I do the install. The method I used to add the library is the simple one of copying the DLL in question in the file system, and then selecting the Paste option on the context menu in the appropriate folder. I've verified that Shared is checked on the component, as with the other already extant files. And, past that, my experience is somewhat lacking. I have generated log files, both for the MSI and for the setup executable, but nothing is jumping out at me regarding that library name, either on install or uninstall. But, then again, I don't know what I don't know, as the saying goes.

Install - SetupMSI.log

  Line 863: MSI (s) (FC:8C) [16:38:55:215]: Component: SharpDX.Mathematics.dll; Installed: Absent;   Request: Local;   Action: Local
  Line 11983: MSI (s) (FC:8C) [16:39:17:285]: Executing op: ComponentRegister(ComponentId={913AD2F4-BC09-4D5E-AFB9-08877EE1FEAA},KeyPath=C:\Program Files\Company\Product\SharpDX.Mathematics.dll,State=3,,Disk=1,SharedDllRefCount=1,BinaryType=0)
  Line 11984: 1: {0CDD5F31-CE6E-433D-9BB6-31BB73DF15CE} 2: {913AD2F4-BC09-4D5E-AFB9-08877EE1FEAA} 3: C:\Program Files\Company\Product\SharpDX.Mathematics.dll 
  Line 17803: MSI (s) (FC:8C) [16:39:22:423]: Executing op: FileCopy(SourceName=SHARPD~4.DLL|SharpDX.Mathematics.dll,SourceCabKey=sharpdx.mathematics.dll,DestName=SharpDX.Mathematics.dll,Attributes=16384,FileSize=220672,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,Version=4.0.1.0,Language=0,InstallMode=58982400,,,,,,,)
  Line 17804: MSI (s) (FC:8C) [16:39:22:423]: File: C:\Program Files\Company\Product\SharpDX.Mathematics.dll;   To be installed;    Won't patch;    No existing file
  Line 17805: MSI (s) (FC:8C) [16:39:22:423]: Source for file 'sharpdx.mathematics.dll' is compressed
  Line 17806: InstallFiles: File: SharpDX.Mathematics.dll,  Directory: C:\Program Files\Company\Product\,  Size: 220672
  Line 18231: MSI (s) (FC:8C) [16:39:22:960]: Executing op: AssemblyPublish(Feature=AlwaysInstall,Component={913AD2F4-BC09-4D5E-AFB9-08877EE1FEAA}[~]2,AssemblyType=3,AppCtx=C:\Program Files\Company\Product\SharpDX.Mathematics.dll,AssemblyName=SharpDX.Mathematics,Version="4.0.1.0",PublicKeyToken="B4DCF0F35E5521F1",Culture="neutral",FileVersion="4.0.1.0",ProcessorArchitecture="MSIL",)
  Line 18231: MSI (s) (FC:8C) [16:39:22:960]: Executing op: AssemblyPublish(Feature=AlwaysInstall,Component={913AD2F4-BC09-4D5E-AFB9-08877EE1FEAA}[~]2,AssemblyType=3,AppCtx=C:\Program Files\Company\Product\SharpDX.Mathematics.dll,AssemblyName=SharpDX.Mathematics,Version="4.0.1.0",PublicKeyToken="B4DCF0F35E5521F1",Culture="neutral",FileVersion="4.0.1.0",ProcessorArchitecture="MSIL",)
  Line 18232: MsiPublishAssemblies: Application Context:C:|Program Files|Company|Product|SharpDX.Mathematics.dll, Assembly Name:SharpDX.Mathematics,Version="4.0.1.0",PublicKeyToken="B4DCF0F35E5521F1",Culture="neutral",FileVersion="4.0.1.0",ProcessorArchitecture="MSIL"
  Line 18233: MSI (s) (FC:8C) [16:39:22:960]: Note: 1: 1402 2: UNKNOWN\Installer\Assemblies\C:|Program Files|Company|Product|SharpDX.Mathematics.dll 3: 2 

Uninstall - SetupMSI.log

Line 494: MSI (s) (00:9C) [15:39:12:650]: Component: SharpDX.Mathematics.dll; Installed: Local;   Request: Absent;   Action: Null     
Line 1257: MSI (s) (00:9C) [15:39:13:306]: Executing op: AssemblyUnpublish(,,AssemblyType=3,AppCtx=C:\Program Files\Company\Product\SharpDX.Mathematics.dll,AssemblyName=SharpDX.Mathematics,Version="4.0.1.0",PublicKeyToken="B4DCF0F35E5521F1",Culture="neutral",FileVersion="4.0.1.0",ProcessorArchitecture="MSIL",Descriptor=M?N.'7gz[9hix1e`8%8k>gySbVDPar@wN}IS-}Jz_)     
Line 1258: MSI (s) (00:9C) [15:39:13:307]: Note: 1: 1402 2: UNKNOWN\Installer\Assemblies\C:|Program Files|Company|Product|SharpDX.Mathematics.dll 3: 2      
Line 1259: MSI (s) (00:9C) [15:39:13:307]: Note: 1: 1402 2: UNKNOWN\Installer\Assemblies\C:|Program Files|Company|Product|SharpDX.Mathematics.dll 3: 2 

Any insight on why this might be happening, or where I might look for more information?

Sean Duggan
  • 1,105
  • 2
  • 18
  • 48

2 Answers2

1

Does this happen on a clean snapshotted virtual machine?

Typically this happens when the test machine is dirty. If someone or something copied a DLL but never registered it as shared then MSI won't overwrite the file (if newer) and bump the count to 2. On uninstall it's decremented to 1 and the file is left behind because it is assumed it was there before it needs to be there after.

On a clean machine it should go to 1 then down to 0 and everything removed.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • That's one of the things I thought of, so I tried it on another machine with the same results. Also, I tried removing the registry entry for the file count before installing again, and still got 2 references after one install. – Sean Duggan Dec 19 '17 at 14:12
0

I regret to say that the this problem seems to have disappeared on its own. I cannot replicate it now. Possibly, I had a dirty build somewhere, which added two references, and upon further recompiles, I wound up with a clean build, but it seems that file got overwritten. I will update this question if something new arises.

Sean Duggan
  • 1,105
  • 2
  • 18
  • 48