Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Changing Scripting Host from WScript to CScript for Drag&Drop Operations

$
0
0

Hello everyone,

today I've run into a strange problem using the Windows Scripting Host. I've written a script that generates longer output texts and thus wanted it to run using the CScript interpreter (message boxes werent really handy for the output). So I've changed the Interpreter using the command:

"cscript.exe //H:cscript //s"

Though the changes worked on first sight, vbs files are being run by CScript now if I double click them, and all script file extensions are associated with CScript, scripts are still being run by WScript in case they are started by a drag and drop action instead of a doubleclick. I didn't find any "proper" way to change this behaviour so I went with a practical solution renaming the original WScript.exe and replacing it with a copy of CScript. Now vbs Scripts started by a drag&drop operation are (of course) bing started  correcly by CScript too.

Though I think such a dirty hack shouldn't be necessary. Does anyone know a proper way to fix this issue?


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>