![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Determine if script was run from command prompt How can I determine in my VBScipt whether the script was run from the command prompt or from double clicking in Windows Explorer? I want to pause the script at the end if it was run from the command prompt but Wscript.StdIn.ReadLine errors if it the script is not run as with the console. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Determine if script was run from command prompt On Oct 17, 10:43*am, cwhan...@xxxxxx wrote: Quote: > How can I determine in my VBScipt whether the script was run from the > command prompt or from double clicking in Windows Explorer? *I want to > pause the script at the end if it was run from the command prompt but > Wscript.StdIn.ReadLine errors if it the script is not run as with the > console. invoked to run the script. In general, WScript.exe is the GUI host and cscript.exe is the console host. These names could be changed, but 99.44% of the time this should be accurate. Tom Lavedas ------------------- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| best way to determine if a command history exists? | PowerShell | |||
| Wanting persistent variables from script at PS command prompt | PowerShell | |||
Make a command prompt run a command as soon as it opens? | General Discussion | |||
| My command works in the PS prompt but not in a script (.ps1) / reg | PowerShell | |||
| Every time I run script from command prompt I get restricte cert e | PowerShell | |||