Giter Club home page Giter Club logo

Comments (4)

batchfileframework avatar batchfileframework commented on July 20, 2024

I have not tried this but there is a command to create a scheduled task, to run at boot, with elevated privileges

schtasks /create /f /tn "RunAltSnap" /tr "C:\Path\To\AltSnap.exe" /sc onlogon /rl highest

Here is the meaning of those arguments as per schtasks /create /?

/F                 Forcefully creates the task and suppresses warnings if
                   the specified task already exists.

/TN   taskname     Specifies the string in the form of path\name
                   which uniquely identifies this scheduled task.

/TR   taskrun      Specifies the path and file name of the program to be
                   run at the scheduled time.
                   Example: C:\windows\system32\calc.exe

/SC   schedule     Specifies the schedule frequency.
                   Valid schedule types: MINUTE, HOURLY, DAILY, WEEKLY,
                   MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE, ONEVENT.

/RL   level        Sets the Run Level for the job. Valid values are
                   LIMITED and HIGHEST. The default is LIMITED.

from altsnap.

batchfileframework avatar batchfileframework commented on July 20, 2024

It is possible to check if the task exists with

schtasks /query /tn "RunAltSnap" /fo LIST

/TN   taskname       Specifies the task path\name for which
                     to retrieve the information, else all of them.
/FO   format         Specifies the format for the output.
                     Valid values: TABLE, LIST, CSV.

And it is possible to delete the task with

schtasks /delete /tn "RunAltSnap" /f

from altsnap.

RamonUnch avatar RamonUnch commented on July 20, 2024

There is also an AltSnap.xml file in the installation directory to help users to setup the Scheduled task.
Because Scheduled tasks are invisible in the task manager's startup list, I do not put AltSnap there by default, Also many users will not use it elevated anyway.

I will Add the command line options in the wiki, and to the readme file, this will be helpful to some users indeed.

from altsnap.

RamonUnch avatar RamonUnch commented on July 20, 2024

Referenced in the README FIRST issue, so I close it.

from altsnap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.