Does anyone have success or is it possible to deploy a file in "%allusersprofile%\AppData\Lo calLow\ path via SCCM?

Hi,

I would like to deploy a preference file for Quicktime with an extension of .qtp file specifically on this location %AppData%\LocalLow\Apple Computer\QuickTime

Does anyone have success or is it possible to deploy a file in "%allusersprofile%\AppData\LocalLow\ path via SCCM?

If I double click the file my vbs or bat works.  But if I deploy it, it doesn't.  I tried deploying via .cmd, .bat, .vbs the log said success but the file is not getting copied.

Please advise. Thanks!

June 19th, 2013 8:24pm

Try running your script with system account, to do this, simply download sysinternals suite, extract it and run "psexec.exe -s cmd", this will open up the command prompt with system account.

Things are a bit different when running in the system context and I'm guessing the problem you're facing is the %APPDATA% variable...

Free Windows Admin Tool Kit Click here and download it now
June 19th, 2013 8:32pm

Hi,

I followed your instruction but I'm not sure what I am trying to accomplish with that? Are you saying to include that command in my package deployment? Or you just want to prove whether it will work in a user or system context?

It looks like I can deploy the QTP file only when a user is logged on.  However, my result is not consistent. I'd like to know how others are doing?

June 19th, 2013 11:06pm

Or you just want to prove whether it will work in a user or system context?

This is exactly my point. %APPDATA% refers to user's profile and when running things with system account (like the ConfigMgr client does), that account simply doesn't have a profile and therefore your script doesn't work.

What you could do:

  • Run the script in the currently logged on user's context
  • Modify your script to get the profile paths for all the users from the registry and do the file copy based on that (all the users who have logged at some point, all the users who will be logging (default user) and all the currently logged on users

Free Windows Admin Tool Kit Click here and download it now
June 20th, 2013 7:07am

are you using cscript.exe in front of your file when deploying?

cscript.exe script.vbs

June 20th, 2013 7:59am

 that account simply doesn't have a profile and therefore your script doesn't work.
That's not true. Even the system account has got a profile.
Just open "psexec -i -s cmd" (that will launch a cmd in system context as narcoticoo already mentioned) and run the 'set' command. That will list all variables available in system context. On my client it is set to ALLUSERSPROFILE=C:\ProgramData.
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2013 9:46am

Thanks Torstein. So based on this result, how do I deploy my Quicktime .QTP file (It's quicktime preference) to each user folder under this path c:\users\%username%\AppData\LocalLow\Apple Computer\QuickTime\.

****************

Windows Imaging\;C:\Program Files\AdminStudio\11.5\Common\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=170a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
QTJAVA=C:\Program Files\Java\jre7\lib\ext\QTJava.zip
SMS_ADMIN_UI_PATH=C:\Program Files\Microsoft Configuration Manager\AdminConsole\
bin\i386
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP
UATDATA=C:\WINDOWS\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77
USERDOMAIN=DOMAINABC
USERNAME=XABC$ (*Happens to be the name of the computer)
USERPROFILE=C:\WINDOWS\system32\config\systemprofile
windir=C:\WINDOWS

C:\WINDOWS\system32>

************************************

When I use this command and deploy as batch file, it doesn't get pasted to my users folder.  Instead it creates

c:\users\XABC$\AppData\LocalLow\Apple Computer\QuickTime\"

************************************

cd\
mkdir "c:\users\%username%\AppData\LocalLow\Apple Computer"
mkdir "c:\users\%username%\AppData\LocalLow\Apple Computer\QuickTime"
cd\
copy /y "\\DOMAINABC\Quicktime\7.74.80.86\QuickTime.qtp" "c:\users\%username%\AppData\LocalLow\Apple Computer\QuickTime\"




June 20th, 2013 9:13pm

Basicly you have two scenarios:

  • users who already have logged on on to the computer (profile is there)
  • users who will be logging on the computer (profile isn't there, default user profile is)

Rough way would be just doing a for loop of dir command on the "%PUBLIC%\.." and get all the folder's there are and use them... example:

for /f %%i in ('dir /ad /b "%PUBLIC%\.."') do copy /y "\\share\file.qtp" "%PUBLIC%\..\%%i\Quicktime\"


Free Windows Admin Tool Kit Click here and download it now
June 20th, 2013 10:48pm

Thank you.  I used that command /f %%i in ('dir /ad /b "%PUBLIC%\.."') do copy /y "\\share\file.qtp" "%PUBLIC%\..\%%i\Quicktime\" and what it does is create a .qtp file in the public folder. However, when a new user logs in the to machine, it does not still get the file either the existing users get the file in their %AppData%\LocalLow\Apple Computer\QuickTime

June 21st, 2013 2:00am

How about this.. do a batch (.bat) file:

REM Create folders for users

for /f %%i in ('dir /ad /b "%PUBLIC%\.."') do mkdir "%PUBLIC%\..\%%i\AppData\LocalLow\Apple Computer\QuickTime\"

REM Copy files

for /f %%i in ('dir /ad /b "%PUBLIC%\.."') do copy /y "\\DOMAINABC\Quicktime\7.74.80.86\QuickTime.qtp" "%PUBLIC%\..\%%i\AppData\LocalLow\Apple Computer\QuickTime\"

It should copy the file to %PUBLIC&\..\Default\AppData\LocalLow\Apple Computer\QuickTime which should be the folder of default user profile, but I'm not sure does this get copied to new user when he logs in the first time...

Free Windows Admin Tool Kit Click here and download it now
June 21st, 2013 10:26am

Did you get this working?

If you are running this with the SYSTEM context (deployed to computers), the UNC path \\domainabc for the file doesn't work and you should actually put the file next to the batch file and change the copy command to copy ".\quicktime.qtp" "%public.."

August 7th, 2013 1:59am

Hi All,

This is my assumption please rewrite  if I wrong

There is two things need to happen

1.Deployement process (traditional sccm process)

2.Copying  .qtp  file to each users  %APPDATA% location  who all are login into that machine

this two things canot be exicute at one time

 narcoticoo  is says may be right  there will be access issue  if runngin copying script while one user is loged on and try to copy file into another users %APPDATA% folder

I will suggest a solution please try it 

 create an Active setup BAT script .So when ever every user is log on this script will run and copy the file .sample script given below

  [HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\qtp_filecopy    StubPath = copy \\share\qtp\.qtp "%appdata%\"
    Version = 1.0

include this all in your sccm package  file +BAt file as commandline

check the script as well its a BAt file script

If not copying from share directly copy to local hard disk then copy from there to APPDATA location

Free Windows Admin Tool Kit Click here and download it now
August 7th, 2013 5:36am

Thanks.  Let me try that. I kind of postponed my quicktime deployment because I almost give up... but this give me hope and I will try! :)
August 12th, 2013 1:17pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics