rileytestut / AltServer-Windows

GNU Affero General Public License v3.0
141 stars 49 forks source link

AltServer looks for iTunes and iCloud in the wrong directory for 32-bit OS #9

Closed tmthywynn8 closed 4 years ago

tmthywynn8 commented 4 years ago

I'm not exactly sure where the Program Files constant is stored in the AltServer code (AltServer/AnisetteDataManager.cpp maybe?), but it looks like it will always look for C:\Program Files (x86). This is problematic in at least two cases:

  1. If a user's OS drive letter is not C.
  2. If the user is running a 32-bit OS.

I was able to create a junction to C:\Program Files (x86) and things went smoothly from there, but most end users would not know how to do this let alone know what a junction is.

Possible solutions:

  1. If exists %ProgramFiles(x86)% environment variable, then use that. Else use %ProgramFiles%.
  2. If ProgramFilesPath exists under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion registry path, then use that. Else use HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion.
tmthywynn8 commented 4 years ago

This issue was fixed in this commit.