I m facing a problem.
i have forgotten what is the way to register dll in Application Directory on
Form Load Event ....
Thx in Advance
Printable View
I m facing a problem.
i have forgotten what is the way to register dll in Application Directory on
Form Load Event ....
Thx in Advance
Use the windows directory, for xp, it is like this:
VB Code:
shell "c:\windows\system32\regsvr32 myapp.dll"
Quote:
Originally Posted by dglienna
Sorry DG it is not working ..
Is there any way that i can put my DLL in resource file so that it will also become safe from renaming or such type of other issues ...?
Here take at look at this http://www.vbforums.com/showthread.php?t=337846
What i exactly want is that
When i will give source code + DLL to others
Then they should not place this dll in System32 and then Project | Reference | Blah Blah...
I want to facilitate them without any headache and my program should automatically look in Application folder for given name of DLL and then register it .. without telling user about that....
I hope you put the .exe on the regsvr32 :eek: I forgot it, as it runs from the run command.
You could try this. I did, and it registered my dll.
VB Code:
Option Explicit Private Sub Form_Load() Shell "C:\Windows\System32\regsvr32.exe C:\Windows\System32\myapp.dll " End Sub
Quote:
Originally Posted by dglienna
But there is one problem ...
It displays Msg Box about Registration of DLL ...
it will disturbs my user.... :ehh:
Add /s after "C:\Windows\System32\regsvr32.exe", should work..
So like
VB Code:
Shell "C:\Windows\System32\regsvr32.exe /s C:\Windows\System32\myapp.dll"
I think you have a typo, except that you did the same thing twice :eek:
VB Code:
Shell "C:\Windows\System32\regsvr32.exe /s C:\Windows\System32\myapp.dll"
Where the /s is SILENT
Yeah thanks for correcting that :)
vbPoet,
That is not a good idea, unless the dll/ocx/exe you are registering are of your own making. The reason being that if you re-register a file that is already on the system you will replace it with yours, and you know what happens if you load an dll that the user has been using and then their apps stop working and yours is the only one that does work?