>>>>Hi everybody,
>>>>
>>>>I'm creating an installation file using Inno Setup. After the program is installed in the Program Files directory I also want to create a directory in ProgramData directory and add a file there.
>>>>
>>>>I am using Inno Setup and this is my first time using it.
>>>>
>>>>Can you please show me a sample if you're using Inno Setup for your installations?
>>>
>>>[dirs]
>>>Name: {app}\someFolder
>>>
>>>Simple as that. You can have any number of lines in that section.
>>
>>It is not as simple. The directory I need is not in the Program Files. This directory needs to be in ProgramData/CompanyName/MyAppName.
>
>So what,
>
>Name: {appdata}\CompanyName\MyAppName
>
>(or some other system name instead of appdata - check help).
>
>>And I also need to copy a file there.
>
>[files]
>Source: "myfile.txt"; DestDir: "{appdata}\CompanyName\MyAppName"; flags: ignoreversion
>
>And, BTW, help for [files] section says:
>
>DestDir (Required)
>The directory where the file is to be installed on the user's system. The will almost always begin with one of the directory constants. If the specified path does not already exist on the user's system, it will be created automatically, and removed automatically during uninstallation if empty.
>
>So the [dirs] entry is required only for empty directories you may want to create. Those where you copy a file are created automatically.
Can I just hardcode? I did a quick search and could not find how ProgramData folder is named in Inno setup.
If it's not broken, fix it until it is.
My Blog