Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could I run an EXE file from Flash?

Status
Not open for further replies.

Magosoft

Programmer
Nov 9, 2001
7
GT
I'm new in this stuff.
I have a program menu created in Flash 5 and I would like to start some programs from it.
I have used the FSCommand in the actions menu of each item,
but it doesn't work at all, I writed in this way:

on (release){
fscommand("exec","c:\\progra~1\\Acceso~1\\calc.exe");
}

..then I publish the element and tried to execute from the HTML page, but when I click on the Item it doesn't respond.

Could you help me?
 
Normally, you wouldn't add the extension in this situation. If the calc.exe is located in the c:/windows folder, the following works fine:
Code:
on (press) {
	fscommand("exec", "calc");
}

If you need to specify a different path, you would open notepad.exe, for instance, in this manner:
Code:
on (press) {
    fscommand ("exec", "c:/windows/desktop/FSCommand/notepad");
}

Important note: Although both work fine with the Flash 5 player, it definately doen't work with the Flash 6 player!

Regards,
new.gif
 
In Flash 6 (MX) to call an executable (.exe) it must be placed in a folder named "fscommand" one directory deeper than your flash movie is. This is to protect user's from malicious files such as virus' being linked to fomr flash movies.

Also, with Flash Player 5, some people have gotten a security patch that doesnt allow it to run exe files. To get around this, create an exe using a copy of flash that does not have the security patch added.

Hope that helps!


Lumstar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top