Hi For the itunes application i need to copy to 2 files in to user profile on our win 7. i tried to copy them using predefined folder in an msi [UserPRofile]\Music\..

whne installing the msi the msi is creating a folder music on C drive which its not suppose to do.. Then i tried to copy those files and vbs file in to c:\programfiles(x86)\itunes (basically the vbs file copies the two files in to %userprofile%\Music)   and tried to run a vb script using activesetup...by creating a stubpath as wscript.exe "C:\Progam files (x86)\iTunes\name.vbs". But the active setup is also not working..as the active setup can't copy those two files in to %userprofile%\Music folder... If i run the vb script manually it works. Then i realized i'm doing some thing wrong...

I read many blogs on this But couldn't get this done. if any one can help me how to copy the those two files in to %userProfile% \Music folder..It would be really great help....Can u pls elobrate in detal if u don't mind so i may not miss any piece... Really appreciate all ur help and advices...



But the music folder is getting generated a

0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer


It maybe the case that your active setup is not working at all. Try installing it on a fresh machine.

To make sure, you can write a MsgBox inside your vbs to see if the vbs runs.

The process you have written is fine and should work.

Another thing which you can do is to write this vbs in your MSI and it will work when self heal happens when the advertised shortcut is launched. I have used this method in some of my packages and it has worked.

Answered 04/22/2012 by: piyushnasa
Red Belt

  • @ Piyushnasa, thanks for the reply... As u informed i did a msg box for the vb script and vb script runs but it fails. i noticed all the system folders and programfiles dir are locked.even users has no access to this folder. probably that might be the reason for vbs file not running... can u pls help me out....
  • @ piyushnasa... is there any way to set a directory as %userprofile%\Music folder ... So the files can directly copy to the required folder. i know it can be done by using set directory in customaction. but i never did that before and trying to use install shield..Its not easy as wise..And when this custom action is suppose to run... can u tell me in detail how to use this set directory custom action for this scenario.. it would be great help.. thanks for all the help...
Please log in to comment



Here in this post you can get a VBScript which I wrote for almost the same purpose:


You can check your script against it or use this by changing paths.

Then I added this script in the package to run in Deffered execution system context, just before install finalize. condition was set as NOT REMOVE~="ALL"

Create a dummy key somewhere in HKCU in the same feature as the Advertised shortcut and make it a key path. It is easy to see this in Installshield through Setup Design. This will trigger the self heal and during self heal the script will run for the user and will copy the file.

Hope it helps.


Answered 04/23/2012 by: piyushnasa
Red Belt

Please log in to comment

Please follow as Piyush said.

Also don't forget to include the "version" in your active setup and a separate VBS be included in the MSI which increases the version on uninstallation.

This guarantees a fail proof active setup and will let you know if the VBS has run properly by refering the version.

N.B. For versioning of active setup please refer this site:

Answered 04/23/2012 by: akki
Fourth Degree Black Belt

Please log in to comment

When you put the files in the MSI directly, in the UserProfile folder, did you give the component that contained these files a keypath that's a HKCU registry key, and did you make sure regular users have access to the original install location of the package?


And of course, did you have an advertised shortcut of another entry point to trigger MSI self-healing?


Answered 04/23/2012 by: pjgeutjens
Red Belt

  • @pjgeutjens,
    no i didn't.. do we need to mention a key path. i thought key path is not that important...
    what exactly should be the key path under HKCU registry....NO user doesn't have acess to the original installation... i do have an advertised shortcut for entry point....
  • @Pjgeutjens... thats the reason why i'm thinking whether we can go with set directory customaction and copy the files to that location..if i'm trying to use the predefined folder userprofile with out defining it in set directory customaction.. the files are getting copied at root of c:\..if i can use the predefined folder and sub folders then i can copy those files when the launches the shortcut it's going to selfheal.. can you tell me how to do this, i never did before these kind of custom action...
    thanks for all ur help....
  • have a look at my blog on the subject here: http://itninja.com/blog/view/a-general-approach-to-software-packaging-propagating-user-settings
Please log in to comment

Include the files in the msi using wise package studio to the below folder.


Answered 04/23/2012 by: Visalakshi
Orange Senior Belt

  • Hi Visalakshi,
    The thing is i don't have Wise package studio in my env all i have is install shield.Even though it needs to be defined right using Set directory.If i'm wrong can u pls correct...
  • If it is the case try with VB script as said by
    Piyush.Copy the file to %Userprofile%\Music. Keep a message box to trouble shoot the activesetup..
Please log in to comment
Answer this question or Comment on this question for clarity