Task Scheduler Command Line XML

G

Guest

I am trying to load some tasks described in an XML file from the command line
which the documentation I've seen up on MSDN and from Vista's Help suggests
is possible. I'm trying to avoid the UAC GUI (don't mind the service, but
want to do this programmatically and be able to select some instances when it
doesn't ignite). May not be possible with my build (5384 ) or ever if I
understand responses I've gotten trying to find some way to do things like
roll out admin tasks without having to visit evey PC and push the darn UAC
button...

I can load tasks using the following syntax if.....I've opened a command
prompt and clicked "run as administrator":

schtasks /create /XML <XML file location> /tn <Task Name>

If I don't run the command prompt as an admin, the UAC thing goes off...

When I try, however, loading the task using the system name and password
again described in the help,

schtasks /create /S System /U User /P Password /RU User /RP Password /XML
<XML File Location> /tn <Task Name>

I get an error saying " Error: The operation completed successfully.
Error: Failed to get the user name" whether I am in an "run as
administrator" enabled command window or not.

The help makes no reference to UAC one way or another, and this seems like a
different kind of problem. I've tried doing this both with the syntax just
described, without the RU and RP paramenters, with those parameters and not
the /S /U /P...no joy.

Please...no suggestions as to why UAC is "my friend" or that I should turn
it off...aren't helpful as I want to leave it on but not set it off in these
instances. Have seen some stuff from the UAC development group that they
are aware that some people (like me) want MS to improve it's security, but
have big problems with how UAC has been implemented...so hopefully from my
stand point that is a direction they'll take...i.e., help with the malware
problem, but not using the current approach.
 
J

Jimmy Brush

trying to find some way to do things like
roll out admin tasks without having to visit evey PC and push the darn UAC
button...

You should have said this to begin with and saved yourself a lot of trouble.

When asking for help, you should always mention what you are trying to
accomplish, not just what you perceive to be the problem.

You will need to know the login to an administrator account on each computer
you need access to. On each of those computers, you will need to change a
registry setting:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system\LocalAccountTokenFilterPolicy

This is a DWORD registry value. Create/Change it to 1.

You can now remotely administer all the vista machines by authenticating
with an administrator account on each vista machine.

This should allow schtasks to operate correctly when using it to configure a
remote machine, as well as using computer management to remotely administer
the vista machine.
 
G

Guest

Thanks for the suggestion...and sorry, but this is just one of many road
blocks I am experiencing with UAC...will try your suggesiton and thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top