/build/static/layout/Breadcrumb_cap_w.png

How to add a folder\file to 'all users' Application Data

Gday all,

I need to add a file to all users on pc's to appear in the path C:\Documents and Settings\%username%\Application Data\etc

This is (still) an XP fleet and we're using SCCM2007.

I thought I'd make an msi captured from making the folder in C:\Documents and Settings\Default User\Application data and deploy that, then when a user logs on, it'll self heal\active install and build in the folder\file in their profile (using the command msiexec /fauvs do deploy).

My theory was wrong, this doesn't work.

Where should I make this folder so it goes to all users Application Data?

Is my theory wrong? Should I be using a batch file and do something like:

@echo off

CD C:\

md "%APPDATA%\Foldernameetc"

 

???  Thanks for any advice here.


0 Comments   [ + ] Show comments

Answers (2)

Posted by: jaybee96 10 years ago
Red Belt
3

Q: What is the exact location of the file?

there are a couple of predefined folders you can use in a MSI:

[LocalAppDataFolder] = property is the full path to the file system directory that serves as the data repository for local (non-roaming) applications.

[AppDataFolder] = property to the full path of the Roaming folder for the current user

[CommonAppDataFolder] = the full path to the file directory containing application data for all users

 

So step 1 :

Place the file in the correct folder (see above)  in your MSI

Step 2: 

because you want to be sure that the file will be installed for every user that logs on to the machine, you will need to use Active Setup. http://www.itninja.com/blog/view/appdeploy-articles-activesetup 

Step 3:

Test

 

Posted by: dj_xest 10 years ago
5th Degree Black Belt
1

jaybee96 was correct, you can follow that. Also you can change your command from msiexec /fauvs to a simpler msiexec /fup. That will cover the files in the profiles as well as entries in HKCU registries if you have them.

msiexec /fauvs
 
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