In application B I have this code in the [Run] section:
Filename: "{dotnet40}\regasm.exe"; \
Parameters: "/u PTSTools_x86.dll"; \
WorkingDir: "{app}"; \
Flags: runhidden; \
Check: FileExists(ExpandConstant('{app}\PTSTools_x86.dll')); \
AfterInstall: DoDeleteFile(ExpandConstant('{app}\PTSTools_x86.dll'))
Filename: "{dotnet4064}\regasm.exe"; \
Parameters: "/u PTSTools_x64.dll"; \
WorkingDir: "{app}"; \
Flags: runhidden; \
Check: IsWin64 and FileExists(ExpandConstant('{app}\PTSTools_x64.dll')); \
AfterInstall: DoDeleteFile(ExpandConstant('{app}\PTSTools_x64.dll'))
I used to use those DLL files in application B but no longer need to. So I performed the above to "unregistered and get rid of them". That is OK in itself. BUT ...
I have application A which DOES use them! So, in its [Run] section it does have:
Filename: "{dotnet40}\regasm.exe"; \
Parameters: "PTSTools_x86.dll /codebase"; \
WorkingDir: "{app}"; \
Flags: runhidden
Filename: "{dotnet4064}\regasm.exe"; \
Parameters: "PTSTools_x64.dll /codebase"; \
WorkingDir: "{app}"; \
Flags: runhidden; \
Check: IsWin64
Now, the two applications are independent of each other. A user may have one, the other or both.
- If they only have application B then it can unregister and delete the obsolete DLL files.
- If they also have application A installed, then, the obsolete DLL files only need to be deleted because application A would have registered them in its folder.
Can do I perform this selection uninstallation behaviour?