Hi,
I want copy file to UserProfile but doesn't work.
Sujet: Copy 1 image to UserProfile\appdata\....Uploads
UNC: %USERPROFILE%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads
Setup.ini:
%SRC%\FILES\*" "%USERPROFILE%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads"
I try with %SRC%\FILES\*" "c:\Temp"
That OK
I try with %WindowsUser% and %OsLogin% doen't work
I need your help please.
Sincerly,
Boutta
Copy file to UserProfile
Re: Copy file to UserProfile
when we want to build a package that copies a file to a user profile or run an executable under the user context we always add a step to the setup.inf that stages the files we are wanting to work with to a directory on the local machine that all users have access to first. For example, in our baseline image we create a folder on the root of C: called "Company" and set the permissions to it so that all "authenticated users" have full control of the folder.
In the inf file we add a machine copy section which copies the needed files from %SRC% to this location. Then we add a section to the inf file for "Client" which will execute or copy those files using the user context.
So you will have something like this.
#Set:Stage User Files, MACHINE DONTDELETE
#Set:Client Config, CLIENT DONTDELETE
The "Stage Users Files" section will copy the needed files to the local directory you create and then the "Client Config" section will execute the action using that directory as the new source. For example:
[Set:Stage User Files]
1:%Src%\1PasswordSetup-7.6.780.exe, C:\Company\1PasswordSetup-7.6.780.exe
[Set:Client Config]
AddMeter -1
Call "C:\Company\1PasswordSetup-7.6.780.exe" --silent
If "%ErrorLevel%" <> "0" Then "SET:InstallationError" EndIf
In the inf file we add a machine copy section which copies the needed files from %SRC% to this location. Then we add a section to the inf file for "Client" which will execute or copy those files using the user context.
So you will have something like this.
#Set:Stage User Files, MACHINE DONTDELETE
#Set:Client Config, CLIENT DONTDELETE
The "Stage Users Files" section will copy the needed files to the local directory you create and then the "Client Config" section will execute the action using that directory as the new source. For example:
[Set:Stage User Files]
1:%Src%\1PasswordSetup-7.6.780.exe, C:\Company\1PasswordSetup-7.6.780.exe
[Set:Client Config]
AddMeter -1
Call "C:\Company\1PasswordSetup-7.6.780.exe" --silent
If "%ErrorLevel%" <> "0" Then "SET:InstallationError" EndIf
Re: Copy file to UserProfile
Hi,
Thank for your reply.
I try:
[Create Folder]
MkDir "C:\Temp\Fond_Teams" >>>> OK
[Copy SRC]
Copy "%SRC%\Files\*" "C:\Temp\Fond_Teams" >>>>> OK
[Copy Fond_Teams]
Copy "C:\Temp\Fond_Teams\*" "%USERPROFILE%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads" >>>> doesn't work.
Maybe i'm not doing the right things.
Thank for your reply.
I try:
[Create Folder]
MkDir "C:\Temp\Fond_Teams" >>>> OK
[Copy SRC]
Copy "%SRC%\Files\*" "C:\Temp\Fond_Teams" >>>>> OK
[Copy Fond_Teams]
Copy "C:\Temp\Fond_Teams\*" "%USERPROFILE%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads" >>>> doesn't work.
Maybe i'm not doing the right things.
-
- Moderator
- Posts: 7965
- Joined: 13. Dec 2004, 23:10
- Location: Adendorf/Lüneburg
Re: Copy file to UserProfile
Does that last command run in the user part?
The call should look like this:
#Copy Fond_Teams,CLIENT
The call should look like this:
#Copy Fond_Teams,CLIENT
Hendrik Ambrosius / Senior Presales Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 GmbH | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com
Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 or of the support team.
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 GmbH | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com
Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 or of the support team.
[RESOLVE]Re: Copy file to UserProfile
Hello,
It was a legal issue.
it was necessary to copy the images in a folder having access to then copied them in %appdata%.
Boutta
It was a legal issue.
it was necessary to copy the images in a folder having access to then copied them in %appdata%.
Boutta
Who is online
Users browsing this forum: No registered users and 9 guests