Product, version and build: Primalscript 2015
32 or 64 bit version of product: 64
Operating system: windows 7
32 or 64 bit OS: 64
I have just installed PrimalScript 2015 trial version and written this very complex script file:
'==============================
Option Explicit
On Error Resume Next
Dim My_Message
My_Message = "Hello World"
MsgBox My_Message
'==============================
When I try to run this I get:
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: There is no script engine for file extension ".vbs".
Execution time: < 1 second
Exit code: 1 , 0001h
cscript is set to WScript and If I run 'assoc' on a command line as administrator I get the line ".vbs=VBSFile".
Both cscript.exe and wscript.exe are on my machine.
What can be wrong and how do I fix it?
Thanks
No Script Engine
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: No Script Engine
Open a 64 bit cmd window and type:
C:\Windows\system32\cscript.exe <whateveryoucalledit>.vbs
where <whateveryoucalledit> is the name you gave your complex script
Most likely you will get the same error, but try it.
The try it from an elevated cmd window
The the same from a 32 bit command window and its elevated version.
Please let us know what the results are,
C:\Windows\system32\cscript.exe <whateveryoucalledit>.vbs
where <whateveryoucalledit> is the name you gave your complex script
Most likely you will get the same error, but try it.
The try it from an elevated cmd window
The the same from a 32 bit command window and its elevated version.
Please let us know what the results are,
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: No Script Engine
Hi Alexander
I gave that a whirl:
Run => cmd => run as administrator => d: => cscript.exe <complex_script>.vbs
Same result.
I am afraid I do not know what you mean by "elevated cmd window" or how to run a 32-bit cmd window on a 64-bit machine. You'll have to show a little mercy to a luddite here
I gave that a whirl:
Run => cmd => run as administrator => d: => cscript.exe <complex_script>.vbs
Same result.
I am afraid I do not know what you mean by "elevated cmd window" or how to run a 32-bit cmd window on a 64-bit machine. You'll have to show a little mercy to a luddite here
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: No Script Engine
That was elevated. so we are good.
Most likely your computer's script engines became unregistered. Why and when and how is hard to tell.
You may have to re-register the vbscript.dll file:
a. Type ‘cmd’ in the Start, Run box, right-click on Command Prompt, click on Run as Administrator.
b. Type ‘Regsvr32 <space> vbscript.dll’.
c. Click the OK button.
Most likely your computer's script engines became unregistered. Why and when and how is hard to tell.
You may have to re-register the vbscript.dll file:
a. Type ‘cmd’ in the Start, Run box, right-click on Command Prompt, click on Run as Administrator.
b. Type ‘Regsvr32 <space> vbscript.dll’.
c. Click the OK button.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: No Script Engine
Hi Alexander
After running that Regsvr32 command I received a dialog showing DllRegisterServer in vbscript.dll succeeded.
Neither double-click nor command from the command line runs my complex program. Both merely call PrimalScript with the code loaded. PS will not run the code. I just get the same old message.
Bit of a worry, eh?!
BTW: how does one insert an image in this forum page?
After running that Regsvr32 command I received a dialog showing DllRegisterServer in vbscript.dll succeeded.
Neither double-click nor command from the command line runs my complex program. Both merely call PrimalScript with the code loaded. PS will not run the code. I just get the same old message.
Bit of a worry, eh?!
BTW: how does one insert an image in this forum page?
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: No Script Engine
Add the image as an attachment and click "place inline"
I suggest to try on a standard Windows 7 machine. I do not know what your situation is, but maybe VBScript execution is disabled by group policy.
Or screwed up registry. Hard to tell from here. Have you tried a similarly complex JScript script?
I should point out that PrimalScript merely launches CScript with your script name when you launch the script.
So you can expect the result from PrimalScript to be the same as from the command line. I am assuming you know how to toggle the 32/64 bit switch in PrimalScript and/or to launch a 32 bit cmd instance.
You can try and package your complex script as an exe from PrimalScript. That will host the vbscript engine directly rather than using CScript.
This will show if the engine is there and can be used.
I would also suggest to follow this thread here and see if any of this helps:
http://stackoverflow.com/questions/1775 ... g-git-bash
I suggest to try on a standard Windows 7 machine. I do not know what your situation is, but maybe VBScript execution is disabled by group policy.
Or screwed up registry. Hard to tell from here. Have you tried a similarly complex JScript script?
I should point out that PrimalScript merely launches CScript with your script name when you launch the script.
So you can expect the result from PrimalScript to be the same as from the command line. I am assuming you know how to toggle the 32/64 bit switch in PrimalScript and/or to launch a 32 bit cmd instance.
You can try and package your complex script as an exe from PrimalScript. That will host the vbscript engine directly rather than using CScript.
This will show if the engine is there and can be used.
I would also suggest to follow this thread here and see if any of this helps:
http://stackoverflow.com/questions/1775 ... g-git-bash
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: No Script Engine
Following your link I went to Run and ran Associate file type or protocol with a specific program to discover that .VBS was associated with PrimalScript 2015.
--> Change Program
offered Notepad, WordPad, and PS
--> Other Programs
offered several other programs of little interest
--> Browse
c:\\Windows\System32\cscript.exe
Shows .VBS associated with Microsoft Windows Based Script Host.
After this my complex program flashed a window on screen but it closed too fast to see what it displayed. We have progress!
Further complicate program to
Option Explicit
On Error Resume Next
Dim My_Message
My_Message = "Hello World"
MsgBox My_Message
MsgBox "Finished?", vbOKOnly, "Finished?"
Same result! (Job 38:11)
It is interesting to note that PS still give me the old answer that there is no program to run it.
--> Change Program
offered Notepad, WordPad, and PS
--> Other Programs
offered several other programs of little interest
--> Browse
c:\\Windows\System32\cscript.exe
Shows .VBS associated with Microsoft Windows Based Script Host.
After this my complex program flashed a window on screen but it closed too fast to see what it displayed. We have progress!
Further complicate program to
Option Explicit
On Error Resume Next
Dim My_Message
My_Message = "Hello World"
MsgBox My_Message
MsgBox "Finished?", vbOKOnly, "Finished?"
Same result! (Job 38:11)
It is interesting to note that PS still give me the old answer that there is no program to run it.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: No Script Engine
Make sure you have the same platform selected. If both 32 and 64 bit registrations where screwed up, you may have fixed one but not the other.
What platform did you select in PrimalScript?
FYI, we do associate PrimalScript with the vbsfile type, but only the "Edit" verb and not the "Open" verb.
What platform did you select in PrimalScript?
FYI, we do associate PrimalScript with the vbsfile type, but only the "Edit" verb and not the "Open" verb.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: No Script Engine
Hi Alexander
Sorry to be a pain, but I am only feeling my way with VBScript and PS. I am a reasonable accomplished programmer but I am having huge difficulty getting this thing on its feet.
You wrote
Make sure you have the same platform selected. If both 32 and 64 bit registrations where screwed up, you may have fixed one but not the other.
How would I know and what would I do about it?
You Wrote
What platform did you select in PrimalScript?
My reflex would have been to select 64-bit. Again, how would I know and what do I do about it?
BTW: after a reboot, PS is still giving me the same old response. It debugs okay but won't run the script. This script also flashes a window on screen (from a double-click) but does not hold it there:
Option Explicit
Dim IntFirst
Dim IntSecond
Dim IntThird
IntFirst = getCoefficient
MsgBox "First Value was ", vbOKOnly, "First Value" = IntFirst
Function getCoefficient
getCoefficient = InputBox("Enter a Number : ", "getCoefficient")
End Function
Oh! That's getting really complex, isn't it?
Sorry to be a pain, but I am only feeling my way with VBScript and PS. I am a reasonable accomplished programmer but I am having huge difficulty getting this thing on its feet.
You wrote
Make sure you have the same platform selected. If both 32 and 64 bit registrations where screwed up, you may have fixed one but not the other.
How would I know and what would I do about it?
You Wrote
What platform did you select in PrimalScript?
My reflex would have been to select 64-bit. Again, how would I know and what do I do about it?
BTW: after a reboot, PS is still giving me the same old response. It debugs okay but won't run the script. This script also flashes a window on screen (from a double-click) but does not hold it there:
Option Explicit
Dim IntFirst
Dim IntSecond
Dim IntThird
IntFirst = getCoefficient
MsgBox "First Value was ", vbOKOnly, "First Value" = IntFirst
Function getCoefficient
getCoefficient = InputBox("Enter a Number : ", "getCoefficient")
End Function
Oh! That's getting really complex, isn't it?
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: No Script Engine
Ok, let me try this another way. This has nothing to do with PrimalScript. Your system's registrations are screwed up, I cannot possibly know by whom and how. You need to get your system straighten out on the OS level. As a programmer you are probably aware that resolving problems requires to find the root cause first and fix that. Secondary problems generally disappear when that is fixed.
- The platform selector in PrimalScript is on the ribbon. It says "32 bit" or "64 bit". If you cannot find that, I would recommend a glance at the manual.
- If you are not aware and familiar with the 32 and 64 bit subsystems of Windows I suggest to get a book on the subject or at the very least peruse information that is available in the internet.
- If PrimalScript debugs successfully, it means that your VBScript engine is installed and registered.
- PrimalScript is not giving you this response when you try to just run your script, it is the operating system, in particular CScript.exe
- Double clicking on a VBS file will try to run it with CScript, which is a command line tool. That in turn opens a console and displays the same error message you see captured in PrimalScript's output window.
- The "flashing" window is the console. If you do not know the difference between a console executable and a Windows executable, please do a google search, there are many good explanations available.
- To see the true output of your script, or in your case the system error message, open a console and type "CScript complexscript.vbs
Since this is a problem with your specific machine, I suggest to use another computer or a virtual machine with a somewhat virgin Windows 7 to see the differences to your computer.
If you google the error message you get from CScript, you will see that there are a few options you can try to fix this.
- The platform selector in PrimalScript is on the ribbon. It says "32 bit" or "64 bit". If you cannot find that, I would recommend a glance at the manual.
- If you are not aware and familiar with the 32 and 64 bit subsystems of Windows I suggest to get a book on the subject or at the very least peruse information that is available in the internet.
- If PrimalScript debugs successfully, it means that your VBScript engine is installed and registered.
- PrimalScript is not giving you this response when you try to just run your script, it is the operating system, in particular CScript.exe
- Double clicking on a VBS file will try to run it with CScript, which is a command line tool. That in turn opens a console and displays the same error message you see captured in PrimalScript's output window.
- The "flashing" window is the console. If you do not know the difference between a console executable and a Windows executable, please do a google search, there are many good explanations available.
- To see the true output of your script, or in your case the system error message, open a console and type "CScript complexscript.vbs
Since this is a problem with your specific machine, I suggest to use another computer or a virtual machine with a somewhat virgin Windows 7 to see the differences to your computer.
If you google the error message you get from CScript, you will see that there are a few options you can try to fix this.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.