Solved

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

Posted on 2009-05-07
3
566 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 200 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 300 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

691 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