Error DataBase-One Place all Solutions Forums Blog Glossary    Contact Us
Search  
   
Browse by Category
Error DataBase-One Place all Solutions .: Operating Systems .: Windows Operating Systems .: Windows Scripts and Batch Files .: Have the VBScript check to see if it is being run with CScript or WScript

Have the VBScript check to see if it is being run with CScript or WScript

Option Explicit
Dim Script, ScriptRun
Script = WScript.FullName
ScriptRun = lcase(mid(Script, InstrRev(Script, "\")+1))

' Main Procedure
If not Scriptrun = "cscript.exe" then
WScript.Echo "WScript"
Else
Wscript.Echo "CScript"
End IF


How helpful was this article to you?

Related Articles

article How to check disk usage using DIRUSE command
Syntax DIRUSE [options] Folders... ...

(No rating)  3-7-2008    Views: 188   
article How to check and repair disk problems using chkdsk.exe
Check Disk - check and repair disk problems...

(No rating)  3-7-2008    Views: 162   
article VB Script to Remove the OS Version Check from an MSI file
Description: create vbs file and drag...

(No rating)  3-24-2008    Views: 136   

User Comments

Add Comment
No comments have been posted.