Skip to content
⌘ NSIS Forum Archive

Copy a file that already exists

3 posts

James4563#

Copy a file that already exists

Hi,

Is it possible while installing my program to copy a file.

The file I acctually want to copy is java.exe. I need to make a copy of it and rename it. I cant include the java.exe in my installer because it could be a different version.

So is it possible for me to make a copy of java.exe while installing?

Thanks,
James
Red Wine#
Provided that you know the exact path of the file you may copy/rename the file at runtime in one action e.g.
CopyFiles "$WINDIR\notepad.exe" "$TEMP\copy of notepad.exe"
James4563#
Excellent!

Thanks, I did acctually find that out shortly after posting the topic.

Thanks again.