Na nossa empresa, escrevi este script que faz algumas coisas,
A.) Verifica se há um mapa de unidade atual e, se não existir, mapeia uma letra de unidade.
B.) Verifico a existência de arquivos na área de trabalho dos usuários locais, se o arquivo não estiver lá, e copie se de um compartilhamento de rede.
C.) Verifica qual versão do windows está rodando e executa um script diferente de acordo.
Espero que isso ajude você.
+++++++++++++++++++++++++
@echo off
echo Created by: Jeff Borg - 01/25/2011
echo.
echo.
IF NOT EXIST P: GOTO :NetMap
net use P: /delete
:NetMap
net use P: \SERVER2\bvdata
ver | find "XP" > nul
if %ERRORLEVEL% == 0 goto ver_xp
if not exist %SystemRoot%\system32\systeminfo.exe goto warnthenexit
systeminfo | find "OS Name" > %TEMP%\osname.txt
FOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%i
echo %vers% | find "Windows 7" > nul
if %ERRORLEVEL% == 0 goto ver_7
echo %vers% | find "Windows Vista" > nul
if %ERRORLEVEL% == 0 goto ver_vista
:ver_xp
echo Current Version Windows XP
Echo.
Echo.
C:
IF NOT EXIST "C:\Documents and Settings\%username%\Desktop\BusinessVisionCSE.rdp" GOTO xpNotFound
Echo Found "BusinessVisionCSE.rdp" on %username%'s desktop
goto exit
:ver_vista
echo Current Version Windows Vista
Echo.
Echo.
C:
IF NOT EXIST C:\Users\%username%\Desktop\BusinessVisionCSE.rdp GOTO vistaNotFound
Echo Found "BusinessVisionCSE.rdp" on %username%'s desktop
goto exit
:ver_7
echo Current Version Windows 7
Echo.
Echo.
C:
IF NOT EXIST C:\Users\%username%\Desktop\BusinessVisionCSE.rdp GOTO 7NotFound
Echo Found "BusinessVisionCSE.rdp" on %username%'s desktop
goto exit
:xpNotFound
Echo Could not find file "BusinessVisionCSE.rdp" on %username%'s desktop.
Echo.
Echo.
Echo Copying from \SERVER1\gpofiles\BusinessVisionCSE.rdp
Echo.
Echo.
xcopy \SERVER1\gpofiles\BusinessVisionCSE.rdp "C:\Documents and settings\%username%\Desktop\"
Echo.
Echo.
Echo Found "BusinessVisionCSE.rdp" on %username%'s desktop
GOTO exit
:vistaNotFound
Echo Could not find file "BusinessVisionCSE.rdp" on %username%'s desktop.
Echo.
Echo.
Echo Copying from \SERVER1\gpofiles\BusinessVisionCSE.rdp
Echo.
Echo.
xcopy \SERVER1\gpofiles\BusinessVisionCSE.rdp C:\Users\%username%\Desktop\
Echo.
Echo.
Echo Found "BusinessVisionCSE.rdp" on %username%'s desktop
GOTO exit
:7NotFound
Echo Could not find file "BusinessVisionCSE.rdp" on %username%'s desktop.
Echo.
Echo.
Echo Copying from \SERVER1\gpofiles\BusinessVisionCSE.rdp
Echo.
Echo.
xcopy \SERVER1\gpofiles\BusinessVisionCSE.rdp C:\Users\%username%\Desktop\
Echo.
Echo.
Echo Found "BusinessVisionCSE.rdp" on %username%'s desktop
GOTO exit
:warnthenexit
echo Unable to determine current OS version - Contact [email protected]
pause
:exit
Echo.
Echo.'