I tried another way from the setup project
View --> Editors --> Adding Keys in HKEY_CLASSSES_ROOT
scriptletfile scriptletfile
-->Shell
-->Register
-->Command
-->Add String Value (its name: REGSVR32, Value: "C:\WINDOWS\system32\REGSVR32.EXE" /i:"%1" "C:\WINDOWS\system32\scrobj.dll")
But when I build and Install the setup.exe nothing added to registry
Do anyone have an Idea to add dll into registry without appearing of MessageBox?
Thank You in advance
Ok, there is actually a program that could help you deal with this. The name of that software is RegCure. It typically repairs corrupt dll file associations in the windows registry automatically. But if you prefer the manual way, they also have step by step
instruction on how to work on with registry dll.
Shaimaa Moha...
Member
3 Points
33 Posts
Adding DLL to registry
Dec 22, 2008 11:01 AM|LINK
I have a setup project and there is a dll needed to be added into the registry
When I write the following code:
//********* Registration to dll FileStream fs_cmd = new FileStream(Application.StartupPath + "\\Register.vbs", FileMode.Create); StreamWriter sw_cmd = new StreamWriter(fs_cmd); sw_cmd.WriteLine("Set WshShell = CreateObject(\"WScript.Shell\") "); sw_cmd.WriteLine("WshShell.Run chr(34) & " + "\"" + Application.StartupPath + "\\Register.bat\"" + "& Chr(34), 0"); sw_cmd.WriteLine("Set WshShell = Nothing"); sw_cmd.Close(); fs_cmd.Close(); File.WriteAllText(Application.StartupPath + "\\Register.bat", "regsvr32.exe " + Application.StartupPath + "\\TextExtractor.dll"); System.Diagnostics.Process.Start (Application.StartupPath+"\\Register.vbs"); //************************************the dll added to registry (under hkey_classes_root --> scriptletfile --> Shell --> Register --> Command ) but ther is messagebox appears says that:
DllRegisterServer in C:\Inetpub\wwwroot\FileSearch_ABS\bin\TextExtractor.dll succeeded
its name: REGSVR32
type: REG_SZ
data: "C:\WINDOWS\system32\REGSVR32.EXE" /i:"%1" "C:\WINDOWS\system32\scrobj.dll"
I tried another way from the setup project
View --> Editors --> Adding Keys in HKEY_CLASSSES_ROOT
scriptletfile scriptletfile
-->Shell
-->Register
-->Command
-->Add String Value (its name: REGSVR32, Value: "C:\WINDOWS\system32\REGSVR32.EXE" /i:"%1" "C:\WINDOWS\system32\scrobj.dll")
But when I build and Install the setup.exe nothing added to registry
Do anyone have an Idea to add dll into registry without appearing of MessageBox?
Thank You in advance
SGWellens
All-Star
126031 Points
10310 Posts
Moderator
Re: Adding DLL to registry
Dec 22, 2008 12:49 PM|LINK
Add /s to the RegSvr32 command, that will put it in silent mode.
Type RegSvr32 /? to get a list of all the flags.
My blog
Shaimaa Moha...
Member
3 Points
33 Posts
Re: Adding DLL to registry
Dec 22, 2008 01:08 PM|LINK
Where is this command written?
What is RegSvr32? What is silent mode?
Where to type (RegSvr32 /?) ?
SGWellens
All-Star
126031 Points
10310 Posts
Moderator
Re: Adding DLL to registry
Dec 22, 2008 01:31 PM|LINK
It's in the code in your original post:
Here:
File.WriteAllText(Application.StartupPath + "\\Register.bat", "regsvr32.exe " + Application
And Here:
(its name: REGSVR32, Value: "C:\WINDOWS\system32\REGSVR32.EXE" /i:"%1" "C:\WINDOWS\system32\scrobj.dll")
A command window (also called a Dos prompt) or from the Start->Run window.
My blog
Shaimaa Moha...
Member
3 Points
33 Posts
Re: Adding DLL to registry
Dec 23, 2008 05:59 AM|LINK
I don't understand
what to write exactly and where ?
is this true?Note:
the file Register.bat contains the following code:
cannot
Member
4 Points
2 Posts
Re: Adding DLL to registry
Sep 14, 2009 09:50 AM|LINK
To fix DLL error, using Registry Easy is a great choisce.
Download Registry Easy now.
techieguy22
Member
2 Points
1 Post
Re: Adding DLL to registry
Oct 09, 2010 09:02 AM|LINK
Ok, there is actually a program that could help you deal with this. The name of that software is RegCure. It typically repairs corrupt dll file associations in the windows registry automatically. But if you prefer the manual way, they also have step by step instruction on how to work on with registry dll.