Forum Discussion

siebrasse's avatar
siebrasse
Copper Contributor
Oct 27, 2021
Solved

Using variables in Folder Redirection

I want to redirect a text file from AppDir to the users Appdata folder.   In advanced installer I have setup: Folder: APPDIR File Name Pattern: .\.*txt Destination: c:\users\<myusername>\Appdata...
  • TIMOTHY_MANGAN's avatar
    Oct 28, 2021
    When running inside of the container any code, including PSF based code, that attempts to write to the user's Appdata (by which I assume you mean C:\Users\Username\AppData\Roaming) folder will end up redirected by the lower level code back to the package area for the folder under LocalAppData. And there is nothing the PSF can do about it.

    But presumably the user's system has something redirecting the roaming data and you can target that location directly instead.

    Maybe it is a home drive, maybe it is mounted drive, those are easy and presumably advanced installer has an option that would do.

    If it is a profile redirection system implemented as a filter driver (UEV, AppSense, FsLogix, but not Roaming Profiles or Folder Redirection ) you can ask ai to redirect to LocalAppData and train the configuration rules of the filter driver to pick it up from the package LocalAppData after.

Resources