Solved Opening another program?

Discussion in 'Rust Development' started by Ts3hosting, Dec 7, 2017.

  1. Is there a way to open a file with in the plugin. i have tried .
    Code:
    Process notePad = new Process();
    notePad.StartInfo.FileName   = "notepad.exe";
    notePad.StartInfo.Arguments = "mytextfile.txt";
    notePad.Start();

    But i get
    Code:
    Failed to call hook 'cmdates' on plugin 'Open v1' (UnauthorizedAccessException: System access is restricted, you are not allowed to use System.Diagnostics.Process)
     
  2. Wulf

    Wulf Community Admin

    On the server: no, that is blocked in plugins for security purposes. Plugins accessing the system outside of the server itself is bad as it could be used maliciously (whether accident or not), especially in a shared environment. If you want full system access, you can write an extension, but most hosts are very selective on allowing those, but if self-hosting or hosting locally this would likely be what you'd want.

    On the client: no, the server cannot control the client like this.