This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to rename setup.exe from Postbuild Event
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 14, 2011
03:13 PM
How to rename setup.exe from Postbuild Event
I'm trying to simply rename setup.exe from the Postbuild Event. I specify the following command, but nothing happens: REN "\DiskImages\Disk1\setup.exe" "\DiskImages\Disk1\TestSetup.exe"
How do you rename the setup.exe from Postbuild Events?
How do you rename the setup.exe from Postbuild Events?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 16, 2011
08:03 AM
I'm not sure this is the right way to handle such a rename, given that there are options to select the name in the product/release configuration already. That said, the problem is REN is a built-in command understood by cmd.exe, but it's not an actual executable. You can tell the difference with the where command:
C:\>where renUnfortunately move is also a built-in command, so you might have to try something like cmd /c "ren from-name to-name".
INFO: Could not find files for the given pattern(s).
C:\>where xcopy
C:\Windows\System32\xcopy.exe
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 16, 2011
11:08 AM
Thanks for the reply. For each product configuration I have a few different releases. Some releases I want to have setup.exe, others I want to have something different, so having a way to rename the setup.exe file after the build is necessary in my case.
The rename function does not work in my testing. What does work is doing two steps: cmd /c copy "\setup.exe" "\NewName.exe", then deleting the original: cmd /c del "\setup.exe"
Also, I want to distribute the exe after build. I found that the "Distribute After Build" function takes place after the Postbuild Event. So, I needed to do my copy and del on the file at it's destination folder. And yes, I suppose I could and should just have my PostBuild Event do it all in one copy command. But doing that would eliminate your ability to just right click on the release and perform a quick "Distribute."
The rename function does not work in my testing. What does work is doing two steps: cmd /c copy "
Also, I want to distribute the exe after build. I found that the "Distribute After Build" function takes place after the Postbuild Event. So, I needed to do my copy and del on the file at it's destination folder. And yes, I suppose I could and should just have my PostBuild Event do it all in one copy command. But doing that would eliminate your ability to just right click on the release and perform a quick "Distribute."