We have a program which makes temporary directory
%USERPROFILE%\AppData\Local\Tempand working on there, and delete the temporary directory when I quit the program.
I want to make the program generate its temporary diretory not on
Temp but SSD partition
Unfortunately, the program does not have any settings that to change the temporary directory. This environment(Windows) is installed in HDD, and have SSD partition. (I can't install Windows on SSD because of some problems.)
So, I think I make symlink
%USERPROFILE%\AppData\Local\Temp which direct to
It seems to be worked.
However, I couldn't prevent the program delete the symlink
HT. In other words, I need to make symlink again and again after I quit the program.
How can I prevent deleting the symlink from the program?
Solution that I tried
I tried to remove deleting permission about symlink
%USERPROFILE%\AppData\Local\Temp\HT from usual user (The program is running by usual user, not UAC-upgraded user).
From Property -> Security -> Advanced(?, my environment is Japanese, but seems to be advanced) 1. Disable permission inheritance 2. Add Reject policy about delete permission for usual user, Administrator, and system
But the program could delete the symlink.
How can I prevent deleting symlink to directory from the program which runs not on admin authority?
P.S. sorry for not-usual words. I'm using Japanese windows, so I couldn't found properly matching English phrase.
- I do not want to change
Tempdirectory to another directory/partition completely. Just the directory