-
February 23rd, 2005, 09:10 AM
#1
how to call the calc.exe from c#.net webapp
Hi,
I want to run the calculator.exe file from my c# webapp.I did this by using the hyperlink control and the location of the exe is the navigate url and is working nice.
But it gives the dialog box telling ,'one or more files can harm your computer ...' since it is opening on the IE. if i click the open button the calc.exe is opened.
i want to eliminate /deactivate the asking dialog box and directly open the calculator exe thru c# webapp .
Could u please tell me how can i do that.
Regards
Raghu
-
February 23rd, 2005, 10:39 AM
#2
Re: how to call the calc.exe from c#.net webapp
Anything that accesses the local system directly is going to be deemed unsafe, even if you're loading an HTML file in the browser off the same system. There's just not anyway around it (ie, would you want it to be able to automatically open format without telling you?)
If you really want a calculator in the browser, the best option is just to find / make a javascript version embedded in the web page. Otherwise, you;ll either have to find an embedded component (meaning web browser plugin / control) or do some pretty nasty stuff with running Winform apps inside of IE.
-
March 20th, 2011, 10:36 AM
#3
Re: how to call the calc.exe from c#.net webapp
Originally Posted by devasena_ace
Hi,
I want to run the calculator.exe file from my c# webapp.I did this by using the hyperlink control and the location of the exe is the navigate url and is working nice.
But it gives the dialog box telling ,'one or more files can harm your computer ...' since it is opening on the IE. if i click the open button the calc.exe is opened.
i want to eliminate /deactivate the asking dialog box and directly open the calculator exe thru c# webapp .
Could u please tell me how can i do that.
Regards
Raghu
Hi Raghu,
Put the below code whereever you want to call
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName ="calc.exe";
p.Start();
Hope this will help.
Cheers
Preetham
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|