|
Answer» Hi there, I want to run a batch file each 16TH and 17th day of the month, and I need it to be run as administrator, but I don't want an UAC window that prompts on the 16th or 17th day of the month. I would also like that the batch file is ran as soon as the pc is started on the 16th or the 17th of the month (I allready tried some things with the command at, but it seems that you have to specify an hour, and the problem is I can't predict the hour on which the user will use his pc). To explain as best as possible: have the possibility to run the batch file as administrator (the batch file that includes the 'at' command), but I would like that on the 16th or 18th of the month, I don't want to press a yes on an UAC dialogue in ORDER to run the batch file that the at command had previously configured
Thanks in forward for your help and sorry for my bad englishAs SEEN as I don't get a lot of response, i'll post what I allready succeeded in:
Now I have made a cronjob with:
SCHTASKS /Create /TN runprogram /TR c:\windows\... /sc daily /SD 24/05/2010
but the problem is: on the 24th I still get an UAC control window to run the batch file. How can I prevent that?Quote from: Blackberry on May 08, 2010, 04:37:35 AM As seen as I don't get a lot of response, i'll post what I allready succeeded in:
Now I have made a cronjob with:
SCHTASKS /Create /TN runprogram /TR c:\windows\... /sc daily /sd 24/05/2010
but the problem is: on the 24th I still get an UAC control window to run the batch file. How can I prevent that?
http://www.windowsnetworking.com/kbase/WindowsTips/WindowsXP/AdminTips/Utilities/XPschtaskscommandlineutilityreplacesAT.exe.html
C:\test>SCHTASKS /Create /TN runprogram /TR c:\windows\... /sc daily /sd 06/05/2010 SUCCESS: The scheduled task "runprogram" has successfully been created.
sd format is month/day/year and not day/month/year might be the problem.
C:\test>SCHTASKS /End /TN runprogram SUCCESS: The scheduled task "runprogram" has been terminated successfully.
http://social.technet.microsoft.com/Forums/en/winserverManagement/thread/454b0e9e-1ef1-4026-a8e3-91766f049f91 Blackberry: maybe you can force it to run as the admin directly by using the /u and /p switches? (/u machine/administrator /p )
|