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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Register a dll with code 2

Status
Not open for further replies.

SerialCoder

Programmer
Joined
Oct 18, 2002
Messages
95
Location
US
I'm a beginer here....

I wrote a program that uses the FSO to copy some files from a network server into the client machine that running the exe. after the filecopy is complete, I need to register a few of the dll's that were copied. I used to do this with a bat file but need to use VB now for more control.

I cant figure out how (with code) to issue the regsrv32 command on the dll's

I appreciate any help.

Regards,
Dave
 
Try this
'=========================================================
retVal = Shell("C:\Windows\System\regsvr32 " & FileName, vbNormalNoFocus)
'=========================================================

You will also have to do some coding to find out the winsys path, if u dont want it hardcoded. There are many other ways, including some pretty

**********************************************************
or this

Declare Function DllRegisterServer Lib "ComCtl32.OCX" () As Long


Declare Function DllUnregisterServer Lib "ComCtl32.OCX" () As Long
Const ERROR_SUCCESS = &H0

If DllRegisterServer = ERROR_SUCCESS Then
MsgBox "Registration Successful"
Else
MsgBox "Registration Unsuccessful"
End If

' To unregister your OCX use this function:

If DllUnregisterServer = ERROR_SUCCESS Then
MsgBox "UnRegistration Successful"
Else
MsgBox "UnRegistration Unsuccessful"
End If

**********************************************************
or check this link
All the Best
Praveen Menon
pcmin@rediffmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top