It wouldn't matter. It can never be allowed due to the relaxed security inherent to client-side applications.
If you could -ever- automatically launch any executable via a web browser, you could instantly compromise that user's computer.
This means no self-respecting vendor of web browsers will ever allow it. Sure, you could write a web browser with no security and persuade users to use that instead... but it itself will still be subject to the [RUN/SAVE] dialogue.
In conclusion, the requested scenario is simply not possible. HTA also require user permission before it can be launched for the same reason.
You can do a lot with Javascript/DHTML that would make most EXE redundant and that may avoid the issue but there is no workaround.
I was wondering how I can create a program that would:
1. ask for a users name, password and length of time
2. after the user enters this info the next screen gives the user a menu with several options to run different programs (.exe/applications)
3. the time alloted for using the app, once it's lanuched, is timed (based on what the user entered initially)
4. when the time expires the entire application logs the user off (if the user uses less time than what they indicated initially the remaining balance needs to be tracked so that when they log in again they can use up the remaining hours)
Can the user info and time be stored in a database that can communicate with JS?
stormbind:
the only reason i asked that was because if the exe is generated in director then it can be converted to IE format(.dcr). it works just like the EXE....
and rmkh: that is not possible using javascript. try using ASP,PHP.....
what he means is ActiveX components that can be embedded inot html files. they give the look and feel of VB. but then activex is not a wise choice. some browsers will not aloow the activex to be displayed...
I need some help asap and would be greatful if someone could help me write this program using visual basic.
To write this program would be difficult for me because I'm not sure how to address the following:
1. could vb be used to generate unique usernames and passwords?
2. how would the vb application talk to a database that also keeps track of usernames, passwords and how long a user has been logged on
3. how can the vb application shut down or log the user out once his/her time has expired
Executing Exe IN JavaScript/WScript/winmgmts/sendingKeys
<code>
var winmg = GetObject("winmgmts:win32_process"
var WShell = new ActiveXObject("WScript.Shell"
obj = winmg.Create("Xcalc.exe", null,null);
WScript.Sleep(500);
WShell.SendKeys("any App Arguments or commands you have~"
WScript.Sleep(50) //minimum, 100 recommended for long hual apps/commands/or aurguments then you can send more keys
</code>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.