I want to check for a file and copy it over to another directory if it exists. Unfortunately, the file exists in the AppData folder.
CheckFile:
!define INSTDIR_DATA "$APPDATA\Local\VirtualStore\Program Files\SomeFolder"
IfFileExists INSTDIR_DATA\SettingsFile.ini CopyOver NotHere
I get into this section with no problem, but then it can't seem to find the file despite explicitly making sure it exists. Am I missing something? It should be noted I do want this directory searched via the current user directory, so setting it to all users is not needed.
NSIS has a $LocalAppData constant:
DetailPrint $AppData
DetailPrint $LocalAppdata
on my system this prints:
C:\Users\Anders\AppData\Roaming
C:\Users\Anders\AppData\Local
$AppData is not actually the AppData "root" but the roaming part of it.
If you have the RequestExecutionLevel
attribute in your script then this will affect how Windows deals with file-system redirection and the VirtualStore is a part of that.