Henry Says:
November 18th, 2004 at 7:19 pm
I got it to work. Simply create a shortcut to the bat file in the same directory which will create a .lnk file. Go to the properties of the lnk file and set it to run minimized. Then, go to the scheduled task and “manually” enter the path+file name of the .lnk file.
If you click browse to search for the lnk file, it won’t work.
Then run the task and all you will see is a little flash or minimized icon on your taskbar while the bat does its thing.
Email me if you need help on this.
editado
Darrell Says:
January 5th, 2005 at 2:00 pm
You can do this without creating a shortcut. Simply set up a scheduled task and set the field “Run as:” to “NT AUTHORITY\SYSTEM” (no quotes).
I have setup a simple .bat file in XP, (all it does is populates a txt file with the time it ran), put the path of the file in the Run: text box, then set the Run as: = NT AUTHORITY\SYSTEM , then set it to run every minute. The window that use to come up doesn’t anymore.
The way i figured it out was by setting up a scheduled task using the command line.
c:\at 13:30 “c:\time.bat” ^c:\output.txt
Doing this basically created a scheduled task in Task Scheduler to run time.bat at 1:30pm. When i went to task scheduler, it had a task called AT# (when you set up the task through the command-line, it tells you that it added a new job with job ID = #, where # is some number.
^c:\output.txt tells it to output to a text file called output.txt. (i don’t know how to actually set this output file when setting up a task through the GUI)
If you click on the Task AT# in task scheduler and look at the Run as: textbox, you should see a value that you should be able to use to run this task without the window showing up.
Marcadores