Jump to content
Sign in to follow this  
moicpit

Dos script on Windows impossible

Recommended Posts

Hi everybody.

I've got a problem using ScriptMaster to execute a Dos script.

As a fact, only several commands are working.

For exemple, when I am trying "ping 127.0.0.1" with the "Run Shell Script" exemple from the ScriptMaster.fp7 file, everything is going great.

But, when I try a "dir C:", everything goes wrong and I've got this error :

capture1.png

And with more info :

capture2e.png

Is somebody's got the same problem ?

Please, tell me.

I just want to know if the problem comes from my Windows or from ScriptMaster.

Of course, if you have a solution to this problem, you'll be very kind to tell me.

And sorry for my english.

I'm on Windows XP, with FMPA 8.5, Java 6 (Update 13), and one of the lastest ScriptMaster Plugin (the problem isn't in changelog).

Thank you !

Pour les français, mon problème est celui-ci :

Lorsque j'essaie d'exécuter un script Dos sous Windows XP, j'ai une erreur la plupart du temps.

Bizarrement, certaines commandes fonctionnent très bien (telles que "help" ou "ping", par exemple) mais la plupart me renvoient l'erreur ci-dessus.

Avez-vous le même problème ?

Vous pouvez tester le script en utilisant l'exemple "Run Shell Script" du fichier "ScriptMaster.fp7". Il suffit de taper la commande à exécuter juste en-dessous de "shellScript", à droite.

Merci.

------

moicpit

Share this post


Link to post
Share on other sites

Hi,

This is not a problem with the plugin. In fact, this is the best plugin ever released for Filemaker (because it's free, and extensible).

First, the current version of the plugin (I think it's version 3), has a 'list files' example that doesn't use 'DIR'. So you may want to use that.

However, it is still worth documenting precisely why DIR does not work. It doesn't work because DIR in an inbuilt DOS command. Ping is not. That is, there is a program called 'ping.exe', there is no 'DIR.EXE'; rather, it is inbuilt into the COMMAND.COM processor.

Because of this, you must run DIR from a DOS command processor. Thus, to achieve what you want (and to allow use of many other DOS commands), you should use the exact example in Scriptmaster, but precede it with CMD /C, so for instance, to get a directory, use cmd /c dir as your shellscript command. You can also precede commands like ping with cmd /c if you want, though it probably just makes them run more slowly.

Share this post


Link to post
Share on other sites

OK, I'll try this !

Thank you very much for your help !

Oh ! And be sure I think ScriptMaster is a very good plug-in ! I won't say contrary !

Share this post


Link to post
Share on other sites

After a fiew testing, all is working great with "cmd /c" !

Thank you very much for your help ! :D-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.