...

View Full Version : Starting an exe on client side



mehmet_engur
08-11-2004, 05:19 PM
Is there a way an exe program will start at user p.c (say at c:\mydrv\myexe.exe) when user selects a button on the browser ?
Any help appreciated.
Best regards.
Mehmet

jbot
08-11-2004, 05:31 PM
what are you wanting to do? are you trying to execute a program on a user's Pc when they click a link on your website?

*sounds dodgy* ;)

jbot
08-11-2004, 05:33 PM
oh ... one more thing ....

you've posted this in the wrong forum.

this forum is for completed scripts to share with other JS coders, not for asking mundane questions like yours.

you shoulda posted it into the Javascript programming forum.

mehmet_engur
08-11-2004, 05:35 PM
No, user will start an exe program (on a specific location ) on his computer when he hits a button on the browser.
Mehmet

Roy Sinclair
08-11-2004, 10:50 PM
Crossposted: http://www.codingforums.com/showthread.php?t=43132

subhailc
08-12-2004, 11:44 AM
<script language="vbscript" type="text/vbscript">
Sub Run(Name)
Set objShell = CreateObject("WScript.Shell")
objShell.Run Name
On Error Resume Next
Set objShell = Nothing
End Sub
</script>
//...
<a href="javascript:Run('file://c:/windows/notepad.exe');">notepad</a>


google to msdn AND hta to lose the warning

mehmet_engur
08-14-2004, 07:07 AM
I have copied the script into my html code blocks, but it did not run. I have never used "vbscript" before. Is there anything else I have to add into code html block in order to run "vbscript" ?
Mehmet

Matt RW
08-14-2004, 09:43 AM
I have copied the script into my html code blocks, but it did not run. I have never used "vbscript" before. Is there anything else I have to add into code html block in order to run "vbscript" ?
Mehmet
it will only work in Internet Explorer (that's one of the main reasons I never use it), you also need to have the horrible thing called ActiveX enabled (Tools -> Internet Options -> Advanced) and enable all those ActiveX settings.

subhailc
08-15-2004, 12:06 AM
I have copied the script into my html code blocks, but it did not run. I have never used "vbscript" before. Is there anything else I have to add into code html block in order to run "vbscript" ?
Mehmet

if you're using a wysiwyg editor it won't work, and yes it only works in IE. do this:

1. open notepad.
2. copy this code block


<html>
<head>
<script language="vbscript" type="text/vbscript">
Sub Run(Name)
Set objShell = CreateObject("WScript.Shell")
objShell.Run Name
On Error Resume Next
Set objShell = Nothing
End Sub
</script>
</head>
<body>
<a href="javascript:Run('file://c:/windows/notepad.exe');">notepad</a>
</body>
</html>

3. paste the code into the blank notepad doc
4. save the file as "anythingyouwant.html". remember to change the option beneath the "save as" dialogue from "text" to "all files".
5. when adding other executables, just copy the line between <a and /a> and make sure you keep the syntax intact. if you copy the location from windows explorer you'll have backslashes instead of slashes, which won't work.

isn't it funny how all the good browsers dont support all the useful, simple features that ie does. i guess they make up for it by having improved security, otherwise all the hackers would break into my computer and take all the highly valuable information.

mehmet_engur
08-15-2004, 12:24 PM
I managed it to run the EXE program on client side. But it is not loading from frame set, it only loads from standalone web page. Why is it so ? It gives error message when I try to load it from frame.
Also is there a way I can search user drivers and find the address of myexe.exe program so that I can lload the program from that address ?
Thanks for everybody help for this problem.
Mehmet

Matt RW
08-15-2004, 01:35 PM
isn't it funny how all the good browsers dont support all the useful, simple features that ie does. i guess they make up for it by having improved security, otherwise all the hackers would break into my computer and take all the highly valuable information.
isn't it funny how once yet another IE vulnerability is discovered, one simple webpage could wipe out your hard drive?

Matt RW
08-15-2004, 01:40 PM
I managed it to run the EXE program on client side. But it is not loading from frame set, it only loads from standalone web page. Why is it so ? It gives error message when I try to load it from frame.
it cannot be embedded to a webpage, try to live with that. You are already using IE specific code that will only run for those few people who have ActiveX enabled, and who are brave, or stupid enough to let a webpage run an application. Sigh. I hope your entire webpage doesn't rely on the application, but just that it's an extra feature like a calculator or something. Otherwise, it would be an extremely inaccessible way, and if you're doing the website for a company, it could be sued.


Also is there a way I can search user drivers and find the address of myexe.exe program so that I can lload the program from that address ?
well, once the user has enabled ActiveX for the page, it can do pretty much anything. get directory listings, read files, create files, write to file, append files, delete files, rename files, copy files, rename directories, delete directories, read the registry, modify the registry, run any program... fun isn't it???? why can't microsoft just concentrate on basic web standards instead of this dreadful and useless technology which hazards every IE user's security? read more about this technology yourself or hope that someone else gives you the code, I won't.

mehmet_engur
08-17-2004, 02:38 PM
Thanks For everybody help for this problem.
Just to give information I will not use this project on the internet but it will be used intranet. I think this way we will be a little bit on the safe side. On the other hand since vbscript can not be activated inside the frame, we will not be able to use it in our project at all.
I would like to thank everybody that Warning me on security side of the using activex components.
Best regards.
Mehmet



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum