CodeItBetter Programming Another VB Programming Blog

How to Register/unRegister the DLL/OCX programmatically

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'System & API - How to Register/unRegister the DLL/OCX programmatically
Public Sub RegComponent(ByVal ComName As String, ByVal sRegister As String)
    Shell ("Regsvr32 " & ComName & sRegister)
End Sub
 
'How can I call this function:
'Call RegComponent(sExePath & "\Report.dll", " /u /s")
'Call RegComponent(sExePath & "\Report.dll", " /s")
'Call RegComponent(sExePath & "\Mscal.ocx", " /u /s") 'unregister
'Call RegComponent(sExePath & "\Mscal.ocx", " /s") 'register, "/s" - silent switch mode

'NOTE: You can manually register a component by going to START | RUN and
'typing in "Regsvr32.exe" and the name of component -- in quotes, full path,
'as string. For example: Regsvr32.exe "C:\Windows\System32\mscomctl.ocx"

Related posts:

  1. How to Register and Unregister activeX dll’s and ocx’s from app when needed
  2. How to Register/Unregister ActiveX Controls using Regsvr32.exe
  3. How to to register (or unregister) a COM component
  4. How to register file types
  5. How to connect Internet programmatically (in two ways)
  6. How to handle Size & Position of Console Application with Windows Application in VB6
  7. How to Dis-connect Internet programmatically (in two ways)
  8. How to get special folders
  9. How to Show/Hide the Start Button from the task bar
  10. How to Start another program using Shell and wait until it finishes.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.