Code: Select all
robocopy %USERPROFILE%\Desktop\ C:\SWAT /MOVE /S /E
md %USERPROFILE%\Desktop
Is there a simple way to refresh the desktop after executing the code above and also running the script in the background?
Thanks in advance
Moderator: DosItHelp
Code: Select all
robocopy %USERPROFILE%\Desktop\ C:\SWAT /MOVE /S /E
md %USERPROFILE%\Desktop
Code: Select all
Set oShell = CreateObject ("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c MoveItemsFromDesktop.bat"
oShell.Run strArgs, 0, false
Code: Select all
echo. &<nul set /p "= :/ Restart 'explorer.EXE'
:: (
>nul taskkill /im explorer.EXE /f &&start explorer.EXE
<nul set /p "= :/ Restart 'explorer.EXE'"
:: )
<nul set /p "= [OK]" &echo.
Some other possibilities that may work under certain circumstances:
Code: Select all
rundll32.exe user32.dll,UpdatePerUserSystemParameters
Code: Select all
ie4uinit.exe -ClearIconCache
Code: Select all
ie4uinit.exe -show