rename installed file - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

cvas
Posts: 43
Joined: Mon Oct 01, 2007 8:20 pm

rename installed file

how i can rename or move an installed file ? on AdVinstaller 8.2 enterprise
i tried in custom action but always i get en error
here its the syntax of the command "ren "[APPDIR]"FilterPrn.dll FilterPrn_64.dll"
i want to rename the installed file "FilterPrn.dll" to "FilterPrn_64.dll"

thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: rename installed file

Hello,
i tried in custom action but always i get en error
You can try to set the custom action with the "Deferred, with no impersonation" execution option and see if it persists.
Can you please specify the error you are getting? You can also test the command outside the installer to make sure it manifests the intended result.

To move a file you can use our Copy/Move operation from the Files and Folders page. Here is its user guide reference.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cvas
Posts: 43
Joined: Mon Oct 01, 2007 8:20 pm

Re: rename installed file

here its the log for the error with your suggestion "Deferred, with no impersonation"
the command from the command prompt works ok

"
Info 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action script error , : Line , Column ,
MSI (s) (D0:DC) [11:55:19:750]: Executing op: ActionStart(Name=RenFilterPrnxxxxxx,,)
Action 11:55:19: RenFilterPrnxxxxxx.
MSI (s) (D0:DC) [11:55:19:843]: Executing op: CustomActionSchedule(Action=RenFilterPrnxxxxxx,ActionType=3074,Source=BinaryData,Target=ren "C:\Program Files\TaxCode\TaxSoft\"FilterPrn.dll FilterPrn_64xx.dll,)
MSI (s) (D0:DC) [11:55:20:265]: Note: 1: 1722 2: RenFilterPrnxxxxxx 3: C:\WINDOWS\Installer\MSIBB.tmp 4: ren "C:\Program Files\TaxCode\TaxSoft\"FilterPrn.dll FilterPrn_64xx.dll
MSI (s) (D0:DC) [11:55:20:328]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (D0:DC) [11:55:20:375]: Transforming table Error.

MSI (c) (20:F0) [11:55:20:421]: Note: 1: 2262 2: Binary 3: -2147287038
MSI (c) (20:F0) [11:55:20:515]: Transforming table Binary.

Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action RenFilterPrnxxxxxx, location: C:\WINDOWS\Installer\MSIBB.tmp, command: ren "C:\Program Files\TaxCode\TaxSoft\"FilterPrn.dll FilterPrn_64xx.dll
MSI (s) (D0:DC) [11:58:28:218]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (D0:DC) [11:58:28:281]: Transforming table Error.

MSI (s) (D0:DC) [11:58:28:328]: Product: TaxSoft_V2 -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action RenFilterPrnxxxxxx, location: C:\WINDOWS\Installer\MSIBB.tmp, command: ren "C:\Program Files\TaxCode\TaxSoft\"FilterPrn.dll FilterPrn_64xx.dll

Action ended 11:58:28: InstallExecute. Return value 3.

"
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: rename installed file

Hello,

Can you please try the following command line instead:

Code: Select all

ren "[APPDIR]FilterPrn.dll" FilterPrn_64.dll
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cvas
Posts: 43
Joined: Mon Oct 01, 2007 8:20 pm

Re: rename installed file

I take the same result
i test and this ren "[APPDIR]FilterPrn.dll FilterPrn_64.dll"
but i get the same
cvas
Posts: 43
Joined: Mon Oct 01, 2007 8:20 pm

Re: rename installed file

let explain what i want to do

i had 2 files FilterPrn.dll and FilterPrn_x64.dll
we must choose on property base if its version64 or NOT
but in destination folder the file must have the same name FilterPrn.dll
how i can do that ?
the only way i found it was to copy the 2 files FilterPrn.dll and FilterPrn_x64.dll in the same destination folder and
in the end i delete the file that i don't need it and rename the other.

thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: rename installed file

Hello,

Since you are renaming a file installed by your package, the custom action should be scheduled after the Install standard action. Also, you should try with both the following command lines:

Code: Select all

ren "[APPDIR]FilterPrn.dll" "FilterPrn_64.dll"

Code: Select all

ren [APPDIR]FilterPrn.dll FilterPrn_64.dll
The recommended approach in your case is described in this article.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”