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?
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
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
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
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:
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.
posted by daveirl at 9:10 AM on May 23, 2005
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
This thread is closed to new comments.
posted by krisjohn at 5:15 AM on May 22, 2005