installer - INNO setup writing a multi line text constant to the registry -


during install want write long multi line/paragraph chunk of text registry value

writing registry value easy enough

[registry] root: hkcu; subkey: "software\my company\my software"; valuetype: string; valuename: "message"; valuedata: "some text"

but rather define multi line text constant replace "some text"

i.e. like

mytext = "some long text value\r\ngoning onto line"

root: hkcu; subkey: "software\my company\my software"; valuetype: string; valuename: "message"; valuedata: #mytext

i being dull can't see how - gratefully appreciated. thanks

using simple variable should work.

#define mytext "some long text value\r\ngoing onto line"   [registry] root: hkcu; subkey: "software\my company\my software"; valuetype: string; valuename: "message"; valuedata: "{#mytext}" 

however, writing valuetype: string registry in windows means writing reg_sz. \r\n appear text in registry value. registry tools not support carriage return in reg_sz value. display characters.

you have handle in program uses registry value. examples here.

a better solution if fits requirements tell inno use reg_multi_sz valuetype: multisz. reg_multi_sz sequence of null-terminated strings terminated empty string (\0). inno multisz's type value, may use special constant called {break} embed line breaks. consult documentation usage.


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -