Pages

Tuesday 18 September 2012

How to Run any VBScript File (*.VBS) on Windows after EVery time You Boot


Kick off your VBScript script when your PC boots and keep it running 24/7 in the background - No login necesssary
To set up a VBScript file to run as a Windows Service with AlwaysUp 6.0 and later:
  1. Download and install AlwaysUp, if necessary.
  2. Start AlwaysUp.
  3. Select Application > Add to open the Add Application window:
    Add Application
  4. On the General tab:

    • In the Application field, enter the full path to the VBScript file. We have chosen our sample script, C:\VBScripts\monitor-accounts.vbs.
    • In the Name field, enter the name that you will call the application in AlwaysUp. We have used My VBScript but you can specify virtually anything you like.
    VBScript Windows Service: General Tab
  5. If your script calls a program that needs access to its registry settings or needs to run in the security context of a specific account, then you will want to click over to the LogOn tab and enter the user name and password of the account that can run the software normally.
    VBScript Windows Service: LogOn Tab
  6. By default AlwaysUp will restart your script immediately if it exits. If you want to run it every hour, or at the same time every day, go to the Restart tab and specify when AlwaysUp should kick off the script. We have left it at the default setting in this tutorial.
    VBScript Windows Service: Restart Tab
  7. Click the Save >> button. In a couple of seconds, an application called My VBScript will show up in the AlwaysUp window. It is not yet running though.
    Note: If you are using AlwaysUp version 7.9 or earlier, AlwaysUp may complain that the VBS file is not a recognized executable. Please feel free to answer "Yes" to proceed with the setup. This has been fixed in AlwaysUp version 8.
    VBScript Windows Service: Created
  8. To run the script, choose Application > Start "My VBScript".
    VBScript Windows Service: Running
    The script is currently running in Session 0. On Windows XP and Server 2003, you can see it by logging on to that session. On Windows 7, Vista and Server 2008, you can see it if we go to Session 0 by selecting Tools > Switch to Session 0.
  9. That's it! Next time your computer boots, the VBScript file will be launched immediately, before anyone logs on. We encourage you to explore the many other settings that may be appropriate for your environment.

No comments:

Post a Comment