FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Setup for Updates (https://fileforums.com/showthread.php?t=97966)

Luck 12-06-2016 06:01

Setup for Updates
 
Can someone help me?

How do I create setup for Updates, the installation location is found in the registry,

Example: he check the record and show where you installed the game

someone has the code to do this?

Sorry my english

coveiro 12-06-2016 10:02

Use this program Patch Maker

vint56 12-06-2016 11:28

Code:

1
[Setup]
DefaultDirName={code:MyDirName}

[ Code]
function MyDirName(S:String): String;
var
  InsPath: String;
  er: boolean;
  myFile:String;
begin
  Result:=ExpandConstant('C:\Games\World_of_Tanks\'); //если ключа нет то будем ставить сюда
  er := RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{1EAC1D02-C6AC-4FA6-9A44-96258C37C812RU}_is1', 'InstallLocation', InsPath);
  er := RegQueryStringValue(HKCU, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{1EAC1D02-C6AC-4FA6-9A44-96258C37C812ru}_is1', 'InstallLocation', InsPath);
  if er and (InsPath<>'') then //если ключ существует и там что-то записано
  begin
    Result := InsPath;
  end;
end;

2
Code:

[Setup]
AppName=My Program
AppVerName=My Program 1.5
DefaultDirName={code:GetInstallDir}
AppendDefaultDirName=no

[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"

[ Code]
function GetInstallDir(Path: String ): String;
begin
RegQueryStringValue(HKLM, 'SOFTWARE\Rockstar Games\EFLC', 'InstallPath', Path);//Какой ключ реестра ищет ...
Result := Path;
end;

function InitializeSetup(): Boolean;
begin
Result:= true;
if not RegKeyExists(HKLM, 'SOFTWARE\Rockstar Games\EFLC') then
MsgBox('Игра {#SetupSetting("AppName")} не найдена! Укажите путь к папке с игрой вручную!', mbinformation, mb_ok);
end;

3
Code:

[Setup]
AppName=S.T.A.L.K.E.R OGS Evolution 0.6.9.3 Patch
AppVersion=2.12
VersionInfoVersion=0.2.1.2
DefaultDirName={reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\S.T.A.L.K.E.R OGSE Mod_is1,InstallLocation|{pf}}
AppendDefaultDirName=no



All times are GMT -7. The time now is 14:31.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com