Antichrist77
25th July 2003 14:36 UTC
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
kichik
25th July 2003 14:42 UTC
What's the version of NSIS you are using? What is the exact line you used to rename the file?
Afrow UK
25th July 2003 14:43 UTC
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
Brummelchen
25th July 2003 16:45 UTC
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.
Antichrist77
25th July 2003 17:18 UTC
@Afrow UK
Hi ;),
big thx to you! I have forget the " " :) thats why it don't work... Now it works perfectly!
Cu
Antichrist