In my program, I create a registry key under current user. This program is run by the Task Scheduler with the highest permissions (S-1-5-32-545).
In my uninstall custom action, I have code to delete this key.
The code to delete the key works when I run as administrator.
The code does not work when run from the uninstall custom action.
I'm guessing that the reason it doesn't work in the latter case is because current user is different when the uninstaller executes than when local admin executes the code.
How can I delete this registry key when run from the uninstall custom action? How do I point the uninstall custom action to the correct current user?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…