Windows Batch File - Run Minimized?
May 22, 2005 3:43 AM   Subscribe

I've a batch file for automatically uploading a file from my computer to my webspace. The batch file does it's job perfectly but I'm having problems automating the running of the batch file. I've set up a scheduled task to run the file but the problem is that even with the batch file settings changed to 'Run Minimized' the scheduled task still runs maximised and takes over my whole screen. Since I have the file set to run every 10 minutes this is a problem. Anybody have any solutions?
posted by daveirl to Computers & Internet (5 answers total)
 
Create a shortcut to the batch file, set the screen settings in there, schedule the shortcut.
posted by krisjohn at 5:15 AM on May 22, 2005


Response by poster: I thought that would work but it doesn't appear to. I think the scheduled tasks just 'sees through' the shortcut to the batch file it's pointing to.
posted by daveirl at 5:25 AM on May 22, 2005


Best answer: The scheduled task "sees through" the shortcut if you create it using "Browse". If you edit your task to point to the actual shortcut, which ends in ".lnk", then it'll work.

The ".lnk" part of the shortcut's name is hidden by the window manager, but if your file is "test.bat", your shortcut would be called something like "Shortcut to test.bat.lnk"

More here:

"I got it to work. Simply create a shortcut to the bat file in the same directory which will create a .lnk file. Go to the properties of the lnk file and set it to run minimized. Then, go to the scheduled task and “manually” enter the path+file name of the .lnk file.

If you click browse to search for the lnk file, it won’t work."
posted by Turtle at 6:06 AM on May 22, 2005


I don't suppose you would be willing to share that batch file would you? That sounds pretty handy. I am assuming you are using FTP in the file to upload those files? If you edit out the login info then I won't see any sensitive info.

Thanks
posted by SparkyPine at 5:52 AM on May 23, 2005


Response by poster: First you save a file with the ftp commands you want to use e.g. in my case the following:

open my.webserver.ie
username
password
cd davesrants.com/azureus/
prompt
mput azureus_stats.xml
bye

Then, you simply create a batch file with the following command. 'azupdate.txt' is the name of the set of commands I wrote out above.

cd C:\Documents and Settings\Dave\My Documents\
ftp -s:azupdate.txt

posted by daveirl at 9:10 AM on May 23, 2005


« Older mobile phone sync COMM Port   |   Why does my IE jump like a Kangaroo? Newer »
This thread is closed to new comments.