Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Setup]
- AppName=My Program
- AppVersion=1.5
- DefaultDirName={pf}\My Program
- [Run]
- Filename: "{app}\temp\installation_files\license.exe"; BeforeInstall: SetEnvPath;
- [Code]
- #ifdef UNICODE
- #define AW "W"
- #else
- #define AW "A"
- #endif
- function SetEnvironmentVariable(lpName: string; lpValue: string): BOOL;
- external 'SetEnvironmentVariable{#AW}@kernel32.dll stdcall';
- procedure SetEnvPath;
- begin
- if not SetEnvironmentVariable('PATH', ExpandConstant('{app}')) then
- MsgBox(SysErrorMessage(DLLGetLastError), mbError, MB_OK);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement