Pages

Thursday, 6 January 2022

Copy File to user profile while installing through system contest

 For /F "tokens=2* delims= " %%u IN ('Reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" /V ProfilesDirectory') DO Set ProfilesDir=%%v

Set ProfilesDir=%profilesDir:%%SystemDrive%%=%\%ProfilesDir:~14,100%

For /F "tokens=*" %%d IN ('Dir /ad /b "%ProfilesDir%"') DO (

If /I NOT "%%d" == "ALL USERS" (

xcopy "%~dp0FIlezilla" "%ProfilesDir%\%%d\appdata\Roaming\FileZIlla" /y /e))

No comments:

Post a Comment

detection script

# =============================== # Detection Script - Visio Usage # =============================== $daysThreshold = 90 $prefetchPath = ...

Search This Blog