/build/static/layout/Breadcrumb_cap_w.png

How can I manually register a DLL with a CustomAction?

I'm repackaging MSDN98 for VB6. I've come across a DLL which refuses to self-register and causes silent installation to fail. Therefore I removed the offending DLL from the Selfreg table which allows for a successful installation.

Which leads me to the question: how do I register the DLL manually? I can't do <DLL> /regserver, but regsvr32 <DLL> works. How do I translate the latter to a customaction? I tried a type 34 pointing the source to system32 and the target regsvr32.exe <DLL>, but installation just froze upon executing the CA.

Thanks

0 Comments   [ + ] Show comments

Answers (9)

Posted by: wiseapp 18 years ago
Second Degree Green Belt
2
Hi Meas:

In that case you could probably write a vbscript that shall do the task and then include it within your package, A sample VBScript is enclosed here in:

On Error Resume Next
'Setting tool and paths
strComputer = "."
Set ObjRegistry = GetObject("winmgmts:{impersonationLevel = impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strRegsvr = "regsvr32.exe"
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run(strRegsvr& " C:\vmmreg32.dll")'the name of the dll can be changed here. Please keep a space between the quote and the path of the dll.

I hope this would definitely help.
Posted by: MSIPackager 18 years ago
3rd Degree Black Belt
0
Personally I'd snapshot the manual registration and add the resulting reg info to your package - that way you get a clean uninstall. Have a look at WiseComCapture to make this even easier...

Selfreg is generally regarded as bad practice [X(]

Cheers,
Rob.
Posted by: wiseapp 18 years ago
Second Degree Green Belt
0
Hi Meas:

You could run write a Wise Script that shall register the dll, just call the Execute Program in Wise Script Editor and then register the same and then call this compile wise script in your MSI.
In case you require more help do let me know.
Posted by: meastaugh1 18 years ago
Senior Purple Belt
0
Should have mentioned that I'm not using Wise. Am just using Wininstall LE 2k and Orca.

I'll try the suggested capture of registration, but haven't always had success with this in the past.
Posted by: MSIPackager 18 years ago
3rd Degree Black Belt
0
Yeah that would do it if you want to use a script but note that if the path to the DLL has spaces (e.g. C:\Program Files\Etc\Etc) then the last line should read:

WshShell.Run(strRegsvr& """ C:\Program Files\Etc\Etc\vmmreg32.dll""")

You need to quote your quotes [:D]


Cheers,
Rob.
Posted by: wiseapp 18 years ago
Second Degree Green Belt
0
Hi Rob:

Forgot to write the same[:'(] thanks for reminding[:)]
Posted by: MSIPackager 18 years ago
3rd Degree Black Belt
0
No problem Bhupesh - you did all the hard work [;)]

Cheers,
Rob.
Posted by: meastaugh1 18 years ago
Senior Purple Belt
0
Ahh, so it needs triple quotes? I tried adding another set of quotes when it was trying to locate C:\Program but that threw up another error. I'll try with the three quotes.

Thanks all for your help. I'll give it another go.
Posted by: wiseapp 18 years ago
Second Degree Green Belt
0
Hi Rob:

That was'nt[;)] hard at all,lol[;)] anyways thanks for the votes (I hope that was from your side?)
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ