Page 2 of 2

Re: copy folder from %src% to local appdata and from %src% to appdata (roaming)

Posted: 18. Aug 2024, 19:40
by Frank Dethlefsen
Hi!

That seems to be a local system problem from the Matrix42 UEM Agent. Try to use the /B switch for another temporary installation folder like this:

Call "%Src%\files\HP_SmartStream_Silent_Installer64.exe" /S /B"C:\HPTmp" /V /Qn
:roll:

Re: copy folder from %src% to local appdata and from %src% to appdata (roaming)

Posted: 22. Aug 2024, 11:32
by rshitole
Sure, i will try this

Re: copy folder from %src% to local appdata and from %src% to appdata (roaming)

Posted: 23. Aug 2024, 09:33
by rshitole
I have used that command line
now in the package editor, when I am debugging it then it is not performing #Set:UserConfig, CLIENT DONTDELETE this

so I have made changes as below:-


[Installer]
1:..\..\..\..\User\Setup.exe, %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupDeu.chm, %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupEnu.chm, %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:%Temp%\Setup64.exe, %CommonSetupDir%\Setup.exe, OPTIONAL ALWAYS NOSIZEWARNING SETUP WINDOWS64, 0
1:..\..\..\..\User\Setup64.exe, %CommonSetupDir%\Setup.exe, OPTIONAL ALWAYS NOSIZEWARNING SETUP WINDOWS64, 0
1:%SetupInfDir%\Setup.inf, , ALWAYS, 0
; 1:%SetupInfDir%\Setup.ico, , NORMAL, 0
; 1:%SetupInfDir%\Logo.bmp, , NORMAL, 0
1:, "%App%\Files\AppData\HP\", CREATE DIRECTORY CASCADED, 0
1:, "%App%\Files\LocalAppData\HP\", CREATE DIRECTORY CASCADED, 0
Callhidden %System%\robocopy.exe "%Src%\Files\AppData\HP" "%App%\Files\AppData\HP" /MIR
Callhidden %System%\robocopy.exe "%Src%\Files\LocalAppData\HP" "%App%\Files\LocalAppData\HP" /MIR
1:, "%AppData%\HP\", CREATE DIRECTORY CASCADED, 0
1:, "%LocalAppData%\HP\", CREATE DIRECTORY CASCADED, 0
Callhidden %System%\robocopy.exe "%App%\Files\Appdata\HP" "%AppData%\HP" /MIR
Callhidden %System%\robocopy.exe "%App%\Files\LocalAppdata\HP" "%LocalAppData%\HP" /MIR



So now it's copying data, but I'm not sure if it will work when I deploy it to other computers.
without those changes files were not copying to appdata and local appdata
whats your thoughts on it ? shall I try to create package and wait for validation or anything else change is required here ?

Re: copy folder from %src% to local appdata and from %src% to appdata (roaming)

Posted: 28. Aug 2024, 13:58
by rshitole
Hello All,
My issue has been resolved now, below is my final setup.inf file which worked for me.

Thank you Frank for guiding me every step :)


[Installer]
1:..\..\..\..\User\Setup.exe, %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupDeu.chm, %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupEnu.chm, %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:%Temp%\Setup64.exe, %CommonSetupDir%\Setup.exe, OPTIONAL ALWAYS NOSIZEWARNING SETUP WINDOWS64, 0
1:..\..\..\..\User\Setup64.exe, %CommonSetupDir%\Setup.exe, OPTIONAL ALWAYS NOSIZEWARNING SETUP WINDOWS64, 0
1:%SetupInfDir%\Setup.inf, , ALWAYS, 0
; 1:%SetupInfDir%\Setup.ico, , NORMAL, 0
; 1:%SetupInfDir%\Logo.bmp, , NORMAL, 0
1:, "%App%\Files\AppData\HP\", CREATE DIRECTORY CASCADED, 0
1:, "%App%\Files\LocalAppData\HP\", CREATE DIRECTORY CASCADED, 0
Callhidden %System%\robocopy.exe "%Src%\Files\AppData\HP" "%App%\Files\AppData\HP" /MIR
Callhidden %System%\robocopy.exe "%Src%\Files\LocalAppData\HP" "%App%\Files\LocalAppData\HP" /MIR
1:, "%AppData%\HP\", CREATE DIRECTORY CASCADED, 0
1:, "%LocalAppData%\HP\", CREATE DIRECTORY CASCADED, 0
Callhidden %System%\robocopy.exe "%App%\Files\Appdata\HP" "%AppData%\HP" /MIR
Callhidden %System%\robocopy.exe "%App%\Files\LocalAppdata\HP" "%LocalAppData%\HP" /MIR


[Product]
; ReplaceEnv <Variable>
#Set:Installation, MACHINE DONTDELETE
#Set:Deinstallation, MACHINE DELETE
#Set:UserConfig, CLIENT DONTDELETE

[Set:Installation]
If DoesRegKeyExist ("%RegUninstallKey%") == "1" Then "Reinstall" Else "Install" EndIf

;Step 1: Copy Userprofile Files to %APP% within Machine-Part:
MkDir "%App%\Files\AppData\HP"
Callhidden %System%\robocopy.exe "%Src%\Files\AppData\HP" "%App%\Files\AppData\HP" /MIR
MkDir "%App%\Files\LocalAppData\HP"
Callhidden %System%\robocopy.exe "%Src%\Files\LocalAppData\HP" "%App%\Files\LocalAppData\HP" /MIR

[Install]
AddMeter -1
Call "%Src%\files\HP_SmartStream_Silent_Installer64.exe" /S /B"C:\HPTmp" /V /Qn
If "%ErrorLevel%" <> "0" Then "SET:InstallationError" EndIf
Del "%CommonDesktop%\HP SmartStream.lnk"

[Reinstall]
AddMeter -1
-Call MsiExec.exe /x{79FD838F-340F-45C5-9D1F-688F460E4621} /qn /norestart
DelTree "%Localappdata%\HP"
DelTree "%appdata%\HP"
If "%ErrorLevel%" == "3010" | "%ErrorLevel%" == "1641" Then "RebootRequired" EndIf
If DoesRegKeyExist ("%RegUninstallKey%") == "1" Then "Set:DeinstallationError" EndIf
Call "%Src%\files\HP_SmartStream_Silent_Installer64.exe" /S /B"C:\HPTmp" /V /Qn
If "%ErrorLevel%" == "3010" | "%ErrorLevel%" == "1641" Then "RebootRequired" EndIf

[Set:Deinstallation]
If DoesRegKeyExist ("%RegUninstallKey%") == "1" Then "Set:DeinstallationError" EndIf
If "%ErrorLevel%" == "3010" | "%ErrorLevel%" == "1641" Then "RebootRequired" EndIf
-Call MsiExec.exe /x{79FD838F-340F-45C5-9D1F-688F460E4621} /qn /norestart
-DelTree "%LocalApdata%\HP"
-DelTree "%Appdata%\HP"
-AddMeter -1

;Step 2: Copy %App%-userprofile-directories to userprofile directories within User-Part:
[Set:UserConfig]
MkDir "%AppData%\HP"
Callhidden %System%\robocopy.exe "%App%\Files\Appdata\HP" "%AppData%\HP" /MIR
MkDir "%LocalAppData%\HP"
Callhidden %System%\robocopy.exe "%App%\Files\LocalAppdata\HP" "%LocalAppData%\HP" /MIR

[RebootRequired]
SetReboot 1
-SetReboot 1

[Shell:Product]
%CommonStartMenu%\HP SmartStream,C:\Program Files\HP\HP SmartStream\HP SmartStream.exe,,C:\Program Files\HP\HP SmartStream,"HP SmartStream","",,-1,0

[Set:InstallationError]
ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% HP_SmartStream_Silent_Installer64.exe
Abort

[Set:DeInstallationError]
-Abort
-ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% HP_SmartStream_Silent_Installer64.exe