none
Run a registry file on the Server, by using the web application with another computer RRS feed

  • Question

  • Hi! I have a problem, I have managed to run a Registry file using the code below, but this only works if this application is being used locally, if someone uses this web application through another computer, the Registry file is not executed.

    I need it to execute it on the Actual Server where the Web Application is Published while using another computer, is that possible?

    Currently I'm using the following code:

    Process _process = Process.Start("regedit.exe", "/s " + HttpContext.Current.Server.MapPath(_filePathStr));
    _process.WaitForExit();

    I have already given all the needed permissions to read and write to all important users.

    Thank you in advance!

    Best regards,

    Tiago Almeida.

    • Moved by CoolDadTx Wednesday, August 22, 2018 3:25 PM ASP.NET related
    Wednesday, August 22, 2018 11:24 AM

All replies

  • You can run that program at the command prompt locally with no problems. You can't do it from a Web program, becuase it's in another environment the Web and it's not the desktop.

    The only way that you could have possibly gotten away with it locally thinking you are doing some kind of true Web application on a Web server is that you were using IIS Express. IIS Express is not IIS the real Web server. 

    Wednesday, August 22, 2018 12:39 PM
  • Oh, makes sense, so the only way I could do this, is creating the file, which it does remotely (I tested it), and then, manually run it on the Server.
    Wednesday, August 22, 2018 12:53 PM
  • Please post questions related to web development in the ASP.NET forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, August 22, 2018 3:25 PM