Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-05-07
3
Medium Priority
?
576 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
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…

610 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