Legacy documentation. This guide still works, but it relates to discontinued or superseded software. It is kept for anyone running an older setup and is no longer part of the current CloudWatcher documentation.
NOTE: this is not necessary for current versions.
The VB script
To avoid having to manually launch AAG's CW software each time… the first step is to define no users in Windows—then it will automatically start the default user session (Windows 10, see below).
This VB script will do the rest of the trick, recording the user data file overwriting its current contents:
Dim oCW
set oCW = CreateObject("AAG_CloudWatcher.CloudWatcher")
oCW.Device_Start()
oCW.RecordStart False
Set oCW=nothingYou can download this script from here—alternatively, place these few lines of code in an ASCII file with extension .vbs (e.g. AutoStartCW.VBS) and place a shortcut in the Startup section of the Windows menu.
Other versions of the script
- If you don't want to overwrite, but rather preserve the data in the user data file, please use this version instead.
- If you don't want to start recording to the user data file, this is the correct one then.
Using the Windows Startup folder
The simplest approach is to place a shortcut to the script in the Windows Startup folder:
- Press Win + R, type
shell:startupand press Enter. This opens the Startup folder for the current user. - Right-click inside the folder and choose New → Shortcut.
- Browse to the .vbs script file you downloaded or created above.
- Click Finish. The script will now run automatically when this user logs in.
This method requires a user to be logged in. For an always-on observatory PC that logs in automatically, this is usually sufficient.
Auto-login
If you also want the PC to log in automatically after a reboot, so the Startup folder method works without anyone present:
- Press Win + R, type
netplwizand press Enter. - Uncheck Users must enter a user name and password to use this computer.
- Enter the account password when prompted and click OK.
Also configure Windows Update: automatic restarts after updates can interrupt a night's automation. See avoiding unwanted Windows reboots.
For Windows 10, you may need to additionally follow these steps
Execute the «Task Scheduler»—you can search for it by typing Task Scheduler in the search bar in the Windows toolbar. Then perform the following:
- Press «Create task…» on the right (NOTE: do not click Create Basic Task).
- On the General tab: enter a name for the task—it can be anything; the original author entered «CloudwatcherStart». Check «Run with highest privileges».
- On the Triggers tab: drop down the «Begin the task» and select «At log on», set to Any User, and make sure «Enabled» is checked.
- On the Action tab: in the Program/Script entry box, put the location of the vbs script file.
- On the Settings tab: uncheck «Stop the task if it runs longer than…» and uncheck «If the running task does not end…».
Press OK to save the newly scheduled task.
«After I restart the computer (I have auto-logon configured) the task started up just fine. I don't know why this worked over running it manually, but I'm not going to argue with success.»
Thank you very much to Timothy Hutchison for this input.
Brief explanation of the script
- The instruction
oCW.Device_Start()will launch AAG_CloudWatcher. - The instruction
oCW.RecordStart Falsewill start recording data to the user data file in an empty file (erasing its previous contents). - If instead one uses
oCW.RecordStart Truethe information is appended to the existing file.
