Run a script on Windows startup without a user logged on

后端 未结 5 968
半阙折子戏
半阙折子戏 2021-02-01 23:40

This is a Windows 2003 (or later) machine that gets switched on every morning, but no one logs on until some hours later.

I want to use the time in between to run a back

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-01 23:58

    The way you aleady do this seems fine to me; however if you want an alternative approach then services get started when the machine boots so you could write a service that detects if it's a new day (to allow for reboots) and if it is then run your backup.

    If I was doing this as a service I'd use TCL because I know it and like it and it has an extension twapi that allows you to run a script as a service. Other scripting languages may well have similar facilities.

提交回复
热议问题