@echo off REM - Attention encodage OEM-850 REM - Options ver=1.0 setlocal enableextensions enabledelayedexpansion title PassGen %ver% :menu cls echo Pour des raisons de lisibilit‚, les caractŠres suivants ne seront pas utilis‚s : echo "O" lettre O majuscule echo "0" chiffre z‚ro echo "l" lettre L minuscule echo "1" chiffre un echo. :pass set /P _length=Password Length: %==% REM set _length=8 set /a z = %_length% set "string=ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz123456789" set "password=" for /L %%i in (1,1,!z!) do call :_genRand echo Password is: %password% pause > NUL goto :menu :_genRand set /a x=%random% %% 62 set password=%password%!string:~%x%,1! goto :eof