RickB75 Posted January 30, 2015 Share Posted January 30, 2015 Hi guys. I have a quick question. I have a cmd line to create a scheduled task and to use the user account "SYSTEM". My script can run in the BG with no problem. I'm just wondering If user "A" downloads the compiled .EXE, will the scheduled task still run the .EXE that was downloaded since the scheduled task is set to use the "SYSTEM" account?? Just wondering. Link to comment Share on other sites More sharing options...
kylomas Posted January 30, 2015 Share Posted January 30, 2015 Have not tried but if the user account has the correct level of authority why would it not work? Best bet is to test with something non-destructive... kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
RickB75 Posted January 30, 2015 Author Share Posted January 30, 2015 I think your right. More testing is def my future. Do you happen to know how to pass the "Configure for" (windows 7, XP, windows vista) option in the cmd line? I looked here and didn't see an option for it https://msdn.microsoft.com/en-us/library/windows/desktop/bb736357%28v=vs.85%29.aspx Link to comment Share on other sites More sharing options...
kylomas Posted January 30, 2015 Share Posted January 30, 2015 No, sorry, experience level = 0 to none with this kind of thing... Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
RickB75 Posted September 3, 2015 Author Share Posted September 3, 2015 I know this thread is a few month old. I do have another question very similar to this question. I got the task scheduler to work using this line of code. RunWait("SCHTASKS /Create /SC DAILY /ST 04:00 /SD 01/29/2015 /TN RicksUpdate /TR " & @ScriptDir & "\Update.exe /RU SYSTEM")In the last param (/RU SYSTEM), I have it scheduled to run as a system task. By doing this it allows the exe to run weather the user is logged on or not. On my work PC it works flawless. On my personal though, thats another issue. I'm the admin on my personal pc. When I run this script nothing happens. If I copy the params, open CMD as the Administrator CMD and paste it in, it will schedule the task like it suppose to. Using the normal CMD, If I paste it in and remove "/RU SYSTEM", it will also schedule the task but it will not set the param to Run weather the user is logged in or not. It only sets the param to run when the user is logged in. My question is how can I schedule a task and set it to run weather the user is logged in or not even if they are not the administrator? If I am scheduling a task manually, i can choose that option in the task scheduler UI. Any Ideas??? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now