The Sims 4 Portable - No admin needed! [OBSOLETE]
Page 1 of 1 • Share
The Sims 4 Portable - No admin needed! [OBSOLETE]
The Sims 4 Portable script aim is to create temporary registry keys, redirect "Documents\Electronic Arts\" to a "Saves" subfolder into the same place of the script, then it starts the game and when it's closed, clean up registry keys and saves redirections. So a permanent installation of The Sims 4 is safely protected and script won't broke a "normal" The Sims 4 installation. Plus, you don't need elevated privileges (administrator) to play the game.
What script does:
- Auto detects OS language, changes registry keys and even "RldOrigin.ini" file to adapt language of The Sims 4;
- Auto detects OS architecture (x86 or x64);
- Detects if "Origin" folder exists in the same folder and create temporary registry keys and folder redirections for a portable Origin too;
- Auto closes Origin before the game starts and closes;
- Auto hide itself if nircmd is installed (or add "nircmd.exe" where the script is located). Google NirCMD to know what it is and download it (not required);
- Doesn't need elevated privileges anymore for both 32 and 64-bit versions on a 64-bit Windows OS (but you still can start it with administrator privileges);
- Don't need elevated privileges for legit game or Origin, for any 32 or 64-bit version;
- Works only on Windows Vista or higher on a NTFS partition (junctions, symbolic and hard links, used by the script, only work on NTFS on Vista+). Please place the script on the same partition where the game is installed.
How to use:
Just run the script or create a shortcut. If the script is started in the "installation" folder of The Sims 4, the game will start immediately. If not, then the configuration file of the script is opened for a manual edit and user (YOU!) has to add the path of The Sims 4 folder (relative path is allowed).
How can I run 32-bit The Sims 4 on a 64-bit Windows ?
Edit the INI configuration file and write this to force running 32-bit version:
Where are my saves?
Into the "Saves" folder where the script is. Same for Origin Portable data (and some registry backup).
Variable SavesPath can be set to change Saves folder.
How can I make Origin portable?
Copy your "Origin" folder where the script is.
Variable OriginPath can be set to change Origin folder.
How can I run Origin instead of game?
Set variable GameBin=Origin in the configuration file.
Origin doesn't need elevated privileges excepted for downloading if the installation folder need these privileges.
Script (open Notepad or Notepad++, copy-paste following code and then save it as "The Sims 4 Portable.cmd" file):
Mod edit: moved to "The Sims 4 tips & tricks".
- The_gh0stm4n
DO NOT POST ANY QUESTIONS OR PROBLEMS IN THIS TOPIC. INSTEAD, PLEASE OPEN A NEW TOPIC IN THE APPROPRIATE FORUM-SECTION, EITHER "THE SIMS 4 DOWNLOADS SUPPORT" OR "THE SIMS 4 IN-GAME SUPPORT"! THANK-YOU-NOTES CAN BE POSTED IN THE APPROPRIATE FORUM-SECTION, or directly under this thread.
Note that any and all questions posted under this thread, will be deleted without any explanation or advance warning. We have the Forum sections dedicated to Support purposes, for a reason.
What script does:
- Auto detects OS language, changes registry keys and even "RldOrigin.ini" file to adapt language of The Sims 4;
- Auto detects OS architecture (x86 or x64);
- Detects if "Origin" folder exists in the same folder and create temporary registry keys and folder redirections for a portable Origin too;
- Auto closes Origin before the game starts and closes;
- Auto hide itself if nircmd is installed (or add "nircmd.exe" where the script is located). Google NirCMD to know what it is and download it (not required);
- Doesn't need elevated privileges anymore for both 32 and 64-bit versions on a 64-bit Windows OS (but you still can start it with administrator privileges);
- Don't need elevated privileges for legit game or Origin, for any 32 or 64-bit version;
- Works only on Windows Vista or higher on a NTFS partition (junctions, symbolic and hard links, used by the script, only work on NTFS on Vista+). Please place the script on the same partition where the game is installed.
How to use:
Just run the script or create a shortcut. If the script is started in the "installation" folder of The Sims 4, the game will start immediately. If not, then the configuration file of the script is opened for a manual edit and user (YOU!) has to add the path of The Sims 4 folder (relative path is allowed).
How can I run 32-bit The Sims 4 on a 64-bit Windows ?
Edit the INI configuration file and write this to force running 32-bit version:
- Code:
GameBin=Game\Bin\TS4.exe
Where are my saves?
Into the "Saves" folder where the script is. Same for Origin Portable data (and some registry backup).
Variable SavesPath can be set to change Saves folder.
How can I make Origin portable?
Copy your "Origin" folder where the script is.
Variable OriginPath can be set to change Origin folder.
How can I run Origin instead of game?
Set variable GameBin=Origin in the configuration file.
Origin doesn't need elevated privileges excepted for downloading if the installation folder need these privileges.
Script (open Notepad or Notepad++, copy-paste following code and then save it as "The Sims 4 Portable.cmd" file):
- Code:
@echo off
if "%ScriptTitle%"=="" set ScriptTitle=The Sims 4 Portable
title %ScriptTitle% - Initializing...
if "%SfxString1%"=="" nircmd win hide ititle "%ScriptTitle% - Initializing..."
set AnotherInstanceRunning=0
for /f "skip=1 tokens=2,9 delims=," %%a in ('tasklist /v /fi "imagename eq cmd.exe" /fo csv') do (
echo %%~b| find /i "%ScriptTitle% - Initializing..." >nul 2>&1&& set ScriptPID=%%~a
echo %%~b| find /i "%ScriptTitle% - Running..." >nul 2>&1&& if not "%%~a"=="%ScriptPID%" set AnotherInstanceRunning=1
)
if /i not "%CD%"=="%windir%\System32" (
set CurrentDir=%CD%
) else (
set CurrentDir=%~dp0
)
if "%CurrentDir:~-1%"=="\" set CurrentDir=%CurrentDir:~0,-1%
if "%System32Dir%"=="" set System32Dir=%windir%\System32
if "%VirtualHKLMSoftware%"=="" set VirtualHKLMSoftware=HKEY_LOCAL_MACHINE\SOFTWARE
if "%GameInstallationPath%"=="" set GameInstallationPath=%CurrentDir%
if "%SavesPath%"=="" set SavesPath=%CurrentDir%\Saves
if "%OriginPath%"=="" set OriginPath=%CurrentDir%\Origin
for %%a in (%*) do if /i "%%~xa"==".ini" set ConfigurationFile=%%~a
if "%ConfigurationFile%"=="" set ConfigurationFile=%CurrentDir%\%~n0.ini
if not exist "%ConfigurationFile%" (
if "%Language%"=="" for /f "tokens=3 delims= " %%a in ('%System32Dir%\reg.exe query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Language" /v Installlanguage') do (
if [%%a] equ [0405] set Language=cs_CZ
if [%%a] equ [0406] set Language=da_DK
if [%%a] equ [0407] set Language=de_DE
if [%%a] equ [0409] set Language=en_US
if [%%a] equ [0C0A] set Language=es_ES
if [%%a] equ [040B] set Language=fi_FI
if [%%a] equ [040C] set Language=fr_FR
if [%%a] equ [0410] set Language=it_IT
if [%%a] equ [0411] set Language=ja_JP
if [%%a] equ [0412] set Language=ko_KR
if [%%a] equ [0413] set Language=nl_NL
if [%%a] equ [0414] set Language=no_NO
if [%%a] equ [0415] set Language=pl_PL
if [%%a] equ [0416] set Language=pt_BR
if [%%a] equ [0419] set Language=ru_RU
if [%%a] equ [041D] set Language=sv_SE
if [%%a] equ [0404] set Language=zh_TW
)
)
chcp 1252>nul
if exist "%ConfigurationFile%" (
for /f "usebackq eol=; tokens=1,2 delims==" %%a in ("%ConfigurationFile%") do (
if not "%%~b"=="" if exist "%CurrentDir%\%%~b" (
call set %%~a=%CurrentDir%\%%~b
) else (
call set %%~a=%%~b
)
)
) else (
echo GameInstallationPath=> "%ConfigurationFile%"
echo Language=%Language%>> "%ConfigurationFile%"
echo SavesPath=>> "%ConfigurationFile%"
echo OriginPath=>> "%ConfigurationFile%"
echo ;Optional, for power users. Write GameBin=Game\Bin\TS4.exe if you need to run the Reloaded game without elevated privileges or write Origin to run Origin:>> "%ConfigurationFile%"
echo GameBin=>> "%ConfigurationFile%"
echo New INI file created: "%ConfigurationFile%"
)
chcp 850>nul
if "%GameBin%"=="%OriginPath%" set GameBin=%OriginPath%\Origin.exe
if "%GameBin%"=="Origin" set GameBin=%OriginPath%\Origin.exe
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\Hardware\Description\System\CentralProcessor\0"| find /i "x86">nul&& (
if "%WOW6432Node%"=="" set WOW6432Node=
if "%GameBin%"=="" set GameBin=%GameInstallationPath%\Game\Bin\TS4.exe
)|| (
if "%WOW6432Node%"=="" set WOW6432Node=\WOW6432Node
if "%GameBin%"=="" set GameBin=%GameInstallationPath%\Game\Bin\TS4_x64.exe
)
"%System32Dir%\reg.exe" query HKEY_USERS\S-1-5-19 >nul 2>&1&& (
if "%IsElevated%"=="" set IsElevated=1
if "%mklink%"=="" set mklink=d
)|| (
set __COMPAT_LAYER=RUNASINVOKER
if "%IsElevated%"=="" set IsElevated=0
if "%mklink%"=="" set mklink=j
set VirtualHKLMSoftware=HKEY_CURRENT_USER\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE%WOW6432Node%
if "%WOW6432Node%"=="\WOW6432Node" (
set System32Dir=%windir%\SysWOW64
echo %GameBin%| find /i "x64"> nul&& set reg64=/reg:64
)
if exist "%GameBin%_No_Admin.exe" set GameBin=%GameBin:.exe=_No_Admin.exe%
)
for /f "skip=2 tokens=3*" %%a in ('%System32Dir%\reg.exe query "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal"') do set DocumentsDir=%%a
echo ConfigurationFile: %ConfigurationFile%
echo GameInstallationPath: %GameInstallationPath%
echo Language: %Language%
echo SavesPath: %SavesPath%
echo OriginPath: %OriginPath%
echo GameBin: %GameBin%
echo Variables loaded
echo.
goto :ScriptBeginning
:REGBackup
(
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /v "IsPortable" %reg64%&& "%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f %reg64%
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4.PortableBackup" /f * %reg64%|| "%System32Dir%\reg.exe" copy "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4.PortableBackup" /s /f %reg64%
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f %reg64%
) >nul 2>&1
if exist "%OriginPath%" (
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" /v "IsPortable" /reg:32&& "%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" /f /reg:32
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts.PortableBackup" /f * /reg:32|| "%System32Dir%\reg.exe" copy "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts.PortableBackup" /s /f /reg:32
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" /f /reg:32
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /v "IsPortable" /reg:32&& "%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /reg:32
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Origin.PortableBackup" /f * /reg:32|| "%System32Dir%\reg.exe" copy "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" "HKEY_LOCAL_MACHINE\SOFTWARE\Origin.PortableBackup" /s /f /reg:32
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /reg:32
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games" /v "IsPortable" /reg:32&& "%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games" /f /reg:32
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games.PortableBackup" /f * /reg:32|| "%System32Dir%\reg.exe" copy "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games" "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games.PortableBackup" /s /f /reg:32
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games" /f /reg:32
) >nul 2>&1
exit /b
:DIRBackup
rmdir /q "%DocumentsDir%\Electronic Arts"
ren "%DocumentsDir%\Electronic Arts" "Electronic Arts.PortableBackup"
if exist "%OriginPath%" (
rmdir /q "%APPDATA%\Origin"
ren "%APPDATA%\Origin" "Origin.PortableBackup"
rmdir /q "%LOCALAPPDATA%\Origin"
ren "%LOCALAPPDATA%\Origin" "Origin.PortableBackup"
)
exit /b
:RldOriginBackup
if not exist "%GameInstallationPath%\Game\Bin\RldOrigin.PortableBackup.ini" (
ren "%GameInstallationPath%\Game\Bin\RldOrigin.ini" "RldOrigin.PortableBackup.ini"
) else (
del /f "%GameInstallationPath%\Game\Bin\RldOrigin.ini"
)
exit /b
:REGRestoration
(
"%System32Dir%\reg.exe" export "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" "%SavesPath%\Reg\The Sims 4.Portable.reg" /y %reg64%
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f %reg64%
"%System32Dir%\reg.exe" copy "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4.PortableBackup" "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /s /f %reg64%
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4.PortableBackup" /f %reg64%
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis" /f * %reg64%|| "%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis" /f %reg64%
) >nul 2>&1
if exist "%OriginPath%" (
"%System32Dir%\reg.exe" export "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" "%SavesPath%\Reg\Electronic Arts.Portable.reg" /y /reg:32
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" /f /reg:32
"%System32Dir%\reg.exe" copy "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts.PortableBackup" "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" /s /f /reg:32
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts.PortableBackup" /f /reg:32
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" /f * /reg:32|| "%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" /f /reg:32
"%System32Dir%\reg.exe" export "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" "%SavesPath%\Reg\Origin.Portable.reg" /y /reg:32
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /reg:32
"%System32Dir%\reg.exe" copy "HKEY_LOCAL_MACHINE\SOFTWARE\Origin.PortableBackup" "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /s /f /reg:32
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin.PortableBackup" /f /reg:32
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f * /reg:32|| "%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /reg:32
"%System32Dir%\reg.exe" export "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games" "%SavesPath%\Reg\Origin Games.Portable.reg" /y /reg:32
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games" /f /reg:32
"%System32Dir%\reg.exe" copy "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games.PortableBackup" "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games" /s /f /reg:32
"%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games.PortableBackup" /f /reg:32
"%System32Dir%\reg.exe" query "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games" /f * /reg:32|| "%System32Dir%\reg.exe" delete "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Games" /f /reg:32
) >nul 2>&1
exit /b
:DIRRestoration
rmdir /q "%DocumentsDir%\Electronic Arts"
ren "%DocumentsDir%\Electronic Arts.PortableBackup" "Electronic Arts"
if exist "%OriginPath%" (
rmdir /q "%APPDATA%\Origin"
ren "%APPDATA%\Origin.PortableBackup" "Origin"
rmdir /q "%LOCALAPPDATA%\Origin"
ren "%LOCALAPPDATA%\Origin.PortableBackup" "Origin"
)
exit /b
:RldOriginRestoration
if exist "%GameInstallationPath%\Game\Bin\RldOrigin.PortableBackup.ini" (
del /f "%GameInstallationPath%\Game\Bin\RldOrigin.ini"
ren "%GameInstallationPath%\Game\Bin\RldOrigin.PortableBackup.ini" "RldOrigin.ini"
)
exit /b
:ScriptBeginning
title %ScriptTitle% - Running...
if "%AnotherInstanceRunning%"=="1" goto :AnotherInstanceDetected1
call :REGBackup
(
"%System32Dir%\reg.exe" import "%SavesPath%\Reg\The Sims 4.Portable.reg" %reg64%
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f /v "IsPortable" /d "1" %reg64%
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f /v "DisplayName" /d "The Sims 4 Portable" %reg64%
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f /v "GDFBinary" /d "%GameInstallationPath%\__Installer\GDFBinary_%Language%.dll" %reg64%
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f /v "GDFBinary64" /d "%GameInstallationPath%\__Installer\GDFBinary_%Language%_64.dll" %reg64%
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f /v "Install Dir" /d "%GameInstallationPath%" %reg64%
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f /v "Locale" /d "%Language%" %reg64%
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4\InstallOptSelect" /f /ve /d "1" %reg64%
if not exist "%SavesPath%\Reg\The Sims 4.Portable.reg" (
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f /v "Product GUID" /d "{48EBEBBF-B9F8-4520-A3CF-89A730721917}" %reg64%
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims 4" /f /v "GameExplorer" /d "{2188209F-D146-42AE-B76C-816118F43C9F}" %reg64%
)
) >nul 2>&1
if exist "%OriginPath%" (
"%System32Dir%\reg.exe" import "%SavesPath%\Reg\Electronic Arts.Portable.reg" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts" /f /v "IsPortable" /d "1" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Core" /f /v "ClientAccessDLLPath" /d "%OriginPath%\legacyPM\CmdPortalClient.dll" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Core" /f /v "ClientPath" /d "%OriginPath%\legacyPM\OriginLegacyCLI.exe" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Core" /f /v "EADM6InstallDir" /d "%OriginPath%" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EADM" /f /v "ClientPath" /d "%OriginPath%\Origin.exe" /reg:32
if not exist "%SavesPath%\Reg\Electronic Arts.Portable.reg" (
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Core" /f /v "ClientVersion" /d "99.9.9.9" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Core" /f /v "EADM6Version" /d "99.9.9.9" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EADM" /f /v "ClientVersion" /d "99.9.9.99999" /reg:32
)
"%System32Dir%\reg.exe" import "%SavesPath%\Reg\Origin.Portable.reg" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /v "IsPortable" /d "1" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /v "ClientPath" /d "%OriginPath%\Origin.exe" /reg:32
if not exist "%SavesPath%\Reg\Origin.Portable.reg" (
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /v "AutopatchGlobal" /d "false" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /v "Autoupdate" /d "false" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /v "ClientVersion" /d "99.9.9.99999" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /v "InstallSuccesfull" /d "true" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /v "IsBeta" /d "false" /reg:32
"%System32Dir%\reg.exe" add "HKEY_LOCAL_MACHINE\SOFTWARE\Origin" /f /v "TelemOO" /d "false" /reg:32
)
"%System32Dir%\reg.exe" import "%SavesPath%\Reg\Origin Games.Portable.reg" /reg:32
) >nul 2>&1
call :DIRBackup
md "%SavesPath%\Reg"
mklink /%mklink% "%DocumentsDir%\Electronic Arts" "%SavesPath%"
if exist "%OriginPath%" (
md "%SavesPath%\Origin\LocalAppData"
mklink /%mklink% "%APPDATA%\Origin" "%SavesPath%\Origin"
mklink /%mklink% "%LOCALAPPDATA%\Origin" "%SavesPath%\Origin\LocalAppData"
)
call :RldOriginBackup
if exist "%GameInstallationPath%\Game\Bin\RldOrigin.PortableBackup.ini" for /f "usebackq tokens=1,* delims==" %%a in ("%GameInstallationPath%\Game\Bin\RldOrigin.PortableBackup.ini") do if not "%%b"=="" (
if /i not "%%a"=="Language" (
echo %%a=%%b>> "%GameInstallationPath%\Game\Bin\RldOrigin.ini"
) else (
echo %%a=%Language%>> "%GameInstallationPath%\Game\Bin\RldOrigin.ini"
)
) else (
echo %%a>> "%GameInstallationPath%\Game\Bin\RldOrigin.ini"
)
taskkill /im "Origin.exe" /t /f
:AnotherInstanceDetected1
if exist "%GameBin%" (
start "" /wait "%GameBin%"
) else (
start "" notepad "%ConfigurationFile%"
)
set AnotherInstanceRunning=0
for /f "skip=1 tokens=2,9 delims=," %%a in ('tasklist /v /fi "imagename eq cmd.exe" /fo csv') do (
echo %%~b| find /i "%ScriptTitle% - Running..." >nul 2>&1&& if not "%%~a"=="%ScriptPID%" set AnotherInstanceRunning=1
)
if "%AnotherInstanceRunning%"=="1" goto :AnotherInstanceDetected2
taskkill /im "Origin.exe" /t /f
call :REGRestoration
call :DIRRestoration
call :RldOriginRestoration
:AnotherInstanceDetected2
Mod edit: moved to "The Sims 4 tips & tricks".
- The_gh0stm4n
DO NOT POST ANY QUESTIONS OR PROBLEMS IN THIS TOPIC. INSTEAD, PLEASE OPEN A NEW TOPIC IN THE APPROPRIATE FORUM-SECTION, EITHER "THE SIMS 4 DOWNLOADS SUPPORT" OR "THE SIMS 4 IN-GAME SUPPORT"! THANK-YOU-NOTES CAN BE POSTED IN THE APPROPRIATE FORUM-SECTION, or directly under this thread.
Note that any and all questions posted under this thread, will be deleted without any explanation or advance warning. We have the Forum sections dedicated to Support purposes, for a reason.
Last edited by The_gh0stm4n on Mon 02 Mar 2020, 19:10; edited 11 times in total (Reason for editing : New behaviour since Cats & Dogs)
Guest- Guest
Re: The Sims 4 Portable - No admin needed! [OBSOLETE]
Maybe I've misunderstood the aim of the script, but the pirated version of the Sims 4 is already portable by nature.
Just copy your install-folder to an USB-stick or external drive and you can play the game on any, suitable, computer without installation or entries in the register.
Just copy your install-folder to an USB-stick or external drive and you can play the game on any, suitable, computer without installation or entries in the register.
Guest- Guest
Re: The Sims 4 Portable - No admin needed! [OBSOLETE]
I do not considere the pirated version "portable" because of the need to manually copy saves. Plus, if I use Origin for the game, I also need to make Origin portable.
Actually I'm working on getting legit copy to verify somethings, such as running it without needing administrator privileges.
//EDIT
Update 2
- New default configuration file:
- You can now change Saves and Origin folder pathes
- Origin registry modifications can now handle Origin Games (forgotten registry keys)
- You own registry modifications are now saved into "Saves\Reg"
- You can easily run Origin instead of game by setting GameBin=Origin
- You can run multiple instances of the script without messing with registry modifications or redirected links. The first instance makes modifications and the last restores all
Update 1 ºᴥº
- Changed variable TS4exe to GameBin (delete old configuration file or change it manually)
- You can properly change GameBin variable to run any program instead of TS4 (by default)
- Typo
- Some bugs with Origin path (variable)
- Forgotten to redirect Origin "LocalAppData" data
- Some bugs when running 32-bit version on 64-bit Windows
- 32-bit version running on 64-bit Windows doesn't need elevated privileges now! Fully portable for 32-bit The Sims 4 Don't play TS4 at school!
Actually I'm working on getting legit copy to verify somethings, such as running it without needing administrator privileges.
//EDIT
Update 2
- New default configuration file:
- Code:
GameInstallationPath=
Language=en_US
SavesPath=
OriginPath=
;Optional, for power users. Write GameBin=Game\Bin\TS4.exe if you need to run the Reloaded game without elevated privileges or write Origin to run Origin:
GameBin=
- You can now change Saves and Origin folder pathes
- Origin registry modifications can now handle Origin Games (forgotten registry keys)
- You own registry modifications are now saved into "Saves\Reg"
- You can easily run Origin instead of game by setting GameBin=Origin
- You can run multiple instances of the script without messing with registry modifications or redirected links. The first instance makes modifications and the last restores all
Update 1 ºᴥº
- Changed variable TS4exe to GameBin (delete old configuration file or change it manually)
- You can properly change GameBin variable to run any program instead of TS4 (by default)
- Typo
- Some bugs with Origin path (variable)
- Forgotten to redirect Origin "LocalAppData" data
- Some bugs when running 32-bit version on 64-bit Windows
- 32-bit version running on 64-bit Windows doesn't need elevated privileges now! Fully portable for 32-bit The Sims 4 Don't play TS4 at school!
Guest- Guest
Re: The Sims 4 Portable - No admin needed! [OBSOLETE]
Some news:
Latest Reloaded 64-bit fix for Cats & Dogs can now be started without elevated privileges (admin) on a 64-bit Windows OS. Before this update, the 64-bit fix showed an error instead, forcing user to start my script with admin privileges.
Achievement: no more admin popup anymore for 64-bit.
Latest Reloaded 64-bit fix for Cats & Dogs can now be started without elevated privileges (admin) on a 64-bit Windows OS. Before this update, the 64-bit fix showed an error instead, forcing user to start my script with admin privileges.
Achievement: no more admin popup anymore for 64-bit.
Guest- Guest
Similar topics
» Portable The Sims 3.
» [Tool] Portable The Sims 3
» The Sims 4 Island Living All in One Portable 1.52.100.1020 [Sim Architect]
» The Sims 4 Realm of Magic All in One Portable 1.55.105.1020 [Sim Architect]
» The Sims 4 Ultimate Fix! [OBSOLETE]
» [Tool] Portable The Sims 3
» The Sims 4 Island Living All in One Portable 1.52.100.1020 [Sim Architect]
» The Sims 4 Realm of Magic All in One Portable 1.55.105.1020 [Sim Architect]
» The Sims 4 Ultimate Fix! [OBSOLETE]
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum