Reputation: 383
I'm registering a dll at startup of my application by this command:
System.Diagnostics.Process.Start("regsvr32",strPath);
and after running this line of code , a window appears that says DLL registration was successful or not .
My question is that how can I hide this window in my application?
Upvotes: 3
Views: 3770
Reputation: 15573
Process proc = new Process
{
StartInfo =
{
FileName = "regsvr32",
Arguments = "/s" + strPath,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
}
};
proc.Start();
Also you can do this:
System.Diagnostics.Process.Start("regsvr32","/s" + strPath);
Upvotes: 4
Reputation: 4280
Use /s – Silent; display no message boxes (added with Windows XP and Windows Vista)
option.
Source: What is the different between /n and /i parameters of RegSvr32.exe?
Upvotes: 3