I've used Task Scheduler to create a task that runs a program on demand with Admin privileges to bypass the Y/N response from the system that I would otherwise get when trying to run an EXE. I manually created the task using Task Scheduler. I can run the Task Scheduler task on demand, such as by creating a shortcut that points to that Task Schedule task.
Today, I ran across someone saying that I can do that with InnoSetup, with a [RUN] entry that contains the same arguments as would be used when running schtasks.exe in a CMD window.
So, to start with, I created a small app called myapp.exe, then opened a command prompt in the app folder and tried this:
But, it gets a message saying the /SC option is missing, so I tried this:
But that in turn gets the error message that /ST (starttime) is required, so finally I've tried this:
That gets the error that in invalid ST was used. But HELP says ST defaults to the current time is /ST is not specified.
Has anyone had success using Task Scheduler with InnotSetup or manually in a CMD window?
Two pages where I read about it:
https://stackoverflow.com/questions/...ith-inno-setup
http://tukeys.blogspot.com/2013/02/i...scheduled.html
InnoSetup Help on RUN
https://jrsoftware.org/ishelp/index....c=taskssection
I can successfully create a task using this example from HELP at the command prompt so I know the method works in general, just not for the example I made up:
Once it seems to work at the command line prompt I'll try it in InnoSetup.
Today, I ran across someone saying that I can do that with InnoSetup, with a [RUN] entry that contains the same arguments as would be used when running schtasks.exe in a CMD window.
So, to start with, I created a small app called myapp.exe, then opened a command prompt in the app folder and tried this:
Code:
schtasks.exe /Create /RL Highest /TN myapp /TR c:\temp\myapp.exe
Code:
schtasks.exe /Create /RL Highest /TN myapp /TR c:\temp\myapp.exe /SC Once
Code:
schtasks.exe /Create /RL Highest /TN myapp /TR c:\temp\myapp.exe /SC Once /ST
Has anyone had success using Task Scheduler with InnotSetup or manually in a CMD window?
Two pages where I read about it:
https://stackoverflow.com/questions/...ith-inno-setup
http://tukeys.blogspot.com/2013/02/i...scheduled.html
InnoSetup Help on RUN
https://jrsoftware.org/ishelp/index....c=taskssection
I can successfully create a task using this example from HELP at the command prompt so I know the method works in general, just not for the example I made up:
Code:
SCHTASKS /Create /SC MONTHLY /MO first /D SUN /TN gametime /TR c:\windows\system32\freecell
Comment