What's the best way to create a folder for my application in application data (All Users/AppData or ProgramData depending on OS) during setup?
Application Data means a set of instructions which causes a computer system to perform a function when executed on the computer; Sample 1Sample 2Sample 3.
Open Solution Explorer->Click on 'solution'test'('project)->Add New Project->Select other project types from left window->Select visual studio Installer->Select the setup Wizard-> write your setup name in below(mysetup)->click OK. One wizard will be opened->click 'Next' Button.
Search for "Run" in the windows search as shown below, or press the Windows + R button to open the Run App. In the run app text box, enter "%AppData%" and click OK. Windows will directly open up the Roaming folder which is inside the AppData folder.
<Directory Id="CommonAppDataFolder" Name="CommonAppData">
<!-- your subdir structure here -->
</Directory>
Use the CommonAppDataFolder
property get a reference to the currect directory ( OS specific ) and then nest Directory
elements along with a Component
element and CreateFolder
element to get the directory built out.
Also be aware of the default folder permissions of this part of the filesystem and compare it against your expectations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With