-
Üyelik
20.07.2014
-
Yaş/Cinsiyet
27 / E
-
Meslek
Webmaster
-
Konum
Ankara
-
Ad Soyad
M** K**
-
Mesajlar
2074
-
Beğeniler
60 / 532
-
Ticaret
10, (%100)
Programa eklediğin DLL eğer ihtiyac varsa zaten çalışması gerekir ama illa ben register etmek istiyorum diyorsan alltaki metodu kullanabilirsiniz parametre olarak DLL pathini vermen yeterli DLL pathi programın çalıştığı dizinden veya kendi istediğin bir konumdan verebilirsin orası sana kalmış
public static void Registar_Dlls(string filePath)
{
try
{
//'/s' : Specifies regsvr32 to run silently and to not display any message boxes.
string arg_fileinfo = "/s" + " " + "\"" + filePath + "\"";
Process reg = new Process();
//This file registers .dll files as command components in the registry.
reg.StartInfo.FileName = "regsvr32.exe";
reg.StartInfo.Arguments = fileinfo;
reg.StartInfo.UseShellExecute = false;
reg.StartInfo.CreateNoWindow = true;
reg.StartInfo.RedirectStandardOutput = true;
reg.Start();
reg.WaitForExit();
reg.Close();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
1 kişi bu mesajı beğendi.