c# Run ein console program in ein winforms program as admin.

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • c# Run ein console program in ein winforms program as admin.

      Deutsch
      Hallo,


      Ich habe eine Konsole-Anwendung, die sendkeywait verwendet, um in eFlyff Chat, indem sie Argumente mit ihr Typ.
      Wie: FlyffCommandApi.exe "chat", "FLYFF" "Quget" "Hallo" "3" "Eine riesige Liste"
      Er wird sagen: Hallo zusammen 3 mal ingame :) Es funktioniert.
      Aber wenn ich es Rinne laufen meine WinForms-Anwendung soll ich einen unbekannten invissable Fehler. Erst wenn Gameguard läuft. Zu umgehen, dass Sie als Administrator werden rannte müssen. Aber meine Konsole-Anwendung scheint nicht das zu tun: (Ich habe bereits das Manifest Dinge right.This ist das, was ich habe.


      Ich weiß, es wurde getestet alles :/
      Es funktioniert auf Notizbuch harten ohne gg Lauf.

      PHP-Quellcode

      1. public void CommandApiInit() { procInfo.CreateNoWindow = true; procInfo.UseShellExecute = true; procInfo.RedirectStandardOutput = false; procInfo.FileName = @"FlyffCommandApi.exe";//exe"; procInfo.Verb = "runas"; // procInfo.WorkingDirectory = Environment.CurrentDirectory; commandApiProg.StartInfo = procInfo; }
      2. public void startApi(string args) { procInfo.Arguments = args; procInfo.Verb = "runas"; commandApiProg.StartInfo = procInfo; try { commandApiProg.StartInfo.Verb = "runas"; commandApiProg.Start(); commandApiProg.WaitForExit(); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }



      English
      Hi,

      I made a console application which uses sendkeywait to typ in eFlyff chat by getting arguments with it.
      Like : FlyffCommandApi.exe "chat" "FLYFF" "Quget" "Hi there" "3" "A huge list"
      It will say Hi there 3 times ingame :) It works.
      But when I want to run it trough my winforms application I get a unkown invissable error. It is only when Gameguard is running. Too bypass that It need to be ran as admin. But my console application doesn't seem to do that :( I already did the manifest things right.This is what I have.

      I know it was testing everything :/
      It works on notepad tough without gg running.

      PHP-Quellcode

      1. public void CommandApiInit() { procInfo.CreateNoWindow = true; procInfo.UseShellExecute = true; procInfo.RedirectStandardOutput = false; procInfo.FileName = @"FlyffCommandApi.exe";//exe"; procInfo.Verb = "runas"; // procInfo.WorkingDirectory = Environment.CurrentDirectory; commandApiProg.StartInfo = procInfo; }
      2. public void startApi(string args) { procInfo.Arguments = args; procInfo.Verb = "runas"; commandApiProg.StartInfo = procInfo; try { commandApiProg.StartInfo.Verb = "runas"; commandApiProg.Start(); commandApiProg.WaitForExit(); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }



      ps
      The english section won't work -.-"
    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )