Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check DLL version and unregister DLL in VBS

Status
Not open for further replies.

jpbrassard

Programmer
Oct 6, 2001
60
US
I'm using InstallShield Express 3.5 to create a Windows Install package for a desktop app. This app uses a custom created DLL that's still in beta and goes through changes almost on a weekly basis. InstallShield lets you do "Custom Actions" through VBS, and my boss wants me to write a script that checks to see if our DLL is registered on the destination system, checks its version if it's there, and unregisters the DLL (regsvr32 /u) if its version is older than the one going to be installed. I've never done much work with the registry or VBS - I need help! Any assistance would be greatly appreciated.

Thanks,
Josh Brassard
 
Easiest way to implement the version check may be to just add a Version property, in some easily compared format like:

Major * 65536 + Minor * 256 + Patch

Then your script could CreateObject the object in your DLL and check the Version.

Now, assuming you're talking about an ActiveX DLL... you could make a simple VB ActiveX object that invokes the self-unregister entrypoint in your DLL. See KB article:

Q173407 - HOWTO: Register Your Custom ActiveX DLL from a Client

This tells how to call both self-reg and self-unreg.

Then use this component in your script.

Maybe others have a better idea?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top