Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista - Task Scheduler Command Line XML

Reply
 
Old 09-01-2006   #1 (permalink)
=?Utf-8?B?c2VucmFiZGV0?=


 
 

Task Scheduler Command Line XML

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.

My System SpecsSystem Spec
Old 09-02-2006   #2 (permalink)
Jimmy Brush


 
 

Re: Task Scheduler Command Line XML

> 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.

--
- JB

Windows Vista Support Faq
http://www.jimmah.com/vista/

My System SpecsSystem Spec
Old 09-05-2006   #3 (permalink)
=?Utf-8?B?c2VucmFiZGV0?=


 
 

Re: Task Scheduler Command Line XML

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.

"Jimmy Brush" wrote:

> > 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.
>
> --
> - JB
>
> Windows Vista Support Faq
> http://www.jimmah.com/vista/
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Task Scheduler - taskeng.exe command line General Discussion
Launch command window from task scheduler Vista General
Task scheduler returns an error : the task image is corrupt ortamp Vista performance & maintenance
Task Scheduler - command <schtasks /query /fo csv /nh> does not wo Vista General
Task Scheduler Command Line & Files Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46