Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing local machine from c# web page

Status
Not open for further replies.

vanvb

Programmer
Feb 7, 2003
255
CA
My apologies if this has already been covered but search is down right now. I have a VB 6.0 app that I am re-writing as a C# web app. As you can imagine there are a number of things that are causing problems but maybe if I can get a start on accessing the local box of the person viewing the web page, I can go from there.

Here's my question. How can I run notepad.exe on the machine of the person viewing my web page? I know there are security issues but it is for an intranet application only so I can set any group policies needed to allow this behaviour from my page.

Thanks
 
you need to have some sort of ActiveX to do this for you since HTML and JavaScript only cannot help you here!

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
OK...that's pretty much what I have found as well. Anyone have experience developing something like this who can get me started? Dr. Google is somewhat helpfull but I haven't found a good working example. Also, I have found code for an activeX control so I understand the concept but there are some basic differences between that and what I am trying to do. I just want to execute some code but do not necessarily need anything visible in activex as you can tell from my requirements. Can anyone help me get started with this? Thanks.
 
I sincerely doubt you will succeed. The ASPNET user has limited access.
Also, in WinXP SP2 (for example) running ActiveX in a web page is disabled by default. Besides that, more and more browsers are asking for confirmation before executing ActiveX on page so it will pretty difficult to convince the users they really need it.

P.S.: Why would you need to run the notepad.exe in the first place? Maybe we can find another solution for your problem.

P.S.2: Was it really notepad or some other application you want to run with administrative credentials? [bigglasses]
 
Nope...notepad was just an example. I have an administrative program for our sysadmins that allows us to search computers that we manage via an internal database, then do things like remote control, ping, remote manage, reboot, view c$, view shares, view add/remove programs...and many more. Basically though my program just does a bunch of shell commands in vb6, but now I am trying to make that program web-based in c#. Permissions and prompts are not an issue as all who are using the programs are domain admins, I have full access to changing group policies if needed, etc. I said notepad because it is just as much of a command line call as remote control or anything else is so if I can open notepad, I can do what I want.

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top