?
Solved

Correct syntax for using "-autostart" when running a windows exe via scheduled task

Posted on 2009-05-07
3
Medium Priority
?
572 Views
Last Modified: 2012-05-06
Hi, I am working on my first windows scheduled task. I want to add "-autostart" to this scheduled task:

Run: "C:\Documents and Settings\Administrator\Desktop\GDocBackup.0.3.0.BIN\GDocBackup.exe"

Start in: Settings\Administrator\Desktop\GDocBackup.0.3.0.BIN"

--

This is the exe I am trying to autostart in a scheduled task:

http://gs.fhtino.it/gdocbackup

This is info from developer about -autostart usage:

Command line options:

    * -autostart :   Automatically starts backup. If no errors are encountered, the GDocbackup quits automatically. If there are errors, the standard message box appears. The switch is useful for scheduled run. An example:schedule it at session start / login, so, when you login, GDocDackup starts automatically and downloads all modified documents.
    * -writelog :   Writes log message to a text file. Filename: GDocBackup_yyyyMMdd.log.  Path on Windows Vista, the user temp directory (C:\Users\USERNAME\AppData\Local\Temp\). Oon Linux:  /tmp/


--

If I can get the -autostart to work. Can I have both -autorun and -writelog in same run command?

Thanks for any info.

0
Comment
Question by:Mark B
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Assisted Solution

by:Rick Hobbs
Rick Hobbs earned 800 total points
ID: 24331295
Depending on how the exe parses the command line, it would be either:
Run: "C:\Documents and Settings\Administrator\Desktop\GDocBackup.0.3.0.BIN\GDocBackup.exe -autostart"
or
Run: "C:\Documents and Settings\Administrator\Desktop\GDocBackup.0.3.0.BIN\GDocBackup.exe" -autostart

As for mixing the command functions, get the first one to work and the try the others.  It depends on whether the exe will accept the additional switches.
0
 
LVL 3

Accepted Solution

by:
ranit8 earned 1200 total points
ID: 24331876
"C:\Documents and Settings\Administrator\Desktop\GDocBackup.0.3.0.BIN\GDocBackup.exe -autostart"
This cant work (except in the unlikely case you do have a file named "GDocBackup.exe -autostart" in that folder)

"C:\Documents and Settings\Administrator\Desktop\GDocBackup.0.3.0.BIN\GDocBackup.exe" -autostart -writelog
This is the correct command line. I wouldnt think twice about using both parameters at the same time as they do not oppose each other. And most times the developer will say to not use them at the same time if they are not compatible. It's a simple task, no reason to believe that application would fail to do this.
0
 

Author Closing Comment

by:Mark B
ID: 31579248
Thank you, this work great: "C:\Documents and Settings\Administrator\Desktop\GDocBackup.0.3.0.BIN\GDocBackup.exe" -autostart -writelog
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question