Solved

Unable to move a folder with a Deferred Custom Action in Admin Studio 8.5

Posted on 2011-03-25
2
657 Views
Last Modified: 2012-05-11
Hi all,

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\")

Open in new window


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)

WinXP-Install-log-1st-part-.txt
WinXP-Install-log-2nd-part-.txt

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  
0
Comment
Question by:Sergio_Apodaca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
ID: 35221985
Specify full destination path in the script. Such as,

CreateObject ("Scripting.FileSystemObject").movefolder "C:\Program Files\Infragistics\Documents","C:\Documents and settings\All Users\documents\Infragistics"
This will create new folder Infragistics under C:\Documents and settings\All Users\documents and move there all files from C:\Program Files\Infragistics\Documents .
0
 

Author Closing Comment

by:Sergio_Apodaca
ID: 35470276
I'm so sorry for the delay on rating your question. There were some other issues that required urgent attention and just now I was able to get back to this package. Thank you very much, the code worked as expected
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question