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!

FSCommand Exec Problem

Status
Not open for further replies.
Dec 24, 2001
857
GB
Anyone know why the FSCommand Exec command doesn't seem to work?

On a button, I have the following actions:

on (release) {
fscommand ("exec", "apps/ar5.exe");
}

This movie (which is a menu) is going to be on the root of a CD, and there will be an Apps folder. In that is an exe called ar5.exe.

I remember reading somewhere it said that Flash Player 6 won't allow you to launch exe files as a security measure. However, I am using Flash 5 and have tried this on several computers where there is a variation between Player 5 and 6.

This is the same command as I have used before and it worked fine.

Any help is appreciated...
 
Thought I should also mention that I have the Flash 6 Active X control installed....

Anyone know why this doesn't work?
 
Anyone got any ideas because if I can't get this to work then the menu I'm working on is pretty pointless...
 
it is Simple FSCommand runs a javascript command on the page
thus


fscommand ("exec", "apps/ar5.exe")

Need the following Javescipt on the page

<SCRIPT LANGUAGE=JavaScript>
<!--
var InternetExplorer = navigator.appName.indexOf(&quot;Microsoft&quot;) != -1;
// Handle all the the FSCommand messages in a Flash movie
function BarViewNavT_DoFSCommand(command, args) {
var BarViewNavTObj = InternetExplorer ? BarViewNavT : document.BarViewNavT;
//
// Place your code here...
//
if (command == &quot;PRINT&quot;) {
window.print()
}
if (command == &quot;SUBMIT&quot;) {
sendform ()
}
if (command == &quot;RESET&quot;) {
document.forms[0].reset()
}
if (command ==&quot;DELETE&quot;) {
frm.Del.checked = true
}
}
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf(&quot;Microsoft&quot;) != -1 &&
navigator.userAgent.indexOf(&quot;Windows&quot;) != -1 && navigator.userAgent.indexOf(&quot;Windows 3.1&quot;) == -1) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('Sub BarViewNavT_FSCommand(ByVal command, ByVal args)\n');
document.write(' call BarViewNavT_DoFSCommand(command, args)\n');
document.write('end sub\n');
document.write('</SCRIPT\> \n');
}
//-->
</SCRIPT>


This has four command Submit Print Reset and Delete The Above code is base on flash file called &quot;BarViewNavT&quot;
P.S you must set in publishing set the HTML to Flash with FSCommand this will create the code above for you flash file. I hope this is of help, Andrew.price@o2.com
 
Thanks for the detailed reply, but this isn't going to be used on an HTML page...its just a standalone flash player which will run off a CD.
I guess I could always put it in an HTML page and put that on the CD....hmm...

Thanks
 
You can link to a bat file to do your work put this in notepad :

Code:
@echo off
start apps/ar5.exe

save as launch.bat then call it from flash :

Code:
on (press) {
    fscommand (&quot;exec&quot;, &quot;launch.bat&quot;);
}
Regards

David Byng

spider.gif


davidbyng@hotmail.com
 
I think that'll have to be my backup because theres going to be potentially 100+ files which are going to be lauchable.

Its a shame it won't launch PDFs...that would save me so much trouble :-(

Thanks
 
It will launch PDF's. Just use the getURL function instead of the fscommand function.

As far as calling ecexcuatble is concerned, what version of flash are you using? In MX, it will only call exe files located in a directory called &quot;exec&quot; which is one branch down from where the flash movie is stored. In flashplayer 5, its a little tougher because a patch came out that doenst allow it to execute exe files.

check out:

Here's a fla package I made to demonstrate this to someone else:


Good Luck, Lumstar
______________________________________
And The Star Continues To Shine....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top