@echo off

:VARIABILI_DA_PERSONALIZZARE
REM SE NECESSARIO, PERSONALIZZARE LE SEGUENTI VARIABILI IN BASE ALLE PROPRIE NECESSITA':
REM Percorso del programma, in genere non serve cambiarlo
SET PATEN=C:\Entratel\prog\entratel.exe
REM Percorso cartella principale del server
SET PATSE=\\server\chiavi_entratel
REM Unità  di rete da assegnare alle cartelle degli utenti
SET PATUN=X:
REM Nomi delle cartelle degli utenti (aggiungere o togliere a seconda della quantità di utenti da gestire)
SET PAT1=utente1
SET PAT2=utente2
SET PAT3=utente3
REM Nomi degli utenti (variabili libere, anche con spazi; aggiungere o togliere a seconda della quantità di utenti da gestire)
SET UT1=Nome Utente_1
SET UT2=Nome Utente_2
SET UT3=Nome Utente_3

:INIZIO
echo.
echo.
echo SCEGLIERE IL NUMERO DESIDERATO DALL'ELENCO SOTTOSTANTE:
echo.
echo 1) %UT1%
echo.
echo 2) %UT2%
echo.
echo 3) %UT3%
echo.
echo.
SET /P ENTRA=Quale utente vuoi usare (digita solo il numero, poi premi INVIO)? 
echo.
echo.
IF %ENTRA%==1 (
echo Hai scelto %UT1%
GOTO :UTENTE1
)
IF %ENTRA%==2 (
echo Hai scelto %UT2%
GOTO :UTENTE2
)
IF %ENTRA%==3 (
echo Hai scelto %UT3%
GOTO :UTENTE3
)
echo.
echo.
REM IF %ENTRA%==1 GOTO :UTENTE1
REM IF %ENTRA%==2 GOTO :UTENTE2
REM IF %ENTRA%==3 GOTO :UTENTE3
GOTO INIZIO

:UTENTE1
NET USE %PATUN% /DELETE
NET USE %PATUN% %PATSE%\%PAT1%
start /max /wait %PATEN%
NET USE %PATUN% /DELETE
exit

:UTENTE2
NET USE %PATUN% /DELETE
NET USE %PATUN% %PATSE%\%PAT2%
start /max /wait %PATEN%
NET USE %PATUN% /DELETE
exit

:UTENTE3
NET USE %PATUN% /DELETE
NET USE %PATUN% %PATSE%\%PAT3%
start /max /wait %PATEN%
NET USE %PATUN% /DELETE
exit
