-
How do I do that? I'm building an auto update feature for my program, and after download, the dll's must be registered. I could use a shell command to use regsvr32 but then I'd get those darn "DLL registered successfully" messages.
What I would need is some function where you'd supply the full path and name of the DLL to register it, since I can't know now what all the dll's will be called.
//Anders
-
-
Ok, but I don't know the names of the variables on forehand. Will it work to replace the "MyDll.Dll" thingies with variables? I'm not that good with API's... yet.
//Anders
-
Yeah, you just replace "MyDll.Dll" with the Dll that you want to register.
-
Hmm, not exactly what I meant. I'll explain further.
When compiling the program, I don't know the names of the DLL's to be registered. I tried substituting the "MyDll.dll" for a variable but that doesn't work.
Do you understand what I mean? English is nit my first language...
//Anders
-
I think I understand..you want to register a bunch of Dlls?
You can use RegSvr32.exe and make it silent so that there are no messages.
Here are its options:
Code:
Usage: regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname
/u - Unregister server
/s - Silent; display no message boxes
/c - Console output
/i - Call Dllinstall passing it an optional [cmdline]; when used /u calls dll unistall
/n - do not call DllRegisterServer; this option must be used with /i
And shell it:
Code:
Shell "regsvr32 /s "C:\Windows\System\Mydll.dll", vbHide
To list all dlls from the Window\System folder:
Code:
Dim FileFinder
FileFinder = Dir("C:\Windows\System\*.dll")
Do Until FileFinder = ""
List1.AddItem LCase(FileFinder)
FileFinder = Dir
Loop
-
Lovely! That's what I need. Thanks!
//Anders