How to add ini file to iss script for Custom Installation
Hello, I've read through the documentation, and got everything working, except I can't seem to get my session information into the .iss file, and into my Installer. Ultimately I would like hostname:
I tried doing it via the
But that didn't work out, when I run the winscp.exe I don't see any session information. I believe because when I run the installer, I have to run it as an administrator so the registry keys are created under the Administrator account, when I run the software I'm running as a regular user, so I'm not seeing the session information in the registry keys.
So my next attempt was using an .INI file like:
WinSCP2.ini
But I can't figure out a way to tell the
Thank you!
xyz.com
, username: %username%
.
I tried doing it via the
[Registry]
section like:
[Registry] #define RegistryKey "Software\Martin Prikryl\WinSCP 2" ; Configure hostname/username Root: HKCU; SubKey: "{#RegistryKey}\Sessions\Server"; ValueType: string; \ ValueName: "HostName"; ValueData: "xyz.com" Root: HKCU; SubKey: "{#RegistryKey}\Sessions\Server"; ValueType: string; \ ValueName: "UserName"; ValueData: %username% ; Prevent user from accidentally deleting or modifing the session Root: HKCU; SubKey: "{#RegistryKey}\Sessions\Server"; ValueType: dword; \ ValueName: "Special"; ValueData: 1
So my next attempt was using an .INI file like:
WinSCP2.ini
[Configuration\Interface] Interface=1 [Sessions\Server] HostName=xyz.com UserName=%username% Special=1
*.iss
file to use this WinSCP2.ini
file. I looked at the documentation of Inno Installer, under the [INI] command, but seems to indicate that it will create an INI file, not use an INI file that I specify. Any ideas on how I could do this?
Thank you!