0

When I use shell.Run or ShellExecute function it opens my exe, but the exe is not running in a new process. How can I make it run in a new process?

EDIT: This is my scenario: I have a website installed on iis on server1. I have 10 citrix clients connecting to this server. I want, when the user press a button on the asp page, to open a exe in a new process that will run on the citrix client. Not on server1.

Thanks.

Itay.B
  • 3,991
  • 14
  • 61
  • 96
  • unless your goal is to maliciously infect peoples computers with malware you are using the wrong tool for the job. Client side JS is sandboxed to prevent exactly this kind of thing – Darko Jan 07 '14 at 10:38
  • I see what you are saying. I will now edit my question and will explain the whole senario. – Itay.B Jan 07 '14 at 10:49

1 Answers1

0

Try using "start calc.exe", e.g. That spawns the application in a new process. Additional info can be found here: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/start.mspx?mfr=true

Rob
  • 11,492
  • 14
  • 59
  • 94
  • i can do it from javascript?\ – Itay.B Jan 07 '14 at 10:09
  • You are talking of server-side Javascript, of course? You can't run programs from client-side JS as it is sandboxed in your browser for very good reasons. But you can use it on the backend, with node.js for example: http://nodejs.org/api/child_process.html – Rob Jan 07 '14 at 10:18
  • I'm talking about client side. – Itay.B Jan 07 '14 at 10:19
  • No way. Except perhaps for some disgusting ActiveX adventures with Windows Scripting, but that's neither safe nor elegant and only works for IE in Windows environments. That kind of stuff makes me throw up ;-) Take a look at this post: http://stackoverflow.com/questions/10186813/how-to-run-cmd-exe-with-parameters-from-javascript – Rob Jan 07 '14 at 10:23