Results 1 to 13 of 13
  1. #1
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Shortcut to a task

    I am trying to set up a desktop shortcut that will activate a task, but I cannot seem to get it.

    The shortcut as it is now is

    C:\Windows\System32\schtasks.exe /RUN /TN "C:\Windows\System32\Tasks\Microsoft\Windows\ERUNT \ERUNT_Backup"

    What is wrong here that it will not run?

    Regards,
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  2. #2
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,593
    Thanks
    5
    Thanked 1,059 Times in 928 Posts
    What happens when you try to execute that from a command line?

    Joe

  3. #3
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    It just doesn't execute, Joe. A dos window flashes by, but too fast to even see what's in it.

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  4. #4
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    Quote Originally Posted by CWBillow View Post
    It just doesn't execute, Joe. A dos window flashes by, but too fast to even see what's in it.

    Chuck
    You have an easy way to see the error: open a command prompt and try running the command there.
    Rui
    -------
    R4

  5. #5
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Quote Originally Posted by CWBillow View Post
    C:\Windows\System32\schtasks.exe /RUN /TN "C:\Windows\System32\Tasks\Microsoft\Windows\ERUNT \ERUNT_Backup"
    What is wrong here that it will not run?
    Chuck,

    What is wrong is you are showing a path for the Task name {/TN} what you need is the name of the task from the Task Manager.
    Something like this: C:\Windows\System32\schtasks.exe /run /tn "Revo UnInst as Admin"
    TaskSch.JPG
    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  6. #6
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    Duh! Thanks .

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  7. #7
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    I'll check that. Thanks RG.

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  8. #8
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    RG;

    OK, if I use a "total" path name

    C:\Windows\System32\schtasks.exe /run /tn "C:\Windows\System32\Tasks\Microsoft\Windows\ERUNT \ERUNT_Backup"

    I get

    ERROR: The filename, directory name, or volume label syntax is incorrect.

    If I use

    C:\Windows\System32\schtasks.exe /run /tn "ERUNT_Backup"

    I get

    ERROR: The system cannot find the file specified.

    This started out seeming as a pretty direct objective. It has to be some tiny issue...

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  9. #9
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Chuck,

    Have you checked the Task setup on the Action tab and make sure you have the path information correct for the Erunt program? HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  10. #10
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    RG, I'm not sure I am understanding your question...but, if it is have I checked the path to the ERUNT prog and then the path in ERUNT, I believe I have and had. I attached an export of the task itself, changing the extension from xml to txt, and my understanding of the shortcut would be and is the following command-line:

    C:\Windows\System32\schtasks.exe /run /tn "C:\Windows\System32\Tasks\Microsoft\Windows\ERUNT \ERUNT_Backup"

    Chuck
    Attached Files Attached Files
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  11. #11
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Chuck,

    I just loaded ERUNT and ran a test and it worked just fine.
    ERUNT_Backups.JPG
    The first entry was before I added the date time parameters. You'll notice I'm saving to a NAS drive.

    Here's my shortcut Target: C:\Windows\System32\schtasks.exe /run /TN "ERUNT as Admin"

    Task Scheduler:
    Program/script: "C:\Program Files (x86)\ERUNT\ERUNT.EXE"
    Add arguments (optional): "\\MYBOOKLIVE\CMShared\ERUNTBkUps\#Date#_#Time #\"
    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  12. The Following User Says Thank You to RetiredGeek For This Useful Post:

    CWBillow (2013-12-30)

  13. #12
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    RG, I finally got mine to work. It was in the path that my problem was cropping up.

    My shortcut (that works) has [C:\Windows\System32\schtasks.exe /run /TN "\Microsoft\Windows\ERUNT\ERUNT_Backup"] on the Target line (square brackets omitted). It needed the entire path to schtasks.exe, BUT, for the task, it presupposed the "C:\Windows\System32\Tasks\" part of the path, and only started from there (\Microsoft....).

    What seems perfectly logical in retrospect certainly made no sense from the trenches!

    Thanks for the assist, RG.

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  14. #13
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Chuck,

    Glad you got it sorted.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •