Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- regasm your.dll /codebase
- $a = New-Object -comobject Your.Utils.Logging
- $a.WriteError2("Application", "hello",1,1)
- Set logger = CreateObject("Your.Utils.Logging")
- logger.WriteError2 "Application", "hello from vbs",1,1
- // bind a variabe to WScript.Shell
- Set WshShell = CreateObject("WScript.Shell")
- // define the path to the regasm.exe file
- RegAsmPath = "c:WindowsMicrosoft.NETFrameworkv2.0.50727RegAsm.exe"
- // register the dll
- WshShell.run "cmd /c " & RegAsmPath & " c:tempcbsecurity.dll /codebase /nologo /s", 0, True
- // bind a variable to the dll
- Set cbUtil = CreateObject("CBSecurity.Utilities")
- Public Function IsAlive() As Boolean
- Return True
- End Function
- //check if dll is available to your code
- msgbox "cbUtil is alive: " & cbUtil.IsAlive
Add Comment
Please, Sign In to add comment