4

I need to create a folder called WindowsExplorerCmd with a file called CmdXdll.dll in C:\Users\%username%\AppData\Roaming ({userappdata}) folder.

How to?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992

1 Answers1

4

To create a standalone empty directory, use [Dirs] section entry like:

[Dirs]
Name: {userappdata}\WindowsExplorerCmd

Though you rarely need this. A folder typically gets implicitly created when installing files using [Files] section:

[Files]
Source: "CmdXdll.dll"; DestDir: "{userappdata}\WindowsExplorerCmd"

Note that for {user*} constants (like {userappdata}) to work reliably, you need to run the installer in non-Administrator mode (PrivilegesRequired set to lowest). Otherwise you may not get the behavior you want. See also Installing application for currently logged in user from Inno Setup installer running as Administrator.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992