Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Run time error : no script engine for .exe extension

delljohnbdelljohnb Posts: 81Member
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

Comments

  • ManningManning Posts: 1,621Member
    : 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.
  • delljohnbdelljohnb Posts: 81Member
    : : 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

  • ManningManning Posts: 1,621Member
    : : : 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:PATHTOSNAPIN.EXE', '');

    or

    Exec(GetEnv('COMSPEC'), '/C C:PATHTOSNAPIN.EXE');


  • delljohnbdelljohnb Posts: 81Member
    : : : : 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:PATHTOSNAPIN.EXE', '');
    :
    : or
    :
    : Exec(GetEnv('COMSPEC'), '/C C:PATHTOSNAPIN.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:CSPSNAPIN.EXE', '');





  • delljohnbdelljohnb Posts: 81Member
    : : : : : 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:PATHTOSNAPIN.EXE', '');
    : :
    : : or
    : :
    : : Exec(GetEnv('COMSPEC'), '/C C:PATHTOSNAPIN.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:CSPSNAPIN.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....
Sign In or Register to comment.