cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reza1982
Level 2

RenameFile fails

Hi everyone,

The following is going on:
I have made custom action which runs a Installscript function to renamefile. I have used the renamefile example given in the help to change the file name.
The directory in which the file can be found is in the in [CommanAppDataFolder].

I have selected a DoAction if the finish button is pressed in the SetupComplete Dialogue. I get the notification the rename has failed, although the directory and the file that needs be changed are available.

If I have the folder and file to be changed already available before the setup is run, all things go well.

Does anybody know how I can succeed in changing the filename without having the original file on the target system?

Thanks in advance and regards,

Reza
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

It sounds like you might be trying to make a change that requires elevated privileges. Typically actions launched from the wizard do not have such privileges, and instead such changes need to be scheduled as deferred system-context actions in the Install Execute sequence.
0 Kudos
Reza1982
Level 2

Hi Michael,

I have changed the "In-Script Execution" to Deferred Execution in System Context. The "Return Processing" is Synchronous (Check exit code).
I have placed it in the "Install Exec Sequence" After PublishProduct and set the condition to the name of the radiobutton that has to be selected.

Unfortunately this leads also to a failure. Can you be more specific regarding your solution or explain to me what's wrong with the settings mentioned above.

Regards, Reza
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

It sounds like you've correctly applied the changes I was pointing to. So there must be another problem. Can you find out what's failing? For instance, watch it with process monitor to see what goes wrong. Or display the file name are you moving from and to, and check if the file is present while the message box is up.
0 Kudos