title: Python code to automatically update CC Cleaner & Adobe Flash Player
body: <p>Recently in the last few months my computer has been constantly 
  telling me to update the flash player, CCleaner is Always out of date
  &amp; there is usually an update to be done to Bleachbit or Nvidia.</p>
  
  <p>I know that <a href="https://ninite.com" rel="nofollow noreferrer">https://ninite.com</a> used to do automatic updates, but they no longer do &amp; is only for premium/pro membership, the same as it is with CCleaner. its time consuming to keep constantly checking these for updates, downloading the files, going to my downloads, going though there installers etc.. this is time that could be better spent.</p>
  
  <p>related questions that pertain to these issues found here on Stack Exchange &amp; other sites:</p>
  
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://superuser.com/questions/508639/why-are-there-two-types-of-adobe-flash-player-download-update?rq=1">Two Instances of Adobe Flash Player</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://superuser.com/questions/301163/getting-notified-of-adobe-flash-updates">Flash Update Notifications</a></p>
  
  <p>Only including these for other peoples reference as they don't actually address my attempts at trying to fix this issue.
  Plus half of them are outdated.</p>
  
  <p>I have been learning PHP &amp; Javascript, but have not learnt much python so far.
  Can anybody give me a rough starting point of how to build a python code to
  check for updates for these various different apps on my system.</p>
  
  <p>I am Using windows 10, with firefox developer edition..
  Not looking for a full blown script just pointers starting points 
  &amp; help or worthwhile debate on how to go about this.</p>
  
  <p>Some Questions &amp; resources that may help me build the script:<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://stackoverflow.com/questions/47829603/how-can-i-get-a-list-file-list-whatever-of-all-installed-programs-using-pyth">Python List installed programs</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://codereview.stackexchange.com/questions/238456/asynchronous-web-crawler-with-pyppeteer-python">Asynchronous Web Crawler</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://codereview.stackexchange.com/questions/238452/custom-exception-handling-function-or-logging-library">Custom Exception Handling</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://superuser.com/questions/110674/looking-for-a-tool-to-manage-all-maintenance-work-on-my-pc">Manage all maintenance-work on my pc</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://automatetheboringstuff.com/" rel="nofollow noreferrer">Automate the Boring Stuff with Python</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://hub.packtpub.com/preparing-and-automating-a-task-in-python-tutorial/" rel="nofollow noreferrer">Preparing &amp; Automating stuff</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://docs.python.org/2.4/lib/os-process.html" rel="nofollow noreferrer">Process handling</a><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://docs.python.org/3/library/urllib.parse.html#module-urllib.parse" rel="nofollow noreferrer">Urllib Docs</a></p>
  
  <p>This is the script that I have so far</p>
  
  <pre><code>try:
      import os
      import logging
      import selenium
  except:
      print("Error importing initials")
  else:
  
  try:
      from selenium import webdriver
      from selenium.webdriver.common.by import By
      from selenium.webdriver.common.keys import Keys
      from selenium.webdriver.support.ui import WebDriverWait
      from selenium.webdriver.support.expected_conditions import presence_of_element_located
  except:
      print("Error importing from")
  
  from selenium.webdriver.firefox import Options
  from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
  </code></pre>
  
  <p>I know this is not correct but I cannot get Sublime txt 3 to output python errors 
  and any form of online Python validation tool I have used spits out an 
  error as soon as it reaches import selenium.</p>
  
  <p>I would like to build a script that I can double click every couple of weeks, that will 
  open up Firefox, Check Which apps are out of date and then update as necessary.</p>
  
  <p>I already have Adobe flash player set to automatic updates but its just Ignoreing me 
  &amp; taking the p*** Please comment or share articles that can help.</p>
  
  <p>Think I may have to install the gecko driver api, but niot 100% sure about this.</p>
  
  <p>This is how far I have got so far, Installed selenium through pip install. Python 3.7 was already installed. Managed to get Sublime text editor 3 to start outputting error's into a build file through        <code>tools &gt; build system &gt; Python 3</code> Now stuck again..
  Will update as I learn more.</p>
  
  <pre><code>import os
  import logging
  import selenium
  
  from selenium import webdriver
  from selenium.webdriver.common.by import By
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.support.ui import Select
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.common.exceptions import NoSuchElementException
  
  def user_input_progs(programs, params):
      # User Select Parameters.
  
  def is_element_present(self, how, what):
      # Test if C drive is present or been renamed.
      # Search for the programs in the os/c:directory.
      # Test programs.
      os.path.isdir(C)
      # def runFFtest():
         # fallback to chrome, safari, opera. 
  </code></pre>
  
  <p>Stuck Again.        </p>
  
  <p>Just Found these resources to attempt to
  get the Version Number of a program:<br>
  <a href="http://www.blog.pythonlibrary.org/2014/10/23/pywin32-how-to-get-an-applications-version-number/" rel="nofollow noreferrer">PyWin32 get Version number of an Application</a><br>
  <a href="https://stackoverflow.com/questions/580924/how-to-access-a-files-properties-on-windows">SO Q? How to Access File Properties</a><br>
  <a href="https://stackoverflow.com/questions/2270345/finding-the-version-of-an-application-from-python">SO Q? Finding the Version of an Application Through Python</a> </p>
  
  <p>Things I would Need to do would be Create an Array of filepaths to the Programs on My Os that regularly need updating, preferably with some sort of UI to edit or update this list, Search my OS C Drive:Program Files for All .exe files and match these to the ones that are chosen.</p>
  
  <p>Use URLLib or webdriver &amp; Beautiful Soup to Scrape the Websites of those companies to check the version number against the one currently installed, then if necessary Get the downloads and Automate the Installation process.</p>
  
  <p>More Resources:</p>
  
  <p>Tried to Install win32api via pip install, but it couldn't find the right version installed these versions instead: <code>pywin32, pypiwin32, pypiwin32-223, pywin32-227</code> more research needed still...</p>