locked
How to open an msc RRS feed

  • Question

  • User1454398319 posted

    I'm using Visual Studio 2010

    I have a form with a button I need code to open C:\Windows\system32\printmanagement.msc

    I have search and just can't get it..

    Any help..

    Thanks

    Thursday, February 18, 2016 3:05 PM

Answers

  • User753101303 posted

    Hi,

    It seems to work because your development machine is both the web server and the client. But once deployed to a real web server your server side C# code will run on the server side and you won't see anything on the client side. Not sure what you are trying to do but keep in mind that a web app is restricted by design for safety (basically the browser is just a sandox). I suspect you may have some printing code that won't work either.

    Or if you meant a Windows Form rather than than a Web Form see rather a Windows programming forum at the msdn.microsoft.com site...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 19, 2016 1:33 PM

All replies

  • User-718146471 posted

    rhamn, the problem with what you are trying to do is the command would be executed only on the server, not the client side. I personally do not know of any way to use Process.Start on the client machine. This is by design; imagine for a moment if we had that kind of power on client machines. While our intentions may be pure, others have more nefarious purposes in mind. I suspect you may need to use some type of client application, Adobe Flash, or Silverlight.

    Thursday, February 18, 2016 3:11 PM
  • User1454398319 posted

    On my computer when I use the Run command and insert: printmanagement.msc

    It opens no problem is there not a way to shell or shell execute?

    Friday, February 19, 2016 12:42 PM
  • User753101303 posted

    Hi,

    It seems to work because your development machine is both the web server and the client. But once deployed to a real web server your server side C# code will run on the server side and you won't see anything on the client side. Not sure what you are trying to do but keep in mind that a web app is restricted by design for safety (basically the browser is just a sandox). I suspect you may have some printing code that won't work either.

    Or if you meant a Windows Form rather than than a Web Form see rather a Windows programming forum at the msdn.microsoft.com site...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 19, 2016 1:33 PM
  • User1454398319 posted

    Ok thanks!

    Friday, February 19, 2016 3:46 PM