0

My understanding is that all of the various .vbs apps are running against wscript.exe

I had reason to experiment with a few .vbs scripts, then wanted to manage the running scripts (e.g., list them, start, stop, restart, etc).

My search results indicated ways of doing this that mostly involved using more .vbs to do so, which is fine. However I am curious about this GUI settings window for wscript (the window is titled Windows Script Host Settings).

There are only 2 options -

  1. Stop script after specified number of seconds
  2. Display logo

If I check #1, what's actually happening? Is this affecting wscript.exe itself and/or the various running .vbs?

I'm confused in part because I don't notice any effect when I check the box. I'm also confused because this seems to be a persistent option, which conflicts with my guess at how I thought it worked.

This answer is not required, but I'm also curious why I never see a logo appearing anywhere, even though that option is checked and .vbs scripts run constantly on this computer...

1 Answer 1

0

As far as I know the settings you configure in the "Windows Script Host Settings" (accessed by opening wscript.exe without any parameters) apply to the current user, both for wscript and cscript and are stored in:

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings

Meaning if you are using runas configured settings may not apply.

However settings can also be applied on per script basis. For this create and .vbs file, open its properties and switch to the tab "Script". After clicking Ok a .wsh file with the same name as the .vbs file will be created and the script must be started via this "shortcut" for the settings to apply.

Stop script after specified number of seconds: This will kill the script after X seconds if it hasn't stopped by itself after X seconds. (tested both via global and script based settings)

Display logo will cause cscript.exe to display the following message at the beginning of script execution:

Microsoft (R) Windows Script Host, Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

Most information from: http://wsh2.uw.hu/ch01d.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .