Skip to content
⌘ NSIS Forum Archive

Power User and PendingFileRenameOperations

7 posts

smatte#

Power User and PendingFileRenameOperations

When installing with a power user and some files are locked, my installer mark those files for rename on reboot but power user are unable to write in PendingFileRenameOperations registry key. Is there any workaround or should I allow intallation only to administrator?
dienjd#
Can you please post your method of writing to PendingFileRenameOperations? I haven't been able to find documentation on it.
Anders#
smatte#
If your file is in use:

# Get a temp file name
GetTempFileName $0
# Install
SetOutpath $INSTDIR
File /oname=$0 "something.dat"
Rename /REBOOTOK "$INSTDIR\0" "something.dat"

It will add an entry to PendingFileRenameOperations.
dienjd#
Thanks for the help! I should have been able to figure it out, but I was fixated on searching for "PendingFileRenameOperations" in the manual.