Variables in setupcomplete?

crypticus

Well-Known Member
MKDIR commands inside setupcomplete.cmd to create folder under "%localappdata%\x\x\x\x\x\x" or "%appdata%\x\x\x\x\x\x"
will result as, creating folder under "C:\" main folder. I mean the green part will be in "C:\" directly. So %xxx% part acts as C:\

mkdir "%localappdata%\test" AND mkdir "%appdata%\test"
will create "C:\test" folder.

I know user is not created so its normal that it wont work, but the thing im asking is: can we use variables in setupcomplete or is it failing just because user is not created and in other scenarios PATH variables that already present will work?

edit: its also stupid that variable that doesnt exist was changed to C:\
 
Last edited:
SetupComplete.cmd runs as SYSTEM, %localappdata% is undefined (NULL).

This should be moved to a RunOnce task to work as another user.
 
These path variables are the same for all users.

%ProgramData%
%ProgramFiles%
%ProgramFiles(x86)%
%SystemDrive%
%SystemRoot%
%windir%
 
Back
Top