TLama

Untitled

Nov 17th, 2013
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.79 KB | None | 0 0
  1. [Setup]
  2. AppId={{87E1AD40-F32B-4EF7-A2FF-5B508814068A}
  3. AppName=My Program
  4. AppVersion=1.5
  5. DefaultDirName=My Program
  6.  
  7. [INI]
  8. Filename: "{app}\UserInputs.ini"; Section: "Language"; Key: "Language"; String: "{language}"
  9. Filename: "{app}\UserInputs.ini"; Section: "Registration"; Key: "ApplicationID"; String: "{code:GetAppId}"
  10.  
  11. [Code]
  12. // this is a helper function (actually a getter for the above INI section entry parameter),
  13. // which we need to strip out the "{}" chars before we pass the value to the [Registration]
  14. // section's ApplicationID key
  15. function GetAppId(Value: string): string;
  16. var
  17.   S: string;
  18. begin
  19.   // here is the same code as in my last answer, just returned as this getter function
  20.   // result
  21.   S := '{#SetupSetting("AppId")}';
  22.   Result := Copy(S, 3, Length(S) - 3);
  23. end;
Advertisement
Add Comment
Please, Sign In to add comment