12345678910111213141516171819 |
- @echo off
- echo Old usernames are:
- for /d %%A in (C:\OldDrv\Users\*) do echo %%~nxA
-
- set /p oldusername="Enter the old username: "
- set filepath="C:\OldDrv\Users\%oldusername%\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper"
-
- if exist %filepath% (
- ren %filepath% TranscodedWallpaper.jpeg
- reg add "HKCU\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "%~dp0TranscodedWallpaper.jpeg" /f
- reg add "HKCU\Control Panel\Desktop" /v WallpaperStyle /t REG_SZ /d 2 /f
- reg add "HKCU\Control Panel\Desktop" /v TileWallpaper /t REG_SZ /d 0 /f
- RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters ,1 ,True
- ) else (
- echo The specified file does not exist. Please check the old username and try again.
- pause
- )
-
- exit
|