/build/static/layout/Breadcrumb_cap_w.png

How to write files into AppData\Roaming for All users, using a system account(SCCM)

Hey all, Im sure this is an easy one... for one of you senior engineers ;)

I am trying to create a folder and write a .ini file to:  AppData\Roaming for all users, using installshield MSI

I created the folder and dropped the .ini file under the [AppDataFolder] in the install shield installation designer

My problem is the MSI install and writes the folder and .ini correctly when using a user or admin account.

But the MSI dosnt write the directory or .ini at all when running as a system account(SCCM Program)

I must be using the wrong variable?

How can I write this to all users, using a system account

 

thank you!

 

Alex

 

 


5 Comments   [ + ] Show comments
  • I just cannot seem to get self healing to work right. I read McFaydens blog, and some other info sites - self healing seems to work for me - per user , but then when I load it into SCCM and deploy it , it dosnt seem to work , no matter of the user. - indierox 10 years ago
  • It seems that self healing is the way to go as best practice for this type of situation.

    Could someone help me figure this out?

    My setup is very simple.

    1. New msi
    2. one feature with all files copied down
    3. Start menu shortcut, desktop short cut
    4. Write file "foundation.ini" for all users to %appdata%\Oracle Predictive Solutions
    or AppData\Roaming\Oracle Predictive Solutions(for all users)
    5. When I log on as any user, IF the file dosnt exist, then create it by self healing the MSI

    When I hand install this MSI everything works! the files is created by self healing, I can delete it - re-launch it and it self heals and replaces the file/directory with a new default

    Problem: When I deploy this through SCCM , is seems to break self -healing!
    SCCM installs MSI using the "system" account

    Can anyone please help? Im pounding my head on the wall - I do not want to use active setup, spawn of the devil ;) - indierox 10 years ago
  • /poke VBSCAB /grin - indierox 10 years ago
  • Active Setup is far from being the spawn of the devil *IF* you know what you are doing.
    First of all, you need to understand that the system account, be it the SCCM one or any other localsystem account, DOES NOT HAVE ACCESS to any user resources as these are specific to the user and only accessible when the user is logged in. If you use roaming profiles then chances are high that the user profile you might be trying to target is not even on the local machine, but on a network server that a localsystem account also cannot access.
    Secondly, I would never ever ever use active setup to activate self healing from an MSI. I have seen all sorts of start up processes in corporate environments that involve some MSI activity. If your active setup tries to kick off an MSI self healing operation while another MSI process is running, your active setup will fail with the usual "Another installation is in progess" error, but active setup still marks the operation as completed and it will never run again.
    If you need to install files to a user profile, place those files on the local hard disk as part of the initial install, and then use a VBScript (also copied as part of the initial install) to copy the required files to the user profile, and to create any user registry keys that might be required. Use Active Setup to run the vbscript by calling wscript.exe (or cscript.exe) as vbscripts run entirely asynchronously and will not conflict with any other startup or login process. - EdT 10 years ago
  • Thanks for the feedback EdT - indierox 10 years ago

Answers (2)

Posted by: egiberne 10 years ago
Second Degree Brown Belt
0

Hello,

Could you tell us , if  you get  your *ini files in the system profile folder :

" C:\Windows\System32\config\systemprofile\AppData "

Not sure, but I am thinking  these will be there.

Maybe, if you want the msi put its files in the current userprofile, you have to use a Active Setup " . This mecanism used to repair the msi file at the start up session , and then put the files which not present.

Hope , this help you.

Posted by: anonymous_9363 10 years ago
Red Belt
0

Active Setup is The Spawn Of The Devil, to be used only when a package has no advertised entry-points.

Google for John McFadyen's blog on self-healing. Read and inwardly digest.


Comments:
  • ok , You suggest a self-Healing ... is this the link you talking about ? http://installpac.wordpress.com/2008/03/30/windows-installer-self-healing/ - egiberne 10 years ago
    • Well, it is an article by John and it is about self-healing. What do you reckon? - anonymous_9363 10 years ago
      • Thanks, for this advice. self-Healing seem to be good answer (the cheapest idea in time and resources) for few files. I will think about this option next time and try to implement it. - egiberne 10 years ago
 
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