Install .ini file only if it does not exist
I have what hopefully may be a quick question.
I am repackaging WinSCP. I do not want to entirely overwrite an .ini file in "Program Files\Winscp\winscp.ini" that has user configurations (in case they are updating from a previous version). I do want to overwrite certain values in the .ini file itself (as insurance that the user did not somehow reenable updates). However, if there is no .ini file I want to put in my default .ini file.
Is there an easy way to accomplish this?
I am repackaging WinSCP. I do not want to entirely overwrite an .ini file in "Program Files\Winscp\winscp.ini" that has user configurations (in case they are updating from a previous version). I do want to overwrite certain values in the .ini file itself (as insurance that the user did not somehow reenable updates). However, if there is no .ini file I want to put in my default .ini file.
Is there an easy way to accomplish this?
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
pjgeutjens
14 years ago
I don't know which authoring tool you use, but the one I have here (Installshield Adminstudio 2010), when defining INI file changes, it allows me to specify a 'do not overwrite' setting for the key values.
Had a quick look at the IniFile table and the relevant entry had a 1 in the Action column. You can find more info on that table here
PJ
Had a quick look at the IniFile table and the relevant entry had a 1 in the Action column. You can find more info on that table here
PJ
Posted by:
deranjer
14 years ago
I do have adminstudio as well (an older version) and I did have things set up that way. In the file and folders view I did not copy my default .ini file into the WinSCP directory... and when upgrading that worked perfectly as the .ini file was there from the old version. However, when doing a fresh install of WinSCP 4.2.9 just the .ini table did not seem to create an actual .ini file (Should it?). When I ran WinSCP for the first time it created its own .ini file, not using what was defined in the .ini file table.
Posted by:
deranjer
14 years ago
Posted by:
HUNTERMONSTER
3 years ago
CAN ANYONE REPLY HERE?????????
I GET THIS / Die angegebene INI-Datei existured auf diesem Rechner nicht. Deshalb ist das Auslesen des Wertes nicht möglich
TRANSLATE:The specified INI file does not exist on this computer. Therefore, the reading of the value is not possible -
SO HOW CAN I FIX THAT PROBLEM?`?????????
Comments:
-
reinstall the software in question to restore the missing ini file. - Nico_K 3 years ago
-
how?? - HUNTERMONSTER 3 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.