More...
Products
Social Connection
Are you looking for...
- VBScript to EXE Compiler
- MIDI to WAV MP3 Converter
- How to record Spotify music
- How to record Rhapsody stream?
- Audio Logger
- Vista Sound Recorder
- Record streaming audio
- How to transpose music?
- Record Skype Calls
- WAV Recorder
- How to slow down music
- How to record music from MySpace?
- Voice Recorder
- FLAC converter MP3
- Convert FLAC to M4A
Script Execution ModeWindows Scripting Host supports two modes of script execution - console and windowed. Quite often the scripts require access to stdio and therefore they should be run through cscript.exe. If they are running through wscript.exe it will cause an error. To avoid this error, use the following code to force usage of CSCRIPT.EXE:
sub force_cscript
dim args : args=""
dim i, wshshell
If right(lCase(wscript.fullname),11)= "wscript.exe" then
for i=0 to wscript.arguments.count-1
args = args & wscript.arguments(i) & " "
next
set wshshell=createobject("wscript.shell")
wshshell.run wshshell.ExpandEnvironmentStrings("%comspec%") & _
" /c cscript.exe //nologo """ & wscript.scriptfullname
& """" & args 'change to /k for stay
set wshshell=nothing
wscript.quit
end if
end sub
ScriptCryptor allows you to specify the execution mode at compile time so the above code is no longer needed. Moreover, it will cause an error of execution because it will attempt to execute an EXE file instead of the VBS. Execution mode can be selected in the Settings window of the project before compilation. |