Batchfile schtasks problem

Home Forums Scripting DOS Command Shell Batchfile schtasks problem

This topic contains 4 replies, has 4 voices, and was last updated by Avatar jgvasdsa5 6 years, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #159363

    Hi all!

    Here’s my problem: I want all domain computer to run at logon a script, that will create a schedule task, like this:

    schtasks /create /TN redemarrage /RU domainadministrator /RP password /SC “toutes les semaines” /D JEU /TR c:Scriptsreboot_pc.bat /ST 04:00:00

    sorry, parameter are in french as the hole company has french OS :D

    The issue? if the user is not an admin, I get this message:

    WARNING: The Scheduled task “redemarrage” has been created, but may not run because the account information could not be set.

    It will create the task but with the user as creator and as run as.. Can’t get rid of it. I tried using SYSTEM, same error.

    ANyone already seen this?

    Thanks for any help :D

    Avatar
    sara
    Member
    #375764

    Re: Batchfile schtasks problem

    Well, if I stop the tasks scheduler, and restart it, wait for 15 mins, it works, but if I attempt again removing them and recreate, it doesn’t work, but shouldn’t need to be removed after it works.

    Rems
    Rems
    Moderator
    #228210

    Re: Batchfile schtasks problem

    ChristTheGreat;261887 wrote:
    Hi all!
    WARNING: The Scheduled task “redemarrage” has been created, but may not run because the account information could not be set.

    What error number and its description comes with the warning message? What’s the OS on the clients?

    /Rems

    Avatar
    jgvasdsa5
    Member
    #376550

    Re: Batchfile schtasks problem

    Why not schedule the task by group policy?
    http://technet.microsoft.com/en-us/library/cc725745.aspx

    Avatar
    sara
    Member
    #375765

    Re: Batchfile schtasks problem

    gerth;261957 wrote:
    Why not schedule the task by group policy?
    http://technet.microsoft.com/en-us/library/cc725745.aspx

    Sorry long delay, I was not in good shape, but better than ever now :D

    Well, this appleis for 2008 +, our Domain controller are Windows 2003 R2. I doN’t think we are going to move to 2008/2012 sicne a couple of time.. Budget :(

    but I’ll keep this in note for other customer :)

    + Rep

    @rems

    I changed mind and went with only reboot from WSUS with the updates, for now, I’ll work on this after holidays, and post the error.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.