ExecWait runs in wrong context?
I am attempting to rename a dll that was incorrectly placed into the System32 directory by AdvancedInstaller ("Advanced" is not the word I would use; there's a reason I switched to NSIS). I have no problems with the renaming if I launch a command line manually. If I use the Rename command in NSIS I have no success. So I tried using either "Exec" "ExecWait" or "nsExec::Exec" in order to run the command 'ren' (eg nsExec::Exec '"ren" file file.old'). Again nothing happens.
Therefore I ran the following
ReadEnvStr $R0 COMSPEC
Exec '"$R0" start cmd.exe'
so that I could interact with the command prompt spawned by the installer. If I search for the dll in the System32 directory, it can't find it even though in Windows Explorer it is clearly there. Doing a directory list in the command prompt doesn't show the dll in the list. This gives the impression that the command prompt being launched from the installer is not launching as a normal command prompt does if launched manually.
For the heck of it I tried running 'setshellvarcontext' to 'current' (which is admin in my case) with no success. Are there any ideas as to why I can't rename the dll from the installer but have no problems when launching a command prompt normally? They should behave the same right? Thanks in advance for any input.