I m trying to do following with c# code.
1) Open Firefox Browser --->Tools--->Options--->In General Tab--->Downloads--->Always ask me where to save file.
I want to do this whole process in my application with c# code. I want that when download window opens , the radio button in "Always ask me where to save file" option gets checked automatically.
I got the code from this site ..but that works only when firefox in not running. I m using the code in application and running that application in Firefox browser.
I have tried from various links , but all is in vain. Any help will be greatly rewarded. Thanxxx in advance..!!
If by "and running that application in Firefox browser" you mean you've written an ASP.NET web app, I highly doubt you're going to be able to do this. It would probably be considered a security flaw in Firefox if it allowed a web page to change this setting.
You could try modifying the code here. But that code will only run on your machine or in your own program that you can distribute. Like said in the other answer you will not be able to run this from the browser. This sounds like something that was done with ActiveX but that´s no longer supported by Firefox.
Related
I want to open a network path folder in windows explorer on click of a link from mozilla firefox. After research, came to know that opening a folder from Mozilla and chrome is not possible as like IE. Is there any way to write any click event in c# to make it done. I need to access a path in the network share. I tried Process.Start() but that gives server execution failed. I used
as the clickable control.
None of the modern browsers might allow this, I guess even IE would show some kind of warning or allow only in case IE is running with some low security setting. This is a big security risk and even if there are some hacks out there, this is not the kind of code you should expect to be going in production.
If you click on the Download Chrome button in (ONLY seems to work in Internet Explorer) a browser, the installation starts right away and download files itself. I would like to know what technology is behind this? Is it the Omaha installer thing?
In this case, instead of popping the bar (Do you want to Run or Save...) at the bottom, IE displays a rather customized EULA pop up with the "Accept" button. I would love to know how that is achieved.
What I want to do is just to place my own Windows App installer/*.EXE in an intranet site so that any users can just click and have the program started without needing to know how to download first and look for the file to install. As far as security is concern, it's Intranet, so I'm not worried about security.
Thanks
I am trying to open my app's Login Form whenever I try to double click and open any web browsers installed on my system. I have spent around a week without any success. Any help, articles, code or links would be of great help.
Thanks.
I am using Visual Studio 2010
Programming Language : C#
Trying to intercept every browser launch probably requires monitoring the system processes. I.e., your app will constantly be running and whenever a recognized browser process starts, you spawn your login form. There may be system events to hook into (I am not sure), but How can I list all processes running in Windows? might be a good starting point to get an idea what's possible.
A somewhat different approach would be to register your app as the system's default browser. That way, you will be notified, can spawn your LogIn form and can than delegate to an actual browser.
I am not sure what ultimate goal you pursue, and whether either is a good solution depends heavily on whether there are more constraints to it than you mention explicitly.
In order to open a link with your default browser, use the following code.
System.Diagnostics.Process.Start("http://google.com");
You could compile your own Firefox-Version which contains a login form, but you would need a few more steps to prevent a user from launching a start-only browser like the TOR-Browser-Bundle.
We have developed an exe and we have created a website to download that exe.
Now is there any possibility to run that exe on a single button click in the client machine. ie if user clicks on a button in the website it has to download and run that exe.
So while clicking the link button, it have to show a "Run" dialogue box instead of the "save" dialogue box.
And upon clicking the "Run" it have to save and run the exe in the client machine.
Can anyone give suggestions for this.
It is not possible to automate that process due to security concerns. The only thing that comes to mind is to write something like:
Download
But that will only prompt the user to either run it or save it. To be honest, you are better off just documenting the procedure for your users/visitors to follow.
Hope it helps!
This is not possible to the best of my knowledge.
However, you can get close with a trusted Silverlight 5 app. If all your users are on the intranet and within a domain, you can push your certificate and register it through group policy.
Sounds like ClickOnce is what you're after?
What you are describing is a function of your browser. The downloading and running of the exe is dependent upon the users browser. More importantly there is a major security problem where the OS may throw prompts about trusting and running an unknown executable.
Can we add a windows form in an asp web page.
Like if someone click on a button on web page(.aspx) user receive a windows form (.cs)
and then again switch to each other.
It cannot be done.
The closest thing to do this would be to use Silverlight embedded in the browser.
No there is not any way to do this. Your only option would be for the user to click a link, download an .exe and then have the user launch the application.
The reason for this is that Windows Forms are designed to run on Windows, and run with a different permission set. As such, a web application first of all could be running on a non-windows platform, and secondly, does not have the ability to actually launch an application on the users machine.
In short, no this cannot be done.
You can't embed a windows form application in a webpage.
RIA (Rich Internet Applications) are what HTML 5 is about, and currently flash and silverlight are the closes things to what you are looking for.
As #Mitchel Sellers mentions, you can always link to an exe, save it and execute the downloaded file, but this is far from seamless.
Even if you did add some windows form UI (for eg a message box) to your asp.net application it will only be fired on your web server.. no client will ever get it on their side
I'm not exactly sure why would you need this? But the closest you can get to this is like "Mikael Svenson" said, Silverlight..