Archive: Rename a file in the $WINDIR


Rename a file in the $WINDIR
Hi,

i have a fuc*ing probelm with NSIS! I want to rename the notepad.exe to notepad2.exe but my script don't work because the compiler says: "$WINDIR" is a unkown variable??? In the docs I have read that "$WINDIR is the windows directory (usually C:\windows or C:\winnt but detected at runtime)". Please write a example script! Not just one parse.

Thx


What's the version of NSIS you are using? What is the exact line you used to rename the file?


You must be using it in your script wrongly, because if $WINDIR was and unknown variable and you used it in a dir path, it wouldn't matter anyway.

Should be:
Rename "$WINDIR\notepad.exe" "$WINDIR\notepad2.exe"

-Stu


be concious that WinXP repairs missing files on renaming/deleting or moving them

>> I want to rename the notepad.exe to notepad2.exe

W2k too i think

you first have to delete (better replace) notepad.exe in the program cache ($sysdir\dllcache) - then do your action.


@Afrow UK

Hi ;),

big thx to you! I have forget the " " :) thats why it don't work... Now it works perfectly!


Cu
Antichrist