Link to home
Start Free TrialLog in
Avatar of dungla
dunglaFlag for Viet Nam

asked on

How to unregister dll automatically when reached a specifi date/time?

Hi all,

I've developed a dll by programming with VB6 named "MyDLL.dll" and also register to system by calling "regsvr32 D:\mydll.dll". I just want to know how can i unregister it in programming VB. Here is the scenario:

After 4 days since register the dll, i want to dll will unregister itself from system? How can i do that?
Avatar of Marv-in
Marv-in

you cant have your dll unregister automatically - but you can have it check the datediff of when it was installed and when its being accessed.

you can store the install date in the registry to check on access or in a text file.
ASKER CERTIFIED SOLUTION
Avatar of JohnBPrice
JohnBPrice

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can unregister it in code by shelling regsvr32 like so - Shell "regsvr32.exe MyDLL.dll" & Space(1) & "/u  /s"
Avatar of dungla

ASKER

LizelleFan,

I have only one file, is the DLL file, how can I make it run the shell code automatically?

JohnBPrice:
Thank for your solution
Oops! Guess I read the question too quickly. Hope the other solution works!