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
Answers (2)
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.
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
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
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