| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| deadalice How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 29 Jul 2019
 Posts: 4
 
 
 | 
			
				|  Posted: Mon Jul 29, 2019 1:22 am    Post subject: Cheat Engine auto update script |   |  
				| 
 |  
				| Hi, guys! We are hacking enthusiasts from Ukraine, enjoying this application so much for a couple of years. We want to help everyone to automatically get newest version of Cheat Engine. 
 This is a Powershell script, that you can just copy from here, save as .ps1 file with any name and set it to a scheduler or Windows autorun. He will check installed version and current latest version on site - and if new version is available he will download it and silently install. Feel free to modify it or discuss here, we will give you any possible help.
 
 And, one more time, Dark Byte, thank you for all your work. We really appreciate it and this is our small contribution.
 
 
  	  | Code: |  	  | $key = Split-Path -parent (Get-Item -Path Registry::HKCR\CheatEngine\DefaultIcon).GetValue("")
 $key = $key + '\cheatengine-x86_64.exe'
 $localver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($key).FileVersion
 $localver = $localver.Substring(0, $localver.lastIndexOf('.'))
 $remotever = (Invoke-WebRequest https://cheatengine.org/downloads.php).Links | Where class -eq 'download_link' | Select-Object InnerText
 $remotever = ($remotever[0] | Out-String).Split(' ')[-1].Trim()
 If ($localver -ne $remotever) {
 $remotefile = ((Invoke-WebRequest https://cheatengine.org/downloads.php).Links | Where class -eq 'download_link' | Select href -First 1)
 $remotefile = ($remotefile | Out-String).Split('----')[4].Trim()
 Invoke-WebRequest -Uri $remotefile -OutFile $env:temp\cheat-engine.exe
 Start-Process -FilePath $env:temp\cheat-engine.exe -ArgumentList '/verysilent'
 }
 
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| predprey Master Cheater
 
 ![]() Reputation: 24 
 Joined: 08 Oct 2015
 Posts: 486
 
 
 | 
			
				|  Posted: Mon Jul 29, 2019 2:10 am    Post subject: |   |  
				| 
 |  
				| Or just use CE’s inbuilt settings option to check for latest version every time it starts   |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| deadalice How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 29 Jul 2019
 Posts: 4
 
 
 | 
			
				|  Posted: Mon Jul 29, 2019 2:31 am    Post subject: |   |  
				| 
 |  
				|  	  | predprey wrote: |  	  | Or just use CE’s inbuilt settings option to check for latest version every time it starts  | 
 
 And then go to site, download, launch, avoid McAfee, finish installation. Or forgot regular updates and use version from a prehistoric ages like for years.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| FreeER Grandmaster Cheater Supreme
 
 ![]() Reputation: 53 
 Joined: 09 Aug 2013
 Posts: 1091
 
 
 | 
			
				|  Posted: Mon Jul 29, 2019 8:06 am    Post subject: |   |  
				| 
 |  
				| Nice, though I think I'd rather not have things silently installing... after all it wasn't that long ago since CCleaner's official download link included malware lol 
 Plus I use QuickAccessPopup to open CE with a couple key presses while bypassing the UAC (via a task scheduler hack) that depends on knowing what the CE path is so I doubt I'd even know if it had updated unless it actually controlled where it installed to and didn't include a version in the path, but then who knows how many extensions would suddenly break without warning when an update does happens.
 
 Perhaps useful to others though, even if just for learning powershell, so thanks for sharing
   _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| deadalice How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 29 Jul 2019
 Posts: 4
 
 
 | 
			
				|  Posted: Mon Jul 29, 2019 9:05 am    Post subject: |   |  
				| 
 |  
				|  	  | FreeER wrote: |  	  | Nice, though I think I'd rather not have things silently installing... after all it wasn't that long ago since CCleaner's official download link included malware lol 
 Plus I use QuickAccessPopup to open CE with a couple key presses while bypassing the UAC (via a task scheduler hack) that depends on knowing what the CE path is so I doubt I'd even know if it had updated unless it actually controlled where it installed to and didn't include a version in the path, but then who knows how many extensions would suddenly break without warning when an update does happens.
 
 Perhaps useful to others though, even if just for learning powershell, so thanks for sharing
  | 
 
 When we wrote this script, we respectfully treated the original installer. Did he want to embed the famous malware? Well, he decides what to do.
 
 I know perfectly well how Inno Setup works and I can completely destroy additional programs in the process of launching the installation. Two lines of code, lol. But, once again, I respect the work of the author, and I, like no one, know how difficult it is to make money these days.
 
 If he gives me permission in this thread, then I will modify the script to remove useless commercial garbage.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| FreeER Grandmaster Cheater Supreme
 
 ![]() Reputation: 53 
 Joined: 09 Aug 2013
 Posts: 1091
 
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| deadalice How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 29 Jul 2019
 Posts: 4
 
 
 | 
			
				|  Posted: Mon Jul 29, 2019 11:01 am    Post subject: |   |  
				| 
 |  
				| Totally understandable. There is a couple of ways to avoid things like that. I can do a pull request with autoupdate mechanics directly as a part of application, written with Lazarus. I can restrict installing everything except this application within my script. I can hack iss just on start. I can block dll, that used for this stuff. Et cetera. Just give me idea, which way can be applied in this case, and I will do that in notime. 
 Also, thank you for a support, it means so much for me.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| predprey Master Cheater
 
 ![]() Reputation: 24 
 Joined: 08 Oct 2015
 Posts: 486
 
 
 | 
			
				|  Posted: Mon Jul 29, 2019 1:14 pm    Post subject: |   |  
				| 
 |  
				|  	  | deadalice wrote: |  	  | Totally understandable. There is a couple of ways to avoid things like that. I can do a pull request with autoupdate mechanics directly as a part of application, written with Lazarus. I can restrict installing everything except this application within my script. I can hack iss just on start. I can block dll, that used for this stuff. Et cetera. Just give me idea, which way can be applied in this case, and I will do that in notime. 
 Also, thank you for a support, it means so much for me.
 | 
 
 Autoupdate sounds nice but it is actually more troublesome than it looks. Each version of CE installs in a different directory by default, specific to its version number, so the autoupdate would have to deal with that. On top of moving any extensions and plugins installed in the original directory.
 
 Then again, the current way of alerting users to a new update and manually going to the site to download isn’t as bad as it sounds either. The regular updates aren’t too regular either, so I really don’t mind the manually updating every half a year or so.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |