Hi,
I need to register an ocx on user's PC through VB program. The process is as follows:
1) Find the user's Windows System folder
2) Copy the ocx to the Windows System folder
3) Register that ocx
I can do the first 2 with no problems but I can't register the ocx in the Windows System folder, it will always register the copy where I ran the program (i.e. instead of registering C:\Windows\System\swflash.ocx, it will register C:\temp\swflash.ocx where I am running the program). How do I specify the path of the Windows System folder without hardcoding it?
Public Declare Function RegMyServerObject Lib _
"swflash.ocx" _
Alias "DllRegisterServer" () As Long
I need to register an ocx on user's PC through VB program. The process is as follows:
1) Find the user's Windows System folder
2) Copy the ocx to the Windows System folder
3) Register that ocx
I can do the first 2 with no problems but I can't register the ocx in the Windows System folder, it will always register the copy where I ran the program (i.e. instead of registering C:\Windows\System\swflash.ocx, it will register C:\temp\swflash.ocx where I am running the program). How do I specify the path of the Windows System folder without hardcoding it?
Public Declare Function RegMyServerObject Lib _
"swflash.ocx" _
Alias "DllRegisterServer" () As Long