VBScript not a valid win32 application?

  • Thread starter Thread starter Rosemarie
  • Start date Start date
R

Rosemarie

Hello!
My problem is that when I try to run a VBscript it doesn't work.

I have the Windows Script Engine component, and I added to the data in
the registry
key %1, and also tried "%1"%* that I found in the registry on another
machine.

But it still won't work; the message is now that the VBScript is not a
valid win32
application.

Any help is appreciated
Rosemarie
 
Rosemarie,

Did you try prefacing your vbscript command with wscript
when you run it? Like this: wscript yourscript.vbs

Robert
 
Rosemarie,

You also need to make sure you have the VB6 runtime
component in your build.

Robert
 
Rosemarie,
Copy and paste this to a text file and save it as a .reg; run it and it will
fix your problems.
*************************************
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\JSEFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\JSEFile\Shell\Open2\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\JSFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\JSFile\Shell\Open2\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\VBEFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\VBEFile\Shell\Open2\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Open2\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\WSHFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\WSHFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"
*************************************
Regards,

Sean Gahan
 
I am so grateful, this really worked. It turned out that I allready had the vb6
runtime library, in spite not the special component for it.

But this made the trick.

Thank you very mutch.
/Rosemarie

Sean said:
Rosemarie,
Copy and paste this to a text file and save it as a .reg; run it and it will
fix your problems.
*************************************
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\JSEFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\JSEFile\Shell\Open2\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\JSFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\JSFile\Shell\Open2\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\VBEFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\VBEFile\Shell\Open2\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Open2\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"

[HKEY_CLASSES_ROOT\WSHFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\WScript.exe %1"

[HKEY_CLASSES_ROOT\WSHFile\Shell\Open\Command]
@="C:\\WINDOWS\\system32\\CScript.exe %1"
*************************************
Regards,

Sean Gahan

Rosemarie said:
Hello!
My problem is that when I try to run a VBscript it doesn't work.

I have the Windows Script Engine component, and I added to the data in
the registry
key %1, and also tried "%1"%* that I found in the registry on another
machine.

But it still won't work; the message is now that the VBScript is not a
valid win32
application.

Any help is appreciated
Rosemarie
 
It seemed that The dll-library whas already added by another component.
But the trick to set register key helped.

I am thankful to you, since you actually helped me discover som more
things about xpe.

/Rosemarie
 
Back
Top