I'm trying to move a folder from "C:\Program Files" into "C:\Documents and Settings\All Users\Documents" after it gets installed by my MSI+MST. To do so, I'm using a Deferred Custom action with the following VB Script:
Dim filesys, folderTomove
set filesys = CreateObject ("Scripting.FileSystemObject")
set folderTomove = filesys.GetFolder ("C:\Program Files\Infragistics\Documents\Infragistics\")
folderTomove.Move ("C:\Documents and Settings\All Users\Documents\")
The folder is somewhat big with almost a hundred of subfolders and files (I suppose it doesn't matter, but I include it just in case)
The Custom Action is Deferred and set to run AfterScheduleReboot
When trying to install it gives me the error when it's only 1 second away from finishing:
- 2146828230...File Already exists, Line 4, Column 1.
I have tested the code and it works when outside of the CA. Also tried to move the folder manually while the error was displaying, and it works. I have also tried to execute an independent *.vbs with the same code while the error was there (so the installation was paused because of the error, thus all the files were still there), and it works, it only fails when trying to execute from the CA.
I have tried with and without the last "\" when declaring the source path on the CA script and still fails to run.
At this point it appears that the issue is the CA, not the code itself, but not sure. I have found no useful information on the Install log about this (had to break it in two in order to post it here)
I can't change the install directory directly into the component because of the client's policies, neither can use the "MoveFolder" table since the folder I want to move is installed with the MSI (thus it's not a pre-existing folder).
Any assistance will be greatly appreciated