Şu kodlarım PsiExec yerine SetACL.exe kullanalım string tempExePath =…
Jump to turn (9)
- 1Şu kodlarım PsiExec yerine SetACL.exe kullanalım string tempExePath = Path.Combi
- 2Admin yetkisi değil TrustedInstaller yetkisi ile yapmalı
- 3Önem Derecesi Kod Açıklama Proje Dosya Çizgi Gizleme Durumu Ayrıntılar Hata CS01
- 4Namespace ismin QuickOptimizer olmalı ve setAcl.exe dosyaso Files kalöründe usin
- 5Error: ERROR in command line: Invalid entry in a parameter option -ownr specifie
- 6Şöyle bir örnek kullanım gördüm bunu uygular mısın SetACL can be used to take ow
- 7ExecuteSetAcl de void Main( içinde kullan
- 8şu hata verdi Error: ERROR in command line: Invalid option specified: -! Type 'S
- 9tamam ben sorunu çözdüm de yetkileri aldıktan sonra da şu reg kaydını eklesin Wi
- User
Şu kodlarım PsiExec yerine SetACL.exe kullanalım string tempExePath = Path.Combine(Path.GetTempPath(), "PsExec64.exe"); using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("QuickOptimizer.Files.PsExec64.exe")) using (var fileStream = new FileStream(tempExePath, FileMode.Create, FileAccess.Write)) { stream.CopyTo(fileStream); } Process processStart = new Process(); processStart.StartInfo.FileName = tempExePath; processStart.StartInfo.Arguments = @"-i -s reg add ""HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"" / v ""ConsentPromptBehaviorAdmin"" / t REG_DWORD / d 0 / f"; processStart.StartInfo.UseShellExecute = false; processStart.StartInfo.RedirectStandardOutput = true; processStart.StartInfo.RedirectStandardError = true; processStart.Start(); processStart.WaitForExit();
string output = processStart.StandardOutput.ReadToEnd(); string error = processStart.StandardError.ReadToEnd();
if (!string.IsNullOrEmpty(error)) { Console.WriteLine("Error: " + error); }
- Assistant