Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 19-01-2012, 01:33
peterf1999's Avatar
peterf1999 peterf1999 is offline
Die Hard Member
 
Join Date: Nov 2008
Location: Italy
Posts: 928
Thanks: 14
Thanked 983 Times in 236 Posts
peterf1999 is on a distinguished road
Quote:
Originally Posted by seventhorama View Post
need help to get this install dir thing works
[Files]
Source: D:\TS2_ISOS\The Sims 2 Exp1 University\Patchfiles\*; DestDir: {code:GetAppPath}; Flags: ignoreversion recursesubdirs
Code:
var installDir : string;

function InitializeSetup(): Boolean;

Begin
  // Checking running application
if FindWindowByWindowName('The Sims 2 University') <> 0 then
begin
      MsgBox('The Sims 2 University is running.'#10'Please close the application first.', mbInformation, MB_OK);
      exit;
end;
    
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\EA GAMES\The Sims 2 University', 'Install Dir', installDir)
  then  MsgBox('The Sims 2 University is not installed on this computer..'#10'Cancelling Update.', mbInformation, MB_OK) 
else Result := True

End;

function GetAppPath(Param: string): string;
begin
  Result := installDir;
end;
Reply With Quote
Sponsored Links
  #2  
Old 19-01-2012, 15:55
seventhorama seventhorama is offline
Registered User
 
Join Date: Jul 2011
Location: outer space
Posts: 30
Thanks: 0
Thanked 1 Time in 1 Post
seventhorama is on a distinguished road
Quote:
Originally Posted by peterf1999 View Post
[Files]
Source: D:\TS2_ISOS\The Sims 2 Exp1 University\Patchfiles\*; DestDir: {code:GetAppPath}; Flags: ignoreversion recursesubdirs
Code:
var installDir : string;

function InitializeSetup(): Boolean;

Begin
  // Checking running application
if FindWindowByWindowName('The Sims 2 University') <> 0 then
begin
      MsgBox('The Sims 2 University is running.'#10'Please close the application first.', mbInformation, MB_OK);
      exit;
end;
    
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\EA GAMES\The Sims 2 University', 'Install Dir', installDir)
  then  MsgBox('The Sims 2 University is not installed on this computer..'#10'Cancelling Update.', mbInformation, MB_OK) 
else Result := True

End;

function GetAppPath(Param: string): string;
begin
  Result := installDir;
end;
it works now

thx mate
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
yener90's Inno Project Source Codes yener90 Conversion Tutorials 1475 21-10-2014 09:50



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


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