Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cheat Engine auto update script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
deadalice
How do I cheat?
Reputation: 0

Joined: 29 Jul 2019
Posts: 4

PostPosted: Mon Jul 29, 2019 1:22 am    Post subject: Cheat Engine auto update script Reply with quote

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
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Mon Jul 29, 2019 2:10 am    Post subject: Reply with quote

Or just use CE’s inbuilt settings option to check for latest version every time it starts Surprised
Back to top
View user's profile Send private message
deadalice
How do I cheat?
Reputation: 0

Joined: 29 Jul 2019
Posts: 4

PostPosted: Mon Jul 29, 2019 2:31 am    Post subject: Reply with quote

predprey wrote:
Or just use CE’s inbuilt settings option to check for latest version every time it starts Surprised


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
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Mon Jul 29, 2019 8:06 am    Post subject: Reply with quote

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 Smile

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
deadalice
How do I cheat?
Reputation: 0

Joined: 29 Jul 2019
Posts: 4

PostPosted: Mon Jul 29, 2019 9:05 am    Post subject: Reply with quote

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 Smile


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
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Mon Jul 29, 2019 10:29 am    Post subject: Reply with quote

I don't mean the commercial addons, I mean an infected version of CCleaner was put up for people to download with matching hashes etc. iirc https://support.piriform.com/hc/en-us/articles/115001699371-CCleaner-v5-33-and-CCleaner-Cloud-v1-07-Security-Notification
_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
deadalice
How do I cheat?
Reputation: 0

Joined: 29 Jul 2019
Posts: 4

PostPosted: Mon Jul 29, 2019 11:01 am    Post subject: Reply with quote

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
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Mon Jul 29, 2019 1:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites