/build/static/layout/Breadcrumb_cap_w.png

Self healing to copy file to appdata folder

I do not have a background in application pakaging so please excuse my ignorance.

I am trying to repackage Cisco Anyconnect VPN Mobilty Client. To pre-populate the server field once the software is installed I need to copy an XML file to the "Appdata\Local\Cisco\Cisco AnyConnect Secure Mobility Client" folder of each user profile.

Now, I believe self-healing is the best way to accomplish this. I have read tutorials and previous posts on self healing but cannot for the life of me get it to work. Can someone please provide or point me to some step by step instructions for me to do this?

Any assistance is very much appreciated.

Thanks in advance.

 


3 Comments   [ + ] Show comments
  • Its dead simple.....
    1. Add the user data file to your msi. but dont mark it as a keypath, use a registry keypath instead
    2. Now if its a recaptured MSI, make the shortcut advertised, in which case , if the user specific file is missing, it will trigger a repair.
    3. Another option, if u dont wish to advertise the shortcut can be the use of active setup. Create a active setup entry under HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductName]. Create a stubpath entry as Msiexec /fpu(f-repair, p-missing files, u- missing user specific registry) [ProductCode] /qn
    4. Through tables u can make use of Move File table. Refer MSDN for more info on this table and its usage.
    Hope u find it useful - talonsprem87 10 years ago
  • You've left out a crucial element of this puzzle: a new feature containing the user-level elements must be created. Then the feature containing the advertised entry-point (which is normally an advertised shortcut) needs to be moved so that it becomes a child of the new feature. - anonymous_9363 10 years ago
  • Thanks for your help so far guys.
    A few questions:

    - Will Active Setup work with existing user profiles, including the currently logged in user?
    - I'm using an existing .msi so can an existing shortcut be the entry point?
    - If I use a reg key as the keypath, do I need to create a new one? Where do I create this and what does it need to be?

    Thanks again. - kgpetersen 10 years ago

Answers (1)

Posted by: terebent 10 years ago
Second Degree Brown Belt
1

To execute actions if a new user logs on, e.g. to write user-specific entries to the registry, Active
Setup can be used.
Therefore the following entries can/have to be made in a MSI package/
transform (.MST file) in registry table:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode]]

    "Version"="<application version>
   
"IsInstalled"=hex:01

    "StubPath"="<action to execute> (msiexec /u
    "[ProductCode])
"="<application name>" (optional)

You have to be sure that the user files are added in mst file.

For testing you can modify the next reg file and import it to your registry.

 Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode]]
@="[ProductName]"
"IsInstalled"=dword:00000001
"StubPath"="\"msiexec.exe /u [ProductCode]\""
"Version"="[ProductVersion]"

 

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ