Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-11-2004, 05:19 PM   PM User | #1
mehmet_engur
New Coder

 
Join Date: Aug 2004
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
mehmet_engur is an unknown quantity at this point
Starting an exe on client side

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
mehmet_engur is offline   Reply With Quote
Old 08-11-2004, 05:31 PM   PM User | #2
jbot
Senior Coder

 
Join Date: Feb 2004
Location: Edinburgh
Posts: 1,352
Thanks: 0
Thanked 0 Times in 0 Posts
jbot is an unknown quantity at this point
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 is offline   Reply With Quote
Old 08-11-2004, 05:33 PM   PM User | #3
jbot
Senior Coder

 
Join Date: Feb 2004
Location: Edinburgh
Posts: 1,352
Thanks: 0
Thanked 0 Times in 0 Posts
jbot is an unknown quantity at this point
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.
jbot is offline   Reply With Quote
Old 08-11-2004, 05:35 PM   PM User | #4
mehmet_engur
New Coder

 
Join Date: Aug 2004
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
mehmet_engur is an unknown quantity at this point
No, user will start an exe program (on a specific location ) on his computer when he hits a button on the browser.
Mehmet
mehmet_engur is offline   Reply With Quote
Old 08-11-2004, 10:50 PM   PM User | #5
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
Thumbs down

Crossposted: http://www.codingforums.com/showthread.php?t=43132
__________________
Check out the Forum Search. It's the short path to getting great results from this forum.
Roy Sinclair is offline   Reply With Quote
Old 08-12-2004, 11:44 AM   PM User | #6
subhailc
Regular Coder

 
Join Date: Jan 2004
Posts: 185
Thanks: 2
Thanked 1 Time in 1 Post
subhailc is an unknown quantity at this point
Code:
<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

Last edited by subhailc; 08-12-2004 at 11:45 AM.. Reason: close a tag
subhailc is offline   Reply With Quote
Old 08-14-2004, 07:07 AM   PM User | #7
mehmet_engur
New Coder

 
Join Date: Aug 2004
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
mehmet_engur is an unknown quantity at this point
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
mehmet_engur is offline   Reply With Quote
Old 08-14-2004, 09:43 AM   PM User | #8
Matt RW
New to the CF scene

 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Matt RW is an unknown quantity at this point
Quote:
Originally Posted by mehmet_engur
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.
Matt RW is offline   Reply With Quote
Old 08-15-2004, 12:06 AM   PM User | #9
subhailc
Regular Coder

 
Join Date: Jan 2004
Posts: 185
Thanks: 2
Thanked 1 Time in 1 Post
subhailc is an unknown quantity at this point
Quote:
Originally Posted by mehmet_engur
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
Code:
<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.
subhailc is offline   Reply With Quote
Old 08-15-2004, 12:24 PM   PM User | #10
mehmet_engur
New Coder

 
Join Date: Aug 2004
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
mehmet_engur is an unknown quantity at this point
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
mehmet_engur is offline   Reply With Quote
Old 08-15-2004, 01:35 PM   PM User | #11
Matt RW
New to the CF scene

 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Matt RW is an unknown quantity at this point
Quote:
Originally Posted by subhailc
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 is offline   Reply With Quote
Old 08-15-2004, 01:40 PM   PM User | #12
Matt RW
New to the CF scene

 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Matt RW is an unknown quantity at this point
Quote:
Originally Posted by mehmet_engur
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.

Quote:
Originally Posted by mehmet_engur
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.
Matt RW is offline   Reply With Quote
Old 08-17-2004, 02:38 PM   PM User | #13
mehmet_engur
New Coder

 
Join Date: Aug 2004
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
mehmet_engur is an unknown quantity at this point
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
mehmet_engur is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:36 PM.


Advertisement
Log in to turn off these ads.