Last post Aug 10, 2007 11:50 AM by johram
Aug 06, 2007 05:54 PM|raghu1|LINK
This is on our intranet site. I need to launch a .bat file on client upon click of a hyerlink. Which is the best way to don this?
I have asp.net 1.1 on windows server 2003.
Aug 06, 2007 10:01 PM|johram|LINK
There is really no good way to invoke external code on the client. If you can solve it server-side, then you should go for this solution.
You can however refer to the file as
file:// instead of http:// but there are some security issues with launching a bat file. In best case, you will get a security warning and the possibility to save the file to disk, but I don't think you will be able to run it directly (without saving it
to the client first).
Aug 07, 2007 01:53 PM|raghu1|LINK
This being an intranet site, as long as the clients do not have to enable scripts etc, I am fine with it. I do not want to put up detailed instructions: " enable activeX to run this file and make sure that you disable it after this program runs ". Basically
my .bat file calls an msi with relevant switches.
Aug 07, 2007 02:32 PM|johram|LINK
If you are on an intranet and you have some control over the local IT, then you might get approval for changing a group policy which makes IE "trust" your site. So the user never have to worry about this. But if all users have their own settings, then the
behaviour can be unpredictable among the clients. I suggest you try and see what results you get.
If you need to run an MSI, then isn't it something that you can distribute with Microsoft SMS?
Aug 07, 2007 02:44 PM|raghu1|LINK
The msi is a licenced software, if the department has paid for it, the dept users can download it. I have a web form where users are validated. The problem with http://... link is, this does not run on firefox/netscape. If users click on the link, firefox
and netscape opens the bat file as plain text. I'll have the user use IE only to install it. I will check out the Microsoft SMS
Aug 10, 2007 11:50 AM|johram|LINK
What if you wrap the .bat file and msi in an self-executable zip file? I know winzip can create those. Or you could even build a small msi-wrapper for the two files. In any way, you need to come out with an exe that can be downloaded to the client. The exe
will extract bat file and msi and then start the bat file. I think it could work!