Make Task Scheduler run a program after another closes?

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #11

    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 Computer


  2. Posts : 1,814
    XP / Win7 x64 Pro
       #12

    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 Computer


  3. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #13

    Sort of...


    FliGi7 said:
    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 Computer


  4. Posts : 34
    Vista Premium
       #14

    lehnerus2000 said:
    ...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

    lehnerus2000 said:
    ...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 Computer


  5. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #15

    Sorry I don't agree


    Chris K said:
    lehnerus2000 said:
    ...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.

    Chris K said:
    lehnerus2000 said:
    ...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 Computer


  6. Posts : 34
    Vista Premium
       #16

    [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?

    lehnerus2000 said:
    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 Computer


  7. Posts : 1,814
    XP / Win7 x64 Pro
       #17

    lehnerus2000 said:
    FliGi7 said:
    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 Computer


  8. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #18

    Um, Zero Day Exploits.


    Chris K said:
    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.

    FliGi7 said:
    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.
    Last edited by lehnerus2000; 03 Jul 2010 at 08:56. Reason: Additional
      My Computer


  9. Posts : 40
    Win7 x64
       #19

    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 Computer


  10. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #20

    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 Computer


 
Page 2 of 3 FirstFirst 123 LastLast

  Related Discussions
Our Sites
Site Links
About 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 10:58.
Find Us