I often use this command to create a scheduled shutdown. You could also use to run any program you want.
schtasks /Create /SC daily /RU DOMAIN\user-account /RP myPassword /ST 18:00 /TN Auto-shutdown1800 /TR "%windir%\system32\shutdown.exe /s /f"
Just replace your username, password, and give it a unique name. Continue reading “Create A Scheduled Shutdown Via Script In Windows”
Some application installers in Windows do not create a desktop icon. I used this script to create one for all users. Just modify the highlighted lines per your environment.
echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
echo sLinkFile = "%PUBLIC%\Desktop\ShortcutName.lnk" >> %SCRIPT%
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
echo oLink.TargetPath = "%SYSTEMDRIVE%\Program Files\MyApp.exe" >> %SCRIPT%
echo oLink.WorkingDirectory ="%SYSTEMDRIVE%\Program Files" >> %SCRIPT%
echo oLink.Save >> %SCRIPT%
cscript /nologo %SCRIPT%
Desktop management software, such as Casper, has the feature of running scripts when a computer meets a certain criteria. You can create a similar effect using launchd by creating a Launch Daemon or Launch Agent. These run in the background and you can use them to trigger a script to run. Basically, if you know how to script something, you can get it to run automatically via launchd . Continue reading “OS X: Triggering Automation Scripts Using launchd”