Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4106
Number of posts: 14016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Run time error : no script engine for .exe extension Posted by delljohnb on 3 Nov 2003 at 10:29 AM
I'm getting a run-time error stating :

Input Error : There is no script engine for file extension ".EXE"

I am making and external call to run a program with the following line :

exec('CSCRIPT','SNAPIN.EXE');


SNAPIN is the file I'm calling, and it is located in the correct location. I have "Uses DOS" in the declaration section. ...is there another module that I must include? By the way...SNAPIN was written with VB 6.0, but it makes no "crazy" object calls.

I'm using FreePascal. Your assistance is appreciated in advance.

Thanks,
Delljohnb

Report
Re: Run time error : no script engine for .exe extension Posted by Manning on 3 Nov 2003 at 12:57 PM
: I'm getting a run-time error stating :
:
: Input Error : There is no script engine for file extension ".EXE"
:
: I am making and external call to run a program with the following line :
:
: exec('CSCRIPT','SNAPIN.EXE');
:
:
: SNAPIN is the file I'm calling, and it is located in the correct location. I have "Uses DOS" in the declaration section. ...is there another module that I must include? By the way...SNAPIN was written with VB 6.0, but it makes no "crazy" object calls.
:
: I'm using FreePascal. Your assistance is appreciated in advance.

CSCRIPT is one of the two Windows Scripting Host interpreters. You can only pass it VBScript or JScript scripts for it to interpret, not pre-compiled executables.
Report
Changed CSCRIPT to VBSCRIPT - solution worked Posted by delljohnb on 4 Nov 2003 at 11:07 AM
: : I'm getting a run-time error stating :
: :
: : Input Error : There is no script engine for file extension ".EXE"
: :
: : I am making and external call to run a program with the following line :
: :
: : exec('CSCRIPT','SNAPIN.EXE');
: :
: :
: : SNAPIN is the file I'm calling, and it is located in the correct location. I have "Uses DOS" in the declaration section. ...is there another module that I must include? By the way...SNAPIN was written with VB 6.0, but it makes no "crazy" object calls.
: :
: : I'm using FreePascal. Your assistance is appreciated in advance.
:
: CSCRIPT is one of the two Windows Scripting Host interpreters. You can only pass it VBScript or JScript scripts for it to interpret, not pre-compiled executables.
:

WOW....worked like a charm!!! First compile and it worked perfectly. I guess the "C" in CSCRIPT stands for "Command." Would have worked for com files, but I needed the Windows components. VBSCRIPT worked the first time. Thanks for the solution.

Delljohnb

Report
Re: Changed CSCRIPT to VBSCRIPT - solution worked Posted by Manning on 4 Nov 2003 at 11:36 AM
: : : I'm getting a run-time error stating :
: : :
: : : Input Error : There is no script engine for file extension ".EXE"
: : :
: : : I am making and external call to run a program with the following line :
: : :
: : : exec('CSCRIPT','SNAPIN.EXE');
: : :
: : :
: : : SNAPIN is the file I'm calling, and it is located in the correct location. I have "Uses DOS" in the declaration section. ...is there another module that I must include? By the way...SNAPIN was written with VB 6.0, but it makes no "crazy" object calls.
: : :
: : : I'm using FreePascal. Your assistance is appreciated in advance.
: :
: : CSCRIPT is one of the two Windows Scripting Host interpreters. You can only pass it VBScript or JScript scripts for it to interpret, not pre-compiled executables.
: :
:
: WOW....worked like a charm!!! First compile and it worked perfectly. I guess the "C" in CSCRIPT stands for "Command." Would have worked for com files, but I needed the Windows components. VBSCRIPT worked the first time. Thanks for the solution.

That's cool it works, but it sounds like you may still be doing it the wrong way. If you have compiled a program (which you must have if you have SNAPIN.EXE), then you don't need to run it through an interpreter like CSCRIPT. And VBSCRIPT isn't a recognized command on my machine, so I don't even know what that is, or why running it through that works.

Depending on what compiler you are using, one of these should be the proper method:

Exec('C:\PATH\TO\SNAPIN.EXE', '');

or

Exec(GetEnv('COMSPEC'), '/C C:\PATH\TO\SNAPIN.EXE');


Report
Re: Changed CSCRIPT to VBSCRIPT - solution worked Posted by delljohnb on 4 Nov 2003 at 11:48 AM
: : : : I'm getting a run-time error stating :
: : : :
: : : : Input Error : There is no script engine for file extension ".EXE"
: : : :
: : : : I am making and external call to run a program with the following line :
: : : :
: : : : exec('CSCRIPT','SNAPIN.EXE');
: : : :
: : : :
: : : : SNAPIN is the file I'm calling, and it is located in the correct location. I have "Uses DOS" in the declaration section. ...is there another module that I must include? By the way...SNAPIN was written with VB 6.0, but it makes no "crazy" object calls.
: : : :
: : : : I'm using FreePascal. Your assistance is appreciated in advance.
: : :
: : : CSCRIPT is one of the two Windows Scripting Host interpreters. You can only pass it VBScript or JScript scripts for it to interpret, not pre-compiled executables.
: : :
: :
: : WOW....worked like a charm!!! First compile and it worked perfectly. I guess the "C" in CSCRIPT stands for "Command." Would have worked for com files, but I needed the Windows components. VBSCRIPT worked the first time. Thanks for the solution.
:
: That's cool it works, but it sounds like you may still be doing it the wrong way. If you have compiled a program (which you must have if you have SNAPIN.EXE), then you don't need to run it through an interpreter like CSCRIPT. And VBSCRIPT isn't a recognized command on my machine, so I don't even know what that is, or why running it through that works.
:
: Depending on what compiler you are using, one of these should be the proper method:
:
: Exec('C:\PATH\TO\SNAPIN.EXE', '');
:
: or
:
: Exec(GetEnv('COMSPEC'), '/C C:\PATH\TO\SNAPIN.EXE');
:
:
:
I just reset it to omit the VBSCRIPT, but the compiler choked....are you sure of the syntax on the EXEC() command?

Exec('C:\CSP\SNAPIN.EXE', '');





Report
Re: Changed CSCRIPT to VBSCRIPT - solution worked Posted by delljohnb on 4 Nov 2003 at 11:51 AM
: : : : : I'm getting a run-time error stating :
: : : : :
: : : : : Input Error : There is no script engine for file extension ".EXE"
: : : : :
: : : : : I am making and external call to run a program with the following line :
: : : : :
: : : : : exec('CSCRIPT','SNAPIN.EXE');
: : : : :
: : : : :
: : : : : SNAPIN is the file I'm calling, and it is located in the correct location. I have "Uses DOS" in the declaration section. ...is there another module that I must include? By the way...SNAPIN was written with VB 6.0, but it makes no "crazy" object calls.
: : : : :
: : : : : I'm using FreePascal. Your assistance is appreciated in advance.
: : : :
: : : : CSCRIPT is one of the two Windows Scripting Host interpreters. You can only pass it VBScript or JScript scripts for it to interpret, not pre-compiled executables.
: : : :
: : :
: : : WOW....worked like a charm!!! First compile and it worked perfectly. I guess the "C" in CSCRIPT stands for "Command." Would have worked for com files, but I needed the Windows components. VBSCRIPT worked the first time. Thanks for the solution.
: :
: : That's cool it works, but it sounds like you may still be doing it the wrong way. If you have compiled a program (which you must have if you have SNAPIN.EXE), then you don't need to run it through an interpreter like CSCRIPT. And VBSCRIPT isn't a recognized command on my machine, so I don't even know what that is, or why running it through that works.
: :
: : Depending on what compiler you are using, one of these should be the proper method:
: :
: : Exec('C:\PATH\TO\SNAPIN.EXE', '');
: :
: : or
: :
: : Exec(GetEnv('COMSPEC'), '/C C:\PATH\TO\SNAPIN.EXE');
: :
: :
: :
: I just reset it to omit the VBSCRIPT, but the compiler choked....are you sure of the syntax on the EXEC() command?
:
: Exec('C:\CSP\SNAPIN.EXE', '');
:
:
:
:
:
:
I found the problem....I has a quote mark that has two dashes in it ratheer than 2 single dash marks.....it just compiled....let me see how that works....



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.