Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Make Task Scheduler run a program after another closes?

01 Jul 2010   #11

Windows 7 Ultimate SP1 (64 bit), Windows XP SP3, Linux Mint 17 MATE (64 bit)
 
 
Firefox Auto-Cleanup (D'oh!)

Ironically, I set the Firefox Auto-Cleanup on my Ubuntu 10.04 install, but not on my Windows XP & 7 installs.


I just created a tutorial (fingers crossed) to show how to use the Firefox Auto-Cleanup function.

Anyone who is unaware of how to use it, can go to this page:

Firefox Browser Auto-Cleanup (How to Set)


Firefox Browser Auto-Cleanup (How to Set)


My System SpecsSystem Spec
.

01 Jul 2010   #12

XP / Win7 x64 Pro
 
 

Oh, I thought you were looking for something that would clean your system (like ccleaner) rather than just files for the particular browser. That is a feature in Firefox I always set to use on systems other than my own.
My System SpecsSystem Spec
01 Jul 2010   #13

Windows 7 Ultimate SP1 (64 bit), Windows XP SP3, Linux Mint 17 MATE (64 bit)
 
 
Sort of...

Quote   Quote: Originally Posted by FliGi7 View Post
Oh, I thought you were looking for something that would clean your system (like ccleaner) rather than just files for the particular browser. That is a feature in Firefox I always set to use on systems other than my own.
I wanted both.

I wanted to know, if I could make Task Scheduler run CCleaner and/or AVG, after I had finished browsing the Internet (i.e. when Firefox and/or IE8 close).

If I have downloaded a file, it would be nice to scan my Downloads Folder automatically afterwards.
Most of the files, that I download, are pictures (>99%).
I normally don't download exe files (generally only updates for programs).
I don't install "trialware".

AVG is set to scan files, as they are being downloaded, but that doesn't seem to always catch malware.
For example, I have downloaded files, they have passed the scan and then when my scheduled scan runs, malware is found.
It must have come from somewhere.

I actually have several programs for System Cleaning:
  • CCleaner
  • Glary Utilities
  • Iobit Advanced System Care3
  • AVG Anti-Virus
I have used these programs for several years.

I normally run CCleaner as soon as I close Firefox.
With the last couple of weird incidents, that I have experienced, I think that I forgot to run it.
That is to say, that sometimes when I forget to clean (as soon as I close my browser), I have experienced some malware attack or other weirdness.

I can't remember experiencing any problems, when I have cleaned as soon as I have closed Firefox.

That is why I thought, that there may have been malware hiding in my cache (or elsewhere), waiting for Firefox to restart and using the opportunity to create havoc.

For example:
When I am using Firefox, can JS routines load garbage into the IE8 Temporary Internet Files folder?
What about Flash, with its "Swiss Cheese" security?

This malware business was only an example, to suggest why someone might want to run a program(s) after another has closed.
I suspect that people could write batch files, or PowerShell scripts to accomplish this.
My System SpecsSystem Spec
.


02 Jul 2010   #14

Vista Premium
 
 

Quote   Quote: Originally Posted by lehnerus2000 View Post
...I actually have several programs for System Cleaning:
  • CCleaner
  • Glary Utilities
  • Iobit Advanced System Care3
  • AVG Anti-Virus

... sometimes when I forget to clean (as soon as I close my browser), I have experienced some malware attack or other weirdness..
That is weird - I've never used any cleaner ever and never been 'attacked' by any software at all

For sure, 'cleaning' is not your problem - I suspect consciously running 'dodgy' software is

Quote   Quote: Originally Posted by lehnerus2000 View Post
...there may have been malware hiding in my cache (or elsewhere), waiting for Firefox to restart .....
You have more chance of winning the lottery than any internet browser running malicious software
My System SpecsSystem Spec
02 Jul 2010   #15

Windows 7 Ultimate SP1 (64 bit), Windows XP SP3, Linux Mint 17 MATE (64 bit)
 
 
Sorry I don't agree

Quote   Quote: Originally Posted by Chris K View Post
Quote   Quote: Originally Posted by lehnerus2000 View Post
...I actually have several programs for System Cleaning:
  • CCleaner
  • Glary Utilities
  • Iobit Advanced System Care3
  • AVG Anti-Virus

... sometimes when I forget to clean (as soon as I close my browser), I have experienced some malware attack or other weirdness..
That is weird - I've never used any cleaner ever and never been 'attacked' by any software at all

For sure, 'cleaning' is not your problem - I suspect consciously running 'dodgy' software is
Cleaners don't prevent your machine from being attacked. They remove attackers and other junk.
Anti-Virus programs and firewalls, hopefully prevent your machine from being attacked.
Not visiting dodgy sites, is also a good defense (not perfect).

Although I run mostly FOSS programs on my machine, I get them from reputable vendors (e.g. SourceForge).
I do not download software from China, Eastern Europe or Russia, using Torrents.

I have only experienced 2 minor (but embarrassing) malware attacks, in the last 9 months.

Quote   Quote: Originally Posted by Chris K View Post
Quote   Quote: Originally Posted by lehnerus2000 View Post
...there may have been malware hiding in my cache (or elsewhere), waiting for Firefox to restart .....
You have more chance of winning the lottery than any internet browser running malicious software
Um, have you heard of "Drive-by" attacks?
You visit a website, using your Internet Browser and click on a hijacked/poisoned link.
This link tries to take advantage on any "unpatched" vulnerabilities in your OS.
This occurs whilst you are browsing.
These links aren't always restricted to "dodgy" sites.

The "Pwn to Own" hacking/security competition, is almost always won using this technique.

Most critical patches, that I have seen for Windows, IE and Firefox, are to prevent remote hijacking and privilege escalations.

IMO, Flash, JS and Torrents are the biggest malware vectors.
You can avoid Torrents, but you can't avoid Flash and JS (so many idiots use these, for everything on their sites, even when it is not necessary).
My System SpecsSystem Spec
02 Jul 2010   #16

Vista Premium
 
 

[QUOTE=lehnerus2000;819569]
Cleaners don't prevent your machine from being attacked. They remove attackers and other junk.[QUOTE=lehnerus2000;819569]

Like I say - never used *any* cleaner *ever* in my life - do you think i'm just lucky?

Quote   Quote: Originally Posted by lehnerus2000 View Post
Um, have you heard of "Drive-by" attacks?
You visit a website, using your Internet Browser and click on a hijacked/poisoned link.
This link tries to take advantage on any "unpatched" vulnerabilities in your OS.
This occurs whilst you are browsing.
You do think I'm just lucky

Browser 'vulnerabilities' are plugged within minutes of potential hazard - Like i say - you have better chance of winning the lottery than your browser 'allowing' such problem thru

My money (all of it) would be on you consciously installing software on your machine - if you notice any adverse affects after doing so then just roll back your settings prior to the install and dont worry about temp int files - they're totally inhert
My System SpecsSystem Spec
02 Jul 2010   #17

XP / Win7 x64 Pro
 
 

Quote   Quote: Originally Posted by lehnerus2000 View Post
Quote   Quote: Originally Posted by FliGi7 View Post
Oh, I thought you were looking for something that would clean your system (like ccleaner) rather than just files for the particular browser. That is a feature in Firefox I always set to use on systems other than my own.
I wanted both.

I wanted to know, if I could make Task Scheduler run CCleaner and/or AVG, after I had finished browsing the Internet (i.e. when Firefox and/or IE8 close).

If I have downloaded a file, it would be nice to scan my Downloads Folder automatically afterwards.
Most of the files, that I download, are pictures (>99%).
I normally don't download exe files (generally only updates for programs).
I don't install "trialware".

AVG is set to scan files, as they are being downloaded, but that doesn't seem to always catch malware.
For example, I have downloaded files, they have passed the scan and then when my scheduled scan runs, malware is found....
I used to run AVG a while ago when it first started getting hype, but quit using it after it failed to perform as I liked. I would suggest you remove AVG and start using Avira Antivir. I have been running the free version for a couple years now and it not only has excellent scanning abilities to find hidden rootkits, but it exercises some of the best heuristics for real-time acquisition of questionable files I have ever seen. It has also been at, or very near, the top of the detection rate scales for AV products for a couple years now.

This helps immensely for those drive-by-downloads or even any questionable JS within web pages. As soon as the web page loads, and the heuristics find a questionable piece, it blocks it, allows you to remove it, and then performs a quick scan of the folder to see if anything else was left behind.

I really think this would help you greatly for your particular concerns.

http://www.free-av.com/en/download/1...antivirus.html
My System SpecsSystem Spec
03 Jul 2010   #18

Windows 7 Ultimate SP1 (64 bit), Windows XP SP3, Linux Mint 17 MATE (64 bit)
 
 
Um, Zero Day Exploits.

Quote   Quote: Originally Posted by Chris K View Post
Browser 'vulnerabilities' are plugged within minutes of potential hazard - Like i say - you have better chance of winning the lottery than your browser 'allowing' such problem thru
Um, Zero Day Exploits.

Pugged within minutes?
The Mighty Fall at Pwn2Own (March 25th, 2010)
Welcome to TechNewsWorld

Microsoft finally fixes Pwn2Own browser flaw (8th June, 2010)
Microsoft finally fixes Pwn2Own browser flaw | ZDNet

Time = 75 days or 1800 hours or 108,000 minutes.

I am not questioning your statement about malware on your PC.
The fact remains, that not everyone does the "wrong thing" and yet somehow malware gets onto their PCs.

Quote   Quote: Originally Posted by FliGi7 View Post
I used to run AVG a while ago when it first started getting hype, but quit using it after it failed to perform as I liked. I would suggest you remove AVG and start using Avira Antivir. I have been running the free version for a couple years now and it not only has excellent scanning abilities to find hidden rootkits, but it exercises some of the best heuristics for real-time acquisition of questionable files I have ever seen. It has also been at, or very near, the top of the detection rate scales for AV products for a couple years now.

This helps immensely for those drive-by-downloads or even any questionable JS within web pages. As soon as the web page loads, and the heuristics find a questionable piece, it blocks it, allows you to remove it, and then performs a quick scan of the folder to see if anything else was left behind.

I really think this would help you greatly for your particular concerns.

Avira AntiVir Personal - FREE Antivirus
Thanks FliGi7.

I have been considering changing AV programs.

On my Windows 7 install, AVG started popping up an ad, each time I logged in.
Ironically, the ad has several broken scripts, which Windows asked me to kill.
I had to kill the Sys Tray helper to stop it.

It doesn't happen on XP.
My System SpecsSystem Spec
18 Apr 2012   #19

Win7 x64
 
 

Google got me to this thread because I have been searching for a similar solution (before the thread drifted away )

Anyways, I understand the problem was how to run a program (or a batch file) after another program/process has been closed. I have myself so far also concluded that you should log the process in event viewer/application log and then it would be easy to create a task for the batch file to run based on log id.

An alternative I already use is a batch file / task that runs every say, 10 minutes and checks if a process is running if it is it runs something, if it isn't, it runs something else:
tasklist /FI "IMAGENAME eq xbmc.exe" | find /i "xbmc.exe"
rem echo %errorlevel%
if not errorlevel 1 goto progon

: progoff
run command

: progon

run different command
But this doesn't work in my case because I want to run the batch file only *once* after the process has stopped - the above solution runs it multiple times, ie every 10 minutes.

I was wondering if the op has found any answer to this.
My System SpecsSystem Spec
19 Apr 2012   #20

Windows 7 Ultimate SP1 (64 bit), Windows XP SP3, Linux Mint 17 MATE (64 bit)
 
 

Thanks for that code.
Someone else suggested using the Event IDs (on a different thread, I can't remember which one).

I created a VB script, which lets me select my FF profile, starts FF and runs CCleaner (when I exit FF).

I start the script using a batch file (I can give the batch file a custom icon).
My System SpecsSystem Spec
Reply

 Make Task Scheduler run a program after another closes?




Thread Tools



Similar help and support threads for2: Make Task Scheduler run a program after another closes?
Thread Forum
Task scheduler program start minimized Software
Task scheduler unable to load task status/active tasks at startup. Performance & Maintenance
Solved How to close/exit some program using Task Scheduler in Windows 7? General Discussion
Task Scheduler - run program on wake General Discussion
Solved Task Scheduler failing to start task with merged network locations General Discussion
How to Configure Task Scheduler to Run Program When Dial-up Connection Performance & Maintenance
Task Scheduler Trigger @ Program shutdown Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:34 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33