marioq

usefultools.cmd

Oct 13th, 2025
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 73.93 KB | None | 0 0
  1. @echo off
  2. setlocal
  3. :::::::::::::::::::::::::::::::::::::::::::::::::::
  4. :::::::::::::::::::"23/9/2025"~"martedì-23/settembre/2025 10:11:47"
  5. :::::::::::::::::::::::::::::::::::::::::::::::::::
  6. :::: queste variabili sono passate alle funzioni con "setlocal enabledelayedexpansion"
  7. :::: dopo l'etichetta :STRLEN_ck_end
  8. ::::
  9. ::##_start_CK_online i primi 20 caratteri "::##_start_CK_online" sono un marcatore
  10. :::: le righe di comando qui sotto vengono lette da curl per il controllo nella funzione :CK_ver
  11. :::: "INFO_ver_date=dd/MM/yyyy"
  12. set "INFO_ver_date=31/08/2025"
  13. :::: "INFO_ver_time=HH:mm:s"
  14. set "INFO_ver_time=09:09:59"
  15. :::: le righe qui sopra vengono lette da curl per il controllo nella funzione :CK_ver
  16. ::##::_end_CK_online i primi 20 caratteri "::##::_end_CK_online" sono un marcatore
  17.  
  18. set "INFO_ver_date_yyyy=%INFO_ver_date:~-4%" & REM INFO_ver_date_yyyy==2025
  19. set "INFO_ver_date_MMdd=%INFO_ver_date:~3,-5%%INFO_ver_date:~0,2%" & REM INFO_ver_date_MMdd==0831
  20.  
  21. set "INFO_ver_date_4_ck=%INFO_ver_date:~-4%%INFO_ver_date:~3,-5%%INFO_ver_date:~0,2%" & REM yyyyMMdd
  22. set INFO_ver_time_4_ck=%INFO_ver_time::=%
  23. if "%INFO_ver_time_4_ck:~0,1%" == "0" (
  24.     set "INFO_ver_time_4_ck=%INFO_ver_time_4_ck:~1,1000%"
  25. )
  26. if "%INFO_ver_time_4_ck:~0,1%" == " " (
  27.     set "INFO_ver_time_4_ck=%INFO_ver_time_4_ck: =%"
  28. )
  29.  
  30. echo      INFO_ver_date=%INFO_ver_date%
  31. echo INFO_ver_date_4_ck=%INFO_ver_date_4_ck%
  32. echo INFO_ver_time_4_ck=%INFO_ver_time_4_ck%
  33.  
  34. REM goto :EOF
  35.  
  36. REM set "INFO_ver_date_serial=%INFO_ver_date:/=%"
  37. REM set "INFO_ver_date_serial=%INFO_ver_date_serial: =%"
  38. REM set "INFO_ver_date_serial=%INFO_ver_date_serial::=%"
  39.  
  40. for /f "tokens=1,2 delims=:" %%A in ('chcp') do (
  41.     set "CHCP_OLD=%%B"
  42. )
  43. ::::::::::::::::::::::::::::::::::::::::::::::::::::
  44. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  45.  
  46. chcp 65001 >nul
  47.  
  48. ::::::::::::::::::::::::::::::::::::::::::::::::::::
  49. :::: caratteri speciali > < | & )( ! " ^ sono interpretati
  50. :::: in modo speciale da "setlocal enabledelayedexpansion"
  51. :::: per lavorare con STRLEN trasformo i caratteri speciali
  52. :::: in caratteri innocui a "setlocal enabledelayedexpansion"
  53. ::::
  54. :::: limite della riga di comando
  55. :::: https://learn.microsoft.com/it-IT/troubleshoot/windows-client/shell-experience/command-line-string-limitation
  56. if /i "%1" == "strlen" (
  57.     set "STRLEN=%1"
  58. )
  59. if not defined STRLEN (
  60.     goto :STRLEN_ck_end
  61. )
  62. set "STR_4_strlen="%*""
  63. ::::::::::::::::::::::::
  64. :::: REM ASCI 161 ¡ -The extended ASCII codes,Inverted exclamation mark- https://www.ascii-code.com/ - https://ss64.com/ascii.html
  65. set "STR_4_strlen=%STR_4_strlen:!=¿%" & REM alt+0191==¿
  66. set "STR_4_strlen=%STR_4_strlen:>=¿%"
  67. set "STR_4_strlen=%STR_4_strlen:<=¿%"
  68. set "STR_4_strlen=%!!|%"
  69. set "STR_4_strlen=%STR_4_strlen:&=¿%"
  70. REM set "STR_4_strlen=%STR_4_strlen:"=¶%" & REM alt+0182==¶
  71. set "STR_4_strlen=%STR_4_strlen:"=•%" & REM alt+0149==•
  72. set "STR_4_strlen=%STR_4_strlen:^=¿%"
  73. set "STR_4_strlen=%STR_4_strlen:(=¿%"
  74. set "STR_4_strlen=%STR_4_strlen:)=¿%"
  75. ::::::::::::::::::::::::
  76.  
  77. REM set "STR_quote=¶"    & REM alt+0182==¶
  78. set "STR_quote=•"    & REM alt+0149==•
  79. set "STR_quote_L=„‡»" & REM alt+0132==„ alt+0135==‡ alt+187==»
  80. set "STR_quote_R=«‡„" & REM alt+0171==« alt+0135==‡ alt+0132==„
  81. REM set "STR_quote_L=؇»" & REM alt+0216==Ø alt+0135==‡ alt+187==»
  82. REM set "STR_quote_R=«‡Ø" & REM alt+0171==« alt+0135==‡ alt+0216==Ø
  83. REM set "STR_quote_L=.‡»" & REM alt+0135==‡ alt+187==»
  84. REM set "STR_quote_R=«‡." & REM alt+0171==« alt+0135==‡
  85. REM set "STR_dummy=¿"       „
  86.  
  87. set "STR_4_strlen=%STR_quote_L%%STR_4_strlen%%STR_quote_R%"
  88. REM echo\00000000 STR_4_strlen==%STR_4_strlen%
  89. :::::::::
  90.  
  91. ::::::::::::::::::::::::::::::::::::::::::::::::::::
  92. ::::::::::::::::::::::::::::::::::::::::::::::::::::
  93. ::::REM set "Q="!"" & call :STR_set_dummy "%Q%"
  94. ::::REM set "Q=">"" & call :STR_set_dummy "%Q%"
  95. ::::REM set "Q="<"" & call :STR_set_dummy "%Q%"
  96. ::::REM set "Q="|"" & call :STR_set_dummy "%Q%"
  97. ::::REM set "Q="&"" & call :STR_set_dummy "%Q%"
  98. ::::REM set "Q=")"" & call :STR_set_dummy "%Q%"
  99. ::::REM set "Q="("" & call :STR_set_dummy "%Q%"
  100. ::::REM set "Q="^^"" & call :STR_set_dummy "%Q%"
  101. ::::REM set "STR_4_strlen=%STR_4_strlen:"=•%"
  102. ::::REM REM call :STR_set_dummy "^"
  103. ::::
  104. ::::REM :STR_set_dummy
  105. ::::REM if not "%0" == ":STR_set_dummy" goto :STR_set_dummy_end
  106. ::::    REM REM set "Q=%~1"
  107. ::::    REM echo\ "Q==%Q~%"
  108. ::::    REM set "STR_4_strlen=%STR_4_strlen:%%Q~%%=%%STR_dummy%%"
  109. ::::    REM call set Q=
  110. ::::REM goto :EOF
  111. ::::REM :STR_set_dummy_end
  112. ::::::::::::::::::::::::::::::::::::::::::::::::::::
  113. ::::::::::::::::::::::::::::::::::::::::::::::::::::
  114. ::::::::::::::::::::::::
  115. REM echo\\\\\\\\\\01 error==%errorlevel%
  116. REM echo\\\\\\\\\\STR_4_strlen==%STR_4_strlen%
  117. :::::::::::::::::::::::
  118. :STRLEN_ck_end
  119.  
  120. if not defined STR_4_strlen goto :STRLEN_no
  121. (
  122.     endlocal
  123.     setlocal enabledelayedexpansion
  124.     set "STRLEN=%STRLEN%"
  125.     set "STR_quote=%STR_quote%"
  126.     set "STR_quote_L=%STR_quote_L%"
  127.     set "STR_quote_R=%STR_quote_R%"
  128.     set "STR_4_strlen=%STR_4_strlen%"
  129.     set "my_STR_length="
  130.     set "CHCP_OLD=%CHCP_OLD%"
  131.     set "INFO_ver_date=%INFO_ver_date%"
  132.     set "INFO_ver_time=%INFO_ver_time%"
  133. )
  134. goto :STRLEN_NEXT_start
  135. :STRLEN_no
  136. (
  137.     endlocal
  138.     setlocal enabledelayedexpansion
  139.     set "CHCP_OLD=%CHCP_OLD%"
  140.     set "INFO_ver_date=%INFO_ver_date%"
  141.     set "INFO_ver_time=%INFO_ver_time%"
  142. )
  143. :STRLEN_NEXT_start
  144. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  145. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  146. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  147.  
  148. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  149. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  150. :::: imposto un titolo alla finestrta in modo da poterla riconoscere
  151. set "THIS_RANDOM=%random%"
  152. title %~n0-%THIS_RANDOM% %username% "%cd%"
  153. set N=
  154. for /f "tokens=1,2,3" %%A in ('tasklist /NH /FI "WINDOWTITLE eq %~n0-%%THIS_RANDOM%% %%username%%*"') do (
  155.     set /a N+=1
  156.     if !N! EQU 1 (
  157.         set "B=%%B"
  158.         echo\!B! | findstr /r /c:"^[0-9][0-9]*.$" >nul 2>&1
  159.         if !errorlevel! EQU 0 (
  160.             set "THIS_file_pid=!B!"
  161.             REM echo\QQQ "THIS_file_pid==!THIS_file_pid! A==%%A - B==!B! pid==!THIS_file_pid! - C==%%C "
  162.         ) else (
  163.             set "THIS_file_pid=%THIS_RANDOM:~2,-2%%date:/=% "
  164.             REM set "THIS_file_pid=%THIS_RANDOM:~0,2%dummy%date:/=%"
  165.             REM echo\WWW "THIS_file_pid==!THIS_file_pid! A==%%A - B==!B! pid==!THIS_file_pid! - C==%%C"
  166.         )
  167.     )
  168. )
  169. set N=
  170. title %~n0-%THIS_file_pid%-%THIS_RANDOM% %username% "%cd%" & REM per identificare la consolle cmd
  171. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  172. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  173.  
  174. set "THIS_file=%~nx0"
  175. set "THIS_file=%THIS_file:"=%"
  176. set "THIS_file_size=%~z0"
  177. set "THIS_file_date=%~t0"
  178. :::: se "THIS_file_size" è definita, il valore di "%~dp0" è il percorso reale del file.
  179. :::: se "THIS_file_size" non è definita, il valore di "%~dp0" è il percorco della directory al prompt che invoca lo script.
  180. :::: -|Strano comportamento, se "%THIS_file%" è in un percorso in "path" e viene invocato il nome tra vergolette "nomeFile.cmd"
  181. :::: -|"%~dp0" prende il valore della directory corrente e non della dir che contiene il "nomeFile.cmd"
  182. :::: -|"THIS_file_size=%~z0" e "THIS_file_date=%~t0" sono valorizzate se "%~dp0" è il percorso reale a "nomeFile.cmd"
  183. :::: if not [%cd%\]==[%~dp0] set "THIS_file_path=%~dp0"
  184.  
  185. if defined THIS_file_size set "THIS_file_path=%~dp0"
  186. set "THIS_file_full_path=%THIS_file_path%%THIS_file%"
  187. REM echo\-----------"cd=%cd%" "~dp0=%~dp0"
  188. REM echo\-----------"THIS_file=%THIS_file%"
  189. REM echo\-----------"THIS_file_path=%THIS_file_path%"
  190. REM echo\-----------"THIS_file_size=%THIS_file_size%"
  191. REM echo\-----------"THIS_file_date=%THIS_file_date%"
  192. REM echo\-----------"THIS_file_full_path=%THIS_file_path%%THIS_file%"
  193. REM echo\----------- 0=%0  0~=%~0 p=%~p0
  194.  
  195.  
  196.     set "ALL_0arg="%*""
  197.  
  198.  
  199.  
  200. set "TIME_start=%time%"
  201. set "ERROR="
  202. ::::::::::::
  203. :::: set "ESC=" & REM notepad++ "alt+27"
  204. for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do ( set "ESC=%%b" )
  205. set "C_RED=%ESC%^[91m" & REM Testo Rosso
  206. set "C__=%ESC%^[4m" & REM Sottolineato
  207. set "C_0=%ESC%^[0m" & REM Reset color
  208. :::::::::::
  209.  
  210. set "RESET_all_var=for /f "delims=^=" %%Z in ^('@set my_'^) do @set "%%Z=" "
  211. :::: Il carattere § viene sostituito da %LF% "echo %MSG:§=!LF!%"
  212.  
  213. set "MSG=-visualizza con ^"set my_^" §-resetta, elimina tutte le var ^"my_^" §* %RESET_all_var% §- exit %%errorlevel%% EQU-Uguale 0 -successo- §- exit %%errorlevel%% GEQ-Maggiore o uguale a 1 -errore-"
  214. ::::::::::
  215. :::: imposto Line-Fedd
  216. :::: dopo LF=^ 2 righe vuote da non eliminare
  217. set LF=^
  218.  
  219.  
  220. :::::::::::::::::: 2 righe vuote da non eliminare
  221.  
  222. if exist "%THIS_file_path%UnxUtils\tr.exe" (
  223.     set "TR_exe=%THIS_file_path%UnxUtils\tr.exe"
  224. )
  225. if exist "%THIS_file_path%cmdow.exe" (
  226.     set "CMDOW_exe=%THIS_file_path%cmdow.exe"
  227. )
  228. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  229. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  230.  
  231. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  232. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  233.  
  234. if "%1"=="" (
  235.     set "ERROR_start=Manca il parametro corretto"
  236.     call :HEADER
  237.     call :SOS_all
  238.     call :FOOTER
  239. )
  240. if /i "%1"=="CK_ver" (
  241.     call :HEADER
  242.     goto :%~1
  243. )
  244. :::::::::::::::::::
  245. if /i "%1"=="my_ip4" (
  246.     call :HEADER
  247.     goto :%~1
  248. )
  249. if /i "%1"=="ip4" (
  250.     call :HEADER
  251.     goto :my_ip4
  252. )
  253. :::::::::::::::::::
  254.  
  255. if /i "%1"=="where_is_ff" (
  256.     call :HEADER
  257.     goto :%~1
  258. )
  259. if /i "%1"=="my_date" (
  260.     call :HEADER
  261.     goto :%~1
  262. )
  263.  
  264. if /i "%1"=="geoip" (
  265.     call :HEADER
  266.     goto :%~1
  267. )
  268.  
  269. if /i "%1"=="user_is_admin" (
  270.     call :HEADER
  271.     goto :%~1
  272. )
  273.  
  274. if /i "%1"=="run_as_admin" (
  275.     call :HEADER
  276.     goto :%~1
  277. )
  278.  
  279. if /i "%1"=="NIC" (
  280.     call :HEADER
  281.     goto :%~1
  282. )
  283.  
  284. if /i "%1"=="strlen" (
  285.     call :HEADER
  286.     goto :%~1
  287. )
  288.  
  289. if /i "%1"=="-h" set "SOS=-h"
  290. if /i "%1"=="/h" set "SOS=/h"
  291. if /i "%1"=="h" set "SOS=h"
  292. if /i "%1"=="/?" set "SOS=/?"
  293. if /i "%1"=="-?" set "SOS=-?"
  294. if /i "%1"=="?" set "SOS=^?"
  295. if /i "%1"=="help" set "SOS=help"
  296. if defined SOS (
  297.     set "H_P2=%~2"
  298.     call :HEADER
  299.     if defined H_P2 (
  300.         for /f "tokens=*" %%A in ( 'findstr /r /x /c:"^[:][A-Z_0-9].*_sos$" "%THIS_file_full_path%"' ) do (
  301.             set "X=%%A"
  302.             set "X=!X::=!"
  303.             set "X=!X:_sos=!"
  304.             if /i "!X!"=="!H_P2!" (
  305.                 set "ALL_0arg=%1 !H_P2!"
  306.                 set "ERROR_help=sos per "!H_P2!""
  307.                 if !X!§==RUN_AS_ADMIN§ set Xopt=NO_CMDOW_exe
  308.                 call %%A !X! !Xopt!
  309.                 echo\::------
  310.                 echo\::%MSG:§=!LF!::%
  311.                 call :FOOTER
  312.                 exit /b %ERROR%
  313.             )
  314.         )
  315.         if /i "!H_P2!"=="all" (
  316.             set "ERROR_help=sos per "!H_P2!"..."
  317.             for /f "tokens=*" %%A in ( 'findstr /r /x /c:"^[:][A-Z_0-9].*_sos$" "%THIS_file_full_path%"' ) do (
  318.                 set "ALL_0arg=%1 !H_P2!"
  319.                 set "X=%%A"
  320.                 set "X=!X::=!"
  321.                 set "X=!X:_sos=!"
  322.                 call %%A !X!
  323.                 echo\::^|-----------------
  324.                 echo\::------------------
  325.             )
  326.             echo\::%MSG:§=!LF!::%
  327.             call :FOOTER
  328.             exit /b %ERROR%
  329.         )
  330.     )
  331.     if not defined H_P2 (
  332.         REM set "ERROR_parametro_-h="%1" richiede valore"
  333.         set "ERROR_parametro_%SOS%="%1" richiede valore"
  334.         echo\::* %THIS_file% %1
  335.         echo\::  -richiede parametro... .. .
  336.         for /f "tokens=*" %%A in ( 'findstr /r /x /c:"^[:][A-Z_0-9].*_sos$" "%THIS_file_full_path%"' ) do (
  337.             set "X=%%A"
  338.             set "X=!X::=!"
  339.             set "X=!X:_sos=!"
  340.             echo\::    !X!
  341.         )
  342.         call :FOOTER
  343.         exit /b %ERROR%
  344.     )
  345.     if not "!H_P2!"=="" (
  346.         set "ERROR_parametro_%SOS%=^"!H_P2!^" non valido^"
  347.         echo\::* %THIS_file% %1 !H_P2!
  348.         echo\::  PARAMETRO "!H_P2!" non valido
  349.         set N=
  350.         for /f "tokens=*" %%A in ( 'findstr /r /x /c:"^[:][A-Z_0-9].*_sos$" "%THIS_file_full_path%" ^| sort' ) do (
  351.             set /a N+=1
  352.             set "X=%%A"
  353.             set "X=!X::=!"
  354.             set "X=!X:_sos=!"
  355.             if !N! EQU 1 (
  356.                 echo\::  prova %1 !X!
  357.             ) else (
  358.                 echo\::        %1 !X!
  359.             )
  360.         )
  361.         set N=
  362.         call :FOOTER
  363.         exit /b %ERROR%
  364.     )
  365. )
  366.  
  367.  
  368. if not "%1"=="" (
  369.     set "ERROR_parametro=Parametro "%~1" non valido "
  370.     call :HEADER
  371.     call :SOS_all
  372.     call :FOOTER
  373.     exit /b %ERROR%
  374. )
  375.  
  376. ::::
  377. ::::
  378. ::::
  379. goto :EOF
  380. :START
  381.  
  382. REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  383. REM :::::::::::  modello per nuove funzioni  ::::::::::::::::::::::::::::::::
  384. REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  385. REM :::::::::::::: my_function ::::::::::::::::::::::::::::::::::::::::::::::
  386. REM :::::::::::::: my_function ::::::::::::::::::::::::::::::::::::::::::::::
  387. REM goto :function_end
  388. REM :function
  389. REM :FUNCTION_sos
  390. REM if not "%~0"==":FUNCTION_sos" goto :function_sos_end
  391.     REM echo\::* %THIS_file% %C__%%~1%C_0% .
  392.     REM echo\:: la funzione di sos deve iniziare con "^[:][A-Z0-9]*[_].*"
  393.     REM echo\::                    deve finire con ".*_sos$"
  394.     REM echo\:: scrivi qui sos per my_function
  395.     REM echo\::
  396.     REM echo\::
  397.     REM echo\::
  398.     REM echo\::
  399.     REM exit /b %ERROR%
  400. REM :function_sos_end
  401.  
  402.     REM echo scrivi qui lo script da eseguire
  403.     REM echo scrivi qui lo script da eseguire
  404.     REM echo scrivi qui lo script da eseguire
  405.  
  406.     REM if "%qualche errore per uscire%"=="qualche errore per uscire" (
  407.         REM set "ERROR_brevissima_descrizione=spiegazione estesa ma concisa"
  408.         REM echo\::
  409.         REM echo\::  ERRORE bla bla bla
  410.         REM echo\::
  411.         REM call :FOOTER
  412.         REM exit /b %ERROR%
  413.     REM )
  414.  
  415.     REM echo\::::::::::::::::::::::::::::::::::::::::
  416.     REM echo\::%MSG:§=!LF!::%
  417.     REM call :FOOTER
  418.     REM (
  419.     REM endlocal
  420.         REM set "my_VAR_00=%VALORE00_da restituire%"
  421.         REM set "my_VAR_01=%VALORE01_da restituire%"
  422.         REM exit /b %ERROR%
  423.     REM )
  424. REM :function_end
  425. REM :::::::::::::: function end ::::::::::::::::::::::::::::::::::::::::::
  426. REM :::::::::::::: function end ::::::::::::::::::::::::::::::::::::::::::
  427. REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  428. REM :::::::::::  fine modello per nuove funzioni  :::::::::::::::::::::::::::
  429. REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  430.  
  431. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  432. REM :::::::::::::: CK_ver ::::::::::::::::::::::::::::::::::::::::::::::
  433. REM :::::::::::::: CK_ver ::::::::::::::::::::::::::::::::::::::::::::::
  434. goto :CK_ver_end
  435. :CK_ver
  436. :CK_ver_sos
  437. if not "%~0"==":CK_ver_sos" goto :CK_ver_sos_end
  438.     echo\::* %THIS_file% %C__%%~1%C_0% .
  439.     echo\::
  440.     echo\:: controlla la versione attuale
  441.     echo\:: * %THIS_file_full_path% %INFO_ver_date%
  442.     echo\:: con la versione on line
  443.     echo\:: * "https://codeberg.org/marioq59/win_cmd/src/branch/main/usefulTools.cmd"
  444.     echo\::
  445.     echo\:: la funzione di sos deve iniziare con "^[:][A-Z0-9]*[_].*"
  446.     echo\::                    deve finire con ".*_sos$"
  447.     echo\:: scrivi qui sos per my_function
  448.     echo\::
  449.     echo\::
  450.     exit /b %ERROR%
  451. :CK_ver_sos_end
  452.  
  453. REM set "CAT_this=type C:\Users\PARETO-User\myScripts\usefultools.cmd"
  454. set "URL4curl=https://codeberg.org/marioq59/win_cmd/raw/branch/main/usefulTools.cmd"
  455. set "CAT_this=curl.exe -f -s -S -k -L -B -R --retry 1 -A "%THIS_file:~0,-4%-%THIS_file_pid%" %URL4curl%"
  456.  
  457.     set "PING_this_2=gnu.org"
  458.     set "PING_this_1=codeberg.org"
  459.     set "PING_this_1=127.0.0.1"
  460.  
  461.     if "%CAT_this:~0,4%"=="type" set "PING_this=127.0.0.1"
  462.     if "%CAT_this:~0,4%"=="curl" set "PING_this=%PING_this_1%"
  463.  
  464.     REM ping -a -n 1 %PING_this% | findstr /i /r /c:".*[[][0-9:].*" >nul
  465.     REM for /f "tokens=1,2 delims=^=" %%A in ( 'set PING_this_' ) do (
  466.         REM ping -a -n 1 %%B >nul
  467.         REM if !errorlevel! GTR 0 (
  468.             REM set "ERROR_geoip_no_internet=connessione a internet non disponibile"
  469.             REM set "NO_PING_this=%%B"
  470.         REM )
  471.         REM if !errorlevel! EQU 0 (
  472.             REM set "ERROR_geoip_no_internet="
  473.             REM set "NO_PING_this="
  474.         REM )
  475.         REM if defined ERROR_geoip_no_internet (
  476.             REM ping -a -n 1 %%B >nul
  477.             REM if !errorlevel! GTR 0 (
  478.                 REM set "ERROR_geoip_no_internet=connessione a internet non disponibile"
  479.                 REM set "NO_PING_this=%%B"
  480.             REM )
  481.         REM )
  482.     REM )
  483.     REM if defined NO_PING_this (
  484.         REM echo\::
  485.         REM echo\:: connessione a internet non disponibile
  486.         REM echo\:: [ping -a -n 1 %NO_PING_this%] senza risposta
  487.         REM echo\::
  488.         REM call :FOOTER
  489.         REM exit /b %ERROR%
  490.     REM )
  491.     REM ping -a -n 1 -f %PING_this% >nul
  492.     ping -a -n 1 -l 8 -f -w 128 %PING_this% >nul
  493.     if %errorlevel% GTR 0 (
  494.         set "ERROR_ck_ver_no_internet=connessione a internet non disponibile"
  495.         echo\::
  496.         echo\:: connessione internet a "%PING_this%" non disponibile
  497.         echo\:: [ping -a -n 2 -l 8 -f -w 128 %PING_this%] senza risposta
  498.         echo\::
  499.         call :FOOTER
  500.         exit /b %ERROR%
  501.     )
  502. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  503. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  504.  
  505. REM echo\:: %CAT_this%
  506. set "THIS_file.online=%temp%\%THIS_file%.online"
  507. REM set "THIS_file.online=C:\Users\sysop\AppData\Local\Temp\%THIS_file%.online"
  508. ( echo. >"%THIS_file.online%" 2>&1 ) 2>nul & REM a schermo non visualizza l'errore
  509. if not exist "%THIS_file.online%" (
  510.     set "ERROR_ck_ver_del=errore nel gestire "%THIS_file.online%""
  511.     echo\::
  512.     echo\:: non posso scrivere "%THIS_file.online%"
  513.     echo\:: File richiesto per %THIS_file_full_path% %1
  514.     echo\::
  515.     call :FOOTER
  516.     exit /b %ERROR%
  517. )
  518. %CAT_this% >%THIS_file.online% 2>&1
  519. REM %CAT_this% >nul 2>&1
  520. set CURL_error=%errorlevel%
  521. if "%CURL_error%" NEQ "0" (
  522.     echo\::
  523.     echo\:: %CAT_this%
  524.     echo\::
  525.     set "CAT_this=!CAT_this! 2^>^&1"
  526.     set N=0
  527.     set "N_txt="
  528.     for /f "tokens=* delims=" %%Z in ( '!CAT_this!' ) do (
  529.         REM echo\\\\Z==%%Z
  530.         set /a N+=1
  531.         set "N_txt=%%Z"
  532.         echo\:: exit error !CURL_error! "!N_txt!"
  533.     )
  534.     echo\::
  535.     if exist "%THIS_file.online%" del /q "%THIS_file.online%"
  536.     if not exist "%THIS_file.online%" set ERROR_ck_ver_del=errore nel gestire "%THIS_file.online%"
  537.     set "ERROR_CURL_ck=!CURL_error! !N_txt!"
  538.     call :FOOTER
  539.     exit /b %ERROR%
  540. )
  541. if "%CURL_error%" EQU "0" (
  542. set N=0
  543. set N_txt=
  544. set CK_ok=
  545. echo\::
  546. echo\:: %CAT_this%
  547. echo\::
  548.     for /f "tokens=* delims=" %%Q in ( '%CAT_this%' ) do (
  549.         set /a N+=1
  550.         set "N_txt=%%Q"
  551.         REM 20 caratteri "::##_start_CK_online"
  552.         if "!N_txt:~0,20!"=="::##_start_CK_online" ( REM "::##_start_CK_online" marcatore
  553.             set /a CK_ok+=1
  554.         )
  555.         if !CK_ok! EQU 1 (
  556.             set "VAR_dummy="
  557.             if not "!N_txt:~0,2!"=="::" (
  558.                 REM echo\#----------!N! !N_txt!
  559.                 set "VAR_dummy=!N_txt:set =!"
  560.                 set "VAR_dummy=!VAR_dummy:"=!"
  561.                 echo\"VAR_dummy=!VAR_dummy!"
  562.                 for /f "usebackq tokens=1,2 delims=^=" %%G in ( '!VAR_dummy!' ) do (
  563.                     echo\\#\#\#\#\ G=%%G H=%%H
  564.                     set "_%THIS_file:~0,-4%_date_online=%%H"
  565.                 )
  566.                 set "VAR_dummy="
  567.                 REM echo\#----------!N! !N_txt!
  568.                 set VAR_dummy=!N_txt: =!
  569.                 set VAR_dummy=!VAR_dummy:"=!
  570.                 set VAR_dummy=!VAR_dummy:set=!
  571.                 set VAR_dummy=!VAR_dummy:/=!
  572.                 set VAR_dummy=!VAR_dummy::=!
  573.                 REM echo\@----------!N! !N_txt!
  574.                 for /f "tokens=1,2 delims=^=" %%A in ( 'echo\!VAR_dummy!' ) do (
  575.                     set "_%THIS_file:~0,-4%_date_serial_online=%%B"
  576.                 )
  577.             )
  578.         )
  579.         REM 20 caratteri "::##::_end_CK_online"
  580.         if "!N_txt:~0,20!"=="::##::_end_CK_online" ( REM "::##::_end_CK_online" marcatore
  581.             set "CK_ok=0"
  582.         )
  583.     )
  584. )
  585.  
  586. echo\:: set _%THIS_file:~0,-4%_date_
  587. set _%THIS_file:~0,-4%_date_
  588. echo\:: set INFO_ver_date
  589. set INFO_ver_date
  590. for /f "tokens=1,2 delims=^=" %%R in ( 'set INFO_ver_date' ) do (
  591.     set "R=%%R"
  592.     set "S=%%S"
  593.     REM echo\ "R==!R!" "S==!S!"
  594.     if "!R!"=="INFO_ver_date" set "_%THIS_file:~0,-4%_date=!S!"
  595.     if "!R!"=="INFO_ver_date_serial" set "_%THIS_file:~0,-4%_date_serial=!S!"
  596. )
  597. REM set /a INFO_ver_date_serial-=10
  598. REM set /a _%THIS_file:~0,-4%_date_serial+=10
  599. set /a _%THIS_file:~0,-4%_date_serial-=10
  600. echo\\\\\\--------!_%THIS_file:~0,-4%_date_serial!
  601. echo\\\\\\--------!_%THIS_file:~0,-4%_date_serial_online!
  602. echo\############# set _%THIS_file:~0,-4%
  603. set _%THIS_file:~0,-4%
  604. if !_%THIS_file:~0,-4%_date_serial! EQU !_%THIS_file:~0,-4%_date_serial_online! (
  605.     echo\::
  606.     echo\::___________versioni uguali
  607.     echo\::
  608. )
  609. if !_%THIS_file:~0,-4%_date_serial! LSS !_%THIS_file:~0,-4%_date_serial_online! (
  610.     echo\::
  611.     echo\::___________la versione corrente %INFO_ver_date% è meno recente di quella on line !_%THIS_file:~0,-4%_date_online!
  612.     echo\::           !_%THIS_file:~0,-4%_date_serial! ninore di !_%THIS_file:~0,-4%_date_serial_online!
  613.     echo\:: Questo valore è il resto della divisione del numero per 2^32 (4,294,967,296).
  614.     echo\::
  615. )
  616. if !_%THIS_file:~0,-4%_date_serial! GTR !_%THIS_file:~0,-4%_date_serial_online! (
  617.     echo\::
  618.     echo\::___________la versione corrente %INFO_ver_date% è più aggiornata di quella on line !_%THIS_file:~0,-4%_date_online!
  619.     echo\::
  620. )
  621. echo\#############
  622.  
  623.  
  624.  
  625. echo\::
  626. echo\::
  627. echo\::%MSG:§=!LF!::%
  628. call :FOOTER
  629. REM exit /b %ERROR%
  630. for /f "tokens=1,2 delims=^=" %%a in ( 'set _%THIS_file:~0,-4%_' ) do (
  631.     if not defined Nn set /a Nn+=1
  632.     if !Nn! EQU 1 (
  633.         endlocal
  634.     )
  635.     set Nn=
  636.     set "my%%a=%%b"
  637. )
  638.  
  639. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  640. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  641. REM if "%qualche errore per uscire%"=="qualche errore per uscire" (
  642.     REM set "ERROR_brevissima_descrizione=spiegazione estesa ma concisa"
  643.     REM echo\::
  644.     REM echo\::  ERRORE bla bla bla
  645.     REM echo\::
  646.     REM call :FOOTER
  647.     REM exit /b %ERROR%
  648. REM )
  649.  
  650. REM echo\::::::::::::::::::::::::::::::::::::::::
  651. REM echo\::%MSG:§=!LF!::%
  652. REM call :FOOTER
  653. REM exit /b %ERROR%
  654. REM (
  655. REM endlocal
  656.     REM set "my_VAR_00=%VALORE00_da restituire%"
  657.     REM set "my_VAR_01=%VALORE01_da restituire%"
  658.     REM exit /b %ERROR%
  659. REM )
  660. :CK_ver_end
  661. :::::::::::::: CK_ver end ::::::::::::::::::::::::::::::::::::::::::
  662. :::::::::::::: CK_ver end ::::::::::::::::::::::::::::::::::::::::::
  663. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  664.  
  665.  
  666.  
  667. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  668. :::::::::::::: STRLEN ::::::::::::::::::::::::::::::::::::::::::::::
  669. :::::::::::::: STRLEN ::::::::::::::::::::::::::::::::::::::::::::::
  670. goto :STRlen_end
  671. :strlen
  672. :STRLEN_sos
  673. if not "%~0"==":STRLEN_sos" goto :STRLEN_sos_end
  674.     echo\::* %THIS_file% %C__%%~1%C_0% .
  675.     echo\::
  676.     echo\:: Conta la lunghezza di una stringa di caratteri passata come argomento
  677.     echo\:: ed imposta la variabile my_STR_length con il valore della lunghezza.
  678.     echo\::* La lunghezza massima della stringa che è possibile usare al prompt
  679.     echo\:: dei comandi è di 8191 caratteri.
  680.     REM echo\::*https://learn.microsoft.com/it-IT/troubleshoot/windows-client/shell-experience/command-line-string-limitation
  681.     echo\::* Caratteri speciali %C_RED%^)^("^!^>^|^<^&^^ %C_0% devono essere racchiusi tra %C_RED%"%C_0%^)^(^!^>^|^<^&^^%C_RED%"%C_0%
  682.     echo\:: Prima del conteggio sono trasformati in caratteri innocui.
  683.     echo\::   %C_RED%^)^(^!^>^|^<^&^^ %C_0%sono sostituiti con %C_RED%¿%C_0%, %C_RED%^" %C_0%é sostituita con %C_RED%%C_0% .
  684.     REM echo\:: I caratteri di reindirizzamento e di raggruppamento %C_RED%)(^>^|^<^& %C_0% devono essere racchiusi con ^"%C_RED%^>^|^<^&%C_0%^"
  685.     echo\:: Esempio:
  686.     echo\:: * %THIS_file% %~1 topolino pippo e pluto
  687.     echo\::        restituisce la variabile my_STR_length=22
  688.     echo\:: * %THIS_file% %~1 topolino pippo e pluto ">|<&"
  689.     echo\::        restituisce la variabile my_STR_length=29
  690.     echo\:: *^|%THIS_file% %~1 "topolino pippo e pluto "^>^|^<^&"
  691.     echo\::  ^|   non viene eseguita.
  692.     echo\::  ^|   Il secondo " chiude la stringa che non viene riaperta per >|<&"
  693.     echo\:: *^|%THIS_file% %~1 "topolino pippo e pluto "">|<&"
  694.     echo\::  ^|    così va bene, restituisce la variabile my_STR_length=31
  695.     echo\:: * %THIS_file% %~1 "topolino > pippo < & | pluto! >|<&"
  696.     echo\::        restituisce la variabile my_STR_length=35
  697.     exit /b %ERROR%
  698. :strlen_sos_end
  699. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  700. if defined STR_4_strlen (
  701.     if not "%STR_4_strlen:~50,60%"=="" (
  702.         set "STR_4_strlen_dummy=!STR_4_strlen:%STR_quote_L%%STR_quote%%STRLEN%=!"
  703.         set "ALL_0arg=%1 !STR_4_strlen_dummy:~0,35!... .. .  .continua"
  704.     ) else (
  705.         set "STR_4_strlen_dummy=!STR_4_strlen:%STR_quote_L%%STR_quote%%STRLEN%=!"
  706.         set "STR_4_strlen_dummy=!STR_4_strlen_dummy:%STR_quote%%STR_quote_R%=!"
  707.         set "ALL_0arg=%1 !STR_4_strlen_dummy!"
  708.     )
  709. )
  710.  
  711. set "my_STR_length="
  712. :::: rimuovo strlen all'inizio di %*
  713.     REM echo\:: 00 STR_4_strlen==^|%STR_4_strlen%^|
  714.     set "STR_4_strlen=!STR_4_strlen:%STR_quote_L%%STR_quote%%STRLEN%=%STR_quote_L%%STR_quote%!"
  715.     REM echo\:: 01 STR_4_strlen==^|%STR_4_strlen%^|
  716.  
  717.     set /a N_blank=0
  718.     REM  rimuovo gli spazi iniziali
  719.     :STR_4_strlen_loop
  720.     REM echo\:: loop %N_blank% STRLEN==^|%STRLEN%^|
  721.     if "%STR_4_strlen:~0,5%" == "%STR_quote_L%%STR_quote% " (
  722.         set "STR_4_strlen=!STR_4_strlen:%STR_quote_L%%STR_quote% =%STR_quote_L%%STR_quote%!"
  723.         set "STRLEN=!STRLEN! "
  724.         set /a N_blank+=1
  725.         goto :STR_4_strlen_loop
  726.     )
  727.     REM echo\:: 1 STR_4_strlen==^|!STR_4_strlen!^|
  728.  
  729.     set "STR_4_strlen=!STR_4_strlen:%STR_quote_L%%STR_quote%=!"
  730.     set "STR_4_strlen=!STR_4_strlen:%STR_quote%%STR_quote_R%=!"
  731.  
  732.     REM echo\:: 02 STR_4_strlen==^|%STR_4_strlen%^|
  733.  
  734.     if "%STR_4_strlen%" == "" (
  735.         set "ERROR_strlen_no_string=STRLEN senza stringa da contare"
  736.         echo\::
  737.         echo\::  PARAMETRO %%1 "%1" OK
  738.         echo\::  !ERROR_strlen_no_string!
  739.         echo\::  Fornisci una stringa per contarne la lunghezza
  740.         echo\::
  741.         call :FOOTER
  742.         exit /b %ERROR%
  743.     )
  744.  
  745.     if not "!STR_4_strlen:~50,60!"=="" (
  746.         echo\::
  747.         echo\:: caratteri speciali %C_RED%^)^("^!^>^|^<^&^^ %C_0%
  748.         echo\:: sono trattati in modo speciale; vedi
  749.         echo\:: ** %THIS_file% ? strlen
  750.         echo\::
  751.         echo\::                !STR_4_strlen:~0,35!... .. .  .continua
  752.     ) else (
  753.         echo\::
  754.         echo\:: caratteri speciali %C_RED%^)^("^!^>^|^<^&^^ %C_0%
  755.         echo\:: sono trattati im modo speciale; vedi
  756.         echo\:: ** %THIS_file% help strlen
  757.         echo\::
  758.         echo\::                !STR_4_strlen!
  759.     )
  760.  
  761.     call :STRLEN_count
  762.     echo\:: restituisce la variabile
  763.     echo\:: my_STR_length=%_STR_length%
  764.     echo\::
  765.  
  766.     :STRLEN_count
  767.     if not "%0"==":STRLEN_count" goto :STRLEN_count_end
  768.         set /a len=0
  769.         :STRLEN_count_loop
  770.             if not "!STR_4_strlen:~%len%!"=="" set /a len+=1 & goto :STRLEN_count_loop
  771.             set _STR_length=%len%
  772.     goto :EOF
  773.     :STRLEN_count_end
  774. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  775.     echo\::::::::::::::::::::::::::::::::::::::::
  776.     echo\::%MSG:§=!LF!::%
  777.     call :FOOTER
  778.     (
  779.         endlocal
  780.         set "my_STR_length=%_STR_length%"
  781.         exit /b %ERROR%
  782.     )
  783. :strlen_end
  784. :::::::::::::: STRLEN end ::::::::::::::::::::::::::::::::::::::::::
  785. :::::::::::::: STRLEN end ::::::::::::::::::::::::::::::::::::::::::
  786.  
  787.  
  788. :::::::::::::: NIC ::::::::::::::::::::::::::::::::::::::::::::::
  789. :::::::::::::: NIC ::::::::::::::::::::::::::::::::::::::::::::::
  790. goto :nic_end
  791. :NIC
  792. REM setlocal enabledelayedexpansion
  793. :NIC_sos
  794.     if not "%~0"==":NIC_sos" goto :NIC_sos_end
  795.         echo\::* %THIS_file% %C__%%~1%C_0% .
  796.         echo\::
  797.         echo\:: per ogni scheda di rete con IP restituisce
  798.         echo\:: alcuni utili valori
  799.     exit /b %ERROR%
  800. :NIC_sos_end
  801. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  802. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  803. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  804. :::: esempio di comando per info su Wi-Fi
  805. ::::   Netsh WLAN show interfaces
  806. :::: visualizza la passwd della commessione Wi-Fi
  807. ::::    netsh wlan show profile name="NOME-PROFILO" key=clear
  808. :::: esempio di risposta al comando:
  809. ::::   wmic nic where "netenabled=true" get /format:list
  810. ::::   da qui prendo il valore
  811. ::::   index, macaddress, netconnectionid, speed
  812. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  813. :::: AdapterType=Ethernet 802.3
  814. :::: AdapterTypeId=0
  815. :::: AutoSense=
  816. :::: Availability=3
  817. :::: Caption=[00000008] TP-Link Wireless USB Adapter
  818. :::: ConfigManagerErrorCode=0
  819. :::: ConfigManagerUserConfig=FALSE
  820. :::: CreationClassName=Win32_NetworkAdapter
  821. :::: Description=TP-Link Wireless USB Adapter
  822. :::: DeviceID=8
  823. :::: ErrorCleared=
  824. :::: ErrorDescription=
  825. :::: GUID={E8C2B227-0E77-4C38-B35F-46A3C86EBD52}
  826. :::: Index=8
  827. :::: InstallDate=
  828. :::: Installed=TRUE
  829. :::: InterfaceIndex=23
  830. :::: LastErrorCode=
  831. :::: MACAddress=D0:37:45:94:14:58
  832. :::: Manufacturer=Realtek Semiconductor Corp.
  833. :::: MaxNumberControlled=0
  834. :::: MaxSpeed=
  835. :::: Name=TP-Link Wireless USB Adapter
  836. :::: NetConnectionID=Wi-Fi
  837. :::: NetConnectionStatus=2
  838. :::: NetEnabled=TRUE
  839. :::: NetworkAddresses=
  840. :::: PermanentAddress=
  841. :::: PhysicalAdapter=TRUE
  842. :::: PNPDeviceID=USB\VID_2357&amp;PID_011F\00E04C000001
  843. :::: PowerManagementCapabilities=
  844. :::: PowerManagementSupported=FALSE
  845. :::: ProductName=TP-Link Wireless USB Adapter
  846. :::: ServiceName=RtlWlanu
  847. :::: Speed=120000000
  848. :::: Status=
  849. :::: StatusInfo=
  850. :::: SystemCreationClassName=Win32_ComputerSystem
  851. :::: SystemName=HP1864
  852. :::: TimeOfLastReset=20240516075523.500000+120
  853. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  854.     for /f "tokens=1,2 delims=^= " %%a in ('wmic nic where "netenabled=true" get /format:list 2^>nul') do (
  855.         set "Xa="
  856.         set "Xb="
  857.         set "Xa=%%a"
  858.         set "Xb=%%b"
  859.         if defined Xb (
  860.             if /i "%%a" == "index" (
  861.                 set  /a N_nic+=1
  862.                 set "_NIC_!N_nic!_%%a=%%b"
  863.             )
  864.             if /i "%%a" == "macaddress" (
  865.                 set "_NIC_!N_nic!_%%a=%%b"
  866.             )
  867.             if /i "%%a" == "netconnectionid" (
  868.                 REM Ethernet - Wi-Fi ....
  869.                 set "_NIC_!N_nic!_%%a=%%b"
  870.             )
  871.             if /i "%%a" == "speed" (
  872.                 set "_NIC_!N_nic!_%%a=%%b"
  873.             )
  874.         )
  875.     )
  876. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  877. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  878. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  879.     if not defined N_nic (
  880.         set "ERROR_no_nic=NO NIC-Network Interface Controller- con IP"
  881.         echo\::
  882.         echo\::  no nic -Network Interface Controller-
  883.         echo\::  nessuna scheda abilitata con IP
  884.         echo\::
  885.         call :FOOTER
  886.         exit /b %ERROR%
  887.     )
  888. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  889. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  890. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  891. :::: esempio di risposta al comando:
  892. ::::     wmic nicconfig where (index="!INDEX_N!" and macaddress="!MAC_N!") get %SEARC_NIC_PROPERTY% /format:list"
  893. :::: Visualizza tutte le proprietà
  894. ::::     wmic nicconfig where IPEnabled=TRUE get /format:list
  895. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  896. :::: ArpAlwaysSourceRoute=
  897. :::: ArpUseEtherSNAP=
  898. :::: Caption=[00000012] Realtek USB GbE Family Controller
  899. :::: DatabasePath=%SystemRoot%\System32\drivers\etc
  900. :::: DeadGWDetectEnabled=
  901. :::: DefaultIPGateway={"172.28.0.1"}
  902. :::: DefaultTOS=
  903. :::: DefaultTTL=
  904. :::: Description=Realtek USB GbE Family Controller
  905. :::: DHCPEnabled=TRUE
  906. :::: DHCPLeaseExpires=20240516112847.000000+120
  907. :::: DHCPLeaseObtained=20240516085207.000000+120
  908. :::: DHCPServer=172.28.0.1
  909. :::: DNSDomain=lanpareto
  910. :::: DNSDomainSuffixSearchOrder={"lanpareto"}
  911. :::: DNSEnabledForWINSResolution=FALSE
  912. :::: DNSHostName=hp1864
  913. :::: DNSServerSearchOrder={"172.28.0.1"}
  914. :::: DomainDNSRegistrationEnabled=FALSE
  915. :::: ForwardBufferMemory=
  916. :::: FullDNSRegistrationEnabled=TRUE
  917. :::: GatewayCostMetric={0}
  918. :::: IGMPLevel=
  919. :::: Index=12
  920. :::: InterfaceIndex=14
  921. :::: IPAddress={"172.28.5.214","fe80::7e5:2359:2836:5bcb"}
  922. :::: IPConnectionMetric=25
  923. :::: IPEnabled=TRUE
  924. :::: IPFilterSecurityEnabled=FALSE
  925. :::: IPPortSecurityEnabled=
  926. :::: IPSecPermitIPProtocols={}
  927. :::: IPSecPermitTCPPorts={}
  928. :::: IPSecPermitUDPPorts={}
  929. :::: IPSubnet={"255.255.0.0","64"}
  930. :::: IPUseZeroBroadcast=
  931. :::: IPXAddress=
  932. :::: IPXEnabled=
  933. :::: IPXFrameType=
  934. :::: IPXMediaType=
  935. :::: IPXNetworkNumber=
  936. :::: IPXVirtualNetNumber=
  937. :::: KeepAliveInterval=
  938. :::: KeepAliveTime=
  939. :::: MACAddress=00:E0:4C:68:B7:3D
  940. :::: MTU=
  941. :::: NumForwardPackets=
  942. :::: PMTUBHDetectEnabled=
  943. :::: PMTUDiscoveryEnabled=
  944. :::: ServiceName=rtux64w10
  945. :::: SettingID={9D499C5D-EA64-4740-BC3B-B82065415004}
  946. :::: TcpipNetbiosOptions=0
  947. :::: TcpMaxConnectRetransmissions=
  948. :::: TcpMaxDataRetransmissions=
  949. :::: TcpNumConnections=
  950. :::: TcpUseRFC1122UrgentPointer=
  951. :::: TcpWindowSize=
  952. :::: WINSEnableLMHostsLookup=TRUE
  953. :::: WINSHostLookupFile=
  954. :::: WINSPrimaryServer=172.28.0.1
  955. :::: WINSScopeID=
  956. :::: WINSSecondaryServer=
  957. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  958.     set "SEARC_NIC_PROPERTY=DefaultIPGateway^,Description"
  959.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,DHCPEnabled"
  960.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,DHCPServer"
  961.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,DNSDomain"
  962.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,DNSDomainSuffixSearchOrder"
  963.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,DNSHostName"
  964.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,DNSServerSearchOrder"
  965.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,IPAddress"
  966.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,IPConnectionMetric"
  967.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,IPSubnet"
  968.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,MACAddress"
  969.     REM Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces\{SettingID}
  970.     set "SEARC_NIC_PROPERTY=%SEARC_NIC_PROPERTY%^,SettingID"
  971.  
  972.     echo\:: Network-Interface-Controller
  973.     echo\:: %N_nic% NIC con ip assegnato
  974. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  975. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  976. :::: Visualizza tutte le proprietà
  977. ::::    wmic nicconfig where IPEnabled=TRUE get /format:list
  978. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  979.     for /L %%a in (1,1,%N_nic%) do (
  980.         set "INDEX_N="
  981.         set "MAC_N="
  982.         set "INDEX_N=!_NIC_%%a_index!"
  983.         set "MAC_N=!_NIC_%%a_macaddress!"
  984.         for /f "tokens=1,2 delims=^=" %%A in ('"wmic nicconfig where (index="!INDEX_N!" and macaddress="!MAC_N!") get %SEARC_NIC_PROPERTY% /format:list"') do (
  985.             set "Y_A="
  986.             set "Y_B="
  987.             set "Y_A=%%A"
  988.             set "Y_B=%%B"
  989.             if defined Y_B (
  990.                 set "Y_B=!Y_B:{=!"
  991.                 set "Y_B=!Y_B:}=!"
  992.                 set "Y_B=!Y_B:"=!"
  993.                 set "Y_B=!Y_B:,=-!"
  994.                 set "_NIC_%%a_!Y_A!=!Y_B!"
  995.             )
  996.         )
  997.         for /f "tokens=1,2 delims=^=" %%T in ('set _NIC_%%a') do (
  998.             set "T=%%T"
  999.             set "T=!T:_NIC_%%a_=!"
  1000.             REM if /i not  "!T!" == "index" (
  1001.                 call :NIC_all_property %%a "!T!=%%U"
  1002.                 REM set "_NIC_%%a_index="
  1003.             REM )
  1004.         )
  1005.     )
  1006. :NIC_all_property
  1007.     if not "%0" == ":NIC_all_property" goto :NIC_all_property_end
  1008.         set "X2=%~2"
  1009.         set "_NIC_%1_all_property="!X2!" !_NIC_%1_all_property!"
  1010.     goto :EOF
  1011. :NIC_all_property_end
  1012. ::::::::::::::::::::::::::::::::::::::::
  1013. ::::::::::::::::::::::::::::::::::::::::
  1014.  
  1015. ::::::::::::::::::::::::::::::::::::::::
  1016. ::::::::::::::::::::::::::::::::::::::::
  1017.     echo\::::::::::::::::::::::::::::::::::::::::
  1018.     echo\::  my_NIC_N=%N_nic%
  1019.     for /f "tokens=*" %%L in ('set _NIC_') do (
  1020.         echo\%%L | findstr /r /c:"_NIC_[0-9]*_all_property" >nul
  1021.         if !errorlevel! EQU 0 (
  1022.             set "DUMMY_nic_prop=%%L"
  1023.             set "DUMMY_nic_prop=!DUMMY_nic_prop:"='!
  1024.             call :NIC_all_prop_split "!DUMMY_nic_prop!"
  1025.         ) else (
  1026.             echo\::  my%%L
  1027.         )
  1028.     )
  1029. :NIC_all_prop_split
  1030.     if not "%0" == ":NIC_all_prop_split" goto :NIC_all_prop_split_end
  1031.         set "K="
  1032.         set "K=%~1"
  1033.         set "K=!K:' '=§!"
  1034.         set "K=!K:'="!"
  1035.         echo\::my%K:§=!LF!::           %
  1036.     goto :EOF
  1037. :NIC_all_prop_split_end
  1038. ::::::::::::::::::::::::::::::::::::::::
  1039. ::::::::::::::::::::::::::::::::::::::::
  1040.  
  1041.  
  1042.     echo\::::::::::::::::::::::::::::::::::::::::
  1043.     echo\:: %N_nic% NIC con ip asegnato
  1044.     echo\::::::::::::::::::::::::::::::::::::::::
  1045.     echo\::%MSG:§=!LF!::%
  1046.     call :FOOTER
  1047.     set "N="
  1048.     for /f "tokens=*" %%G in ('set _NIC_') do (
  1049.         REM echo\@@@@@@@ G==%%G
  1050.         set /a N+=1
  1051.         REM echo N==!N!
  1052.         REM if "!N!" EQU "1" endlocal & endlocal
  1053.         if "!N!" EQU "1" endlocal & set "my_NIC_N=%N_nic%"
  1054.         REM echo\@1@1@1@ G==%%G
  1055.         set "my%%G"
  1056.     )
  1057.     set "N="
  1058.     exit /b 0
  1059. :nic_end
  1060. :::::::::::::: NIC end ::::::::::::::::::::::::::::::::::::::::::
  1061. :::::::::::::: NIC end ::::::::::::::::::::::::::::::::::::::::::
  1062. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1063.  
  1064.  
  1065. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1066. :::::::::::::: run_as_admin ::::::::::::::::::::::::::::::::::::::::::::::
  1067. :::::::::::::: run_as_admin ::::::::::::::::::::::::::::::::::::::::::::::
  1068. goto :run_as_admin_end
  1069. :run_as_admin
  1070. :RUN_AS_ADMIN_sos
  1071. if not "%~0"==":RUN_AS_ADMIN_sos" goto :run_as_admin_sos_end
  1072.     echo\::* %THIS_file% %C__%%~1%C_0% . & REM %2 .
  1073.     echo\::
  1074.     echo\::  %%2="path al file da eseguire come Administrators"
  1075.     echo\::  %%3="eventuali parametri da passare"
  1076.     echo\::  Spazi vuoti devono essere racchiusi tra " "
  1077.     echo\::  Esempio:
  1078.     echo\:: %THIS_file% %1 %%comspec%%
  1079.     echo\::   esegue %C__%%comspec%%C_0% con permessi elevati
  1080.     echo\:: %THIS_file% %1 "c:\my dir\my file.exe" "parametro_1 parametro_2"
  1081.     echo\::   esegue %C__%"c:\my dir\my file.exe" parametro_1 parametro_2%C_0% con permessi elevati
  1082.         if "%2"=="NO_CMDOW_exe" (
  1083.         echo\::---------------------
  1084.         echo\:: %C__%%~1%C_0% funziona con %C__%cmdow.exe%C_0% . ^(funziona anche con powershell^)
  1085.         echo\::  CMDOW [Version 1.4.8] Win32 Commandline Window Utility for NT4/2000/XP/7.
  1086.         echo\::  ^(C^) Copyright 2001-2014 Ritchie Lawrence, http://www.commandline.co.uk.
  1087.         echo\::  https://github.com/ritchielawrence/cmdow/
  1088.         echo\::  https://ritchielawrence.github.io/cmdow/
  1089.         echo\:: Download: https://github.com/ritchielawrence/cmdow/blob/master/bin/Release/cmdow.exe
  1090.         echo\::
  1091.         echo\:: Molti anrivirus individuano cmdow.exe come virus perchè legge ed elabora
  1092.         echo\::  informazioni che %C__%$%C_0%windows%C__%$%C_0% non accetta. Non è vero.
  1093.         echo\::-OPEN-SOURCE "MIT license" garantisce ciò che cmdow.exe elabora.
  1094.         echo\:: Istruisci il tuo antivirus a considerare cmdow.exe un programma sano.
  1095.         echo\::  https://github.com/ritchielawrence/cmdow?tab=readme-ov-file#is-cmdow-malware
  1096.         echo\::::::::::::::::::::::::::::::::::::::::
  1097.     )
  1098.     exit /b %ERROR%
  1099. :run_as_admin_sos_end
  1100.  
  1101. :: https://ss64.com/vb/syntax-elevate.html
  1102.  
  1103. if "%~2"§==""§ (
  1104.     set "ERROR_run_as_admin_P2=Parametro 2 nul"
  1105.     echo\::
  1106.     echo\:: "%~1" Richiesto un percorso completo ad un file
  1107.     echo\::  da eseguire in una consolle con privilegi elevati.
  1108.     echo\::  Se contiene spazi racchiudere tra " "
  1109.     echo\::
  1110.     call :FOOTER
  1111.     exit /b %ERROR%
  1112. )
  1113.  
  1114. if exist "%~f2" (
  1115.     if "%~x2"§==""§ (
  1116.         set "ERROR_run_as_admin_P2=Parametro 2.NO_estensione"
  1117.         echo\::
  1118.         echo\:: Richiesto un percorso completo ad un file compreso l'estensione
  1119.         echo\:: "%~2".NO_estensione??
  1120.         echo\::  se contiene spazi racchiudere tra " "
  1121.         echo\::
  1122.         call :FOOTER
  1123.         exit /b %ERROR%
  1124.     )
  1125.  
  1126.     echo\%~f2| findstr /r /c:".*[ ].*" >nul 2>&1
  1127.         if !errorlevel! EQU 0 (
  1128.             set "_EXE_this=%~sdpnx2"
  1129.         ) else (
  1130.             set "_EXE_this=%~f2"
  1131.         )
  1132. )
  1133.  
  1134. if not defined _EXE_this (
  1135.     set "ERROR_run_as_admin_P2=Parametro 2 "%~2" "
  1136.     echo\::
  1137.     echo\:: "%1" Richiesto un percorso completo ad un file
  1138.     echo\::  da eseguire con permessi elevati "gruppo Administrators"
  1139.     echo\::  Se contiene spazi racchiudere tra " "
  1140.     echo\::
  1141.     call :FOOTER
  1142.     exit /b %ERROR%
  1143. )
  1144.  
  1145. set "_EXE3="
  1146. set "Xn="
  1147.  
  1148. shift /1
  1149. :loop_p3
  1150. shift /1
  1151. set "Xn=%~1"
  1152. if defined Xn (
  1153.     if exist "%Xn%" (
  1154.         echo\%Xn%| findstr /r /c:".*[ ].*" >nul 2>&1
  1155.         REM se trovo spazi vuoti trasformo in nome breve
  1156.         if !errorlevel! EQU 0 (
  1157.             set "_EXE3=!_EXE3! %~sdpnx1 "
  1158.         ) else (
  1159.             set "_EXE3=!_EXE3! %~1 "
  1160.         )
  1161.     ) else (
  1162.         set _EXE3=!_EXE3! %~1
  1163.     )
  1164.     REM echo\@@!_EXE3!
  1165.     set "Xn="
  1166.     goto :loop_p3
  1167. )
  1168.  
  1169. REM https://ss64.com/vb/shellexecute.html
  1170.      REM OK .ShellExecute "application", "parameters", "dir", "verb", window
  1171.      REM NO .ShellExecute 'some program.exe', '"some parameters with spaces"', , "runas", 1
  1172. set "RUN_AS_ADMIN_time=%time: =0%"
  1173. set "RUN_AS_ADMIN_time=%RUN_AS_ADMIN_time::=%"
  1174. set "RUN_AS_ADMIN_time=%RUN_AS_ADMIN_time:.=%"
  1175. set "RUN_AS_ADMIN_time=%RUN_AS_ADMIN_time:,=%"
  1176. REM https://ss64.com/nt/syntax-random.html
  1177. REM set /a RUN_AS_ADMIN_random=(%random%*1000/32768+1000)
  1178. set /a "RUN_AS_ADMIN_random=(%random%*100/32768+100)"
  1179. set "RUN_AS_ADMIN_win_title=%THIS_file_pid%-%RUN_AS_ADMIN_time%-%RUN_AS_ADMIN_random%"
  1180.  
  1181. set "_CMD=%comspec%"
  1182. set "_EXE_FULL=%_EXE_this% %_EXE3%"
  1183. set "_VBS=%temp%\dummy.vbs"
  1184. set "_OUT_cmd=%temp%\dummy.cmd"
  1185. if exist "%_VBS%" del /q /f "%_VBS%"
  1186. if exist "%_OUT_cmd%" del /q /f "%_OUT_cmd%"
  1187.  
  1188. ::::::::::::::
  1189. :::::: file per dare risposta nella consolle elevata
  1190. ::::::::::::::
  1191. echo\@echo off ^& setlocal                                               > %_OUT_cmd%
  1192. echo\title %RUN_AS_ADMIN_win_title% "%username%" chiama "%%username%%"  >> %_OUT_cmd%
  1193. echo\if "%%1"=="start" ^(                                               >> %_OUT_cmd%
  1194. echo\   set "dummy_time_start=start %%date%% %%time: =0%%"              >> %_OUT_cmd%
  1195. echo\   set "dummy_act=esegue"                                          >> %_OUT_cmd%
  1196. echo\   set "dummy_call=chiama"                                         >> %_OUT_cmd%
  1197. echo\^)                                                                 >> %_OUT_cmd%
  1198. echo\if "%%1"=="end" ^(                                                 >> %_OUT_cmd%
  1199. echo\   set "dummy_time_end=end   %%date%% %%time: =0%%"                >> %_OUT_cmd%
  1200. echo\   set "dummy_act=ha eseguito"                                     >> %_OUT_cmd%
  1201. echo\   set "dummy_call=ha chiamato"                                    >> %_OUT_cmd%
  1202. echo\^)                                                                 >> %_OUT_cmd%
  1203. echo\if "%%1"=="end" ^(                                                 >> %_OUT_cmd%
  1204. echo\   echo\::--- %%dummy_time_end%% --------                          >> %_OUT_cmd%
  1205. echo\^)                                                                 >> %_OUT_cmd%
  1206. echo\if "%%1"=="start" echo\:::::::::::::::::                           >> %_OUT_cmd%
  1207. echo\echo\:: "%username%" %%dummy_call%% "%%username%%"                 >> %_OUT_cmd%
  1208. echo\echo\::  utente "%%username%%" consolle con permessi elevati       >> %_OUT_cmd%
  1209. echo\echo\:: "%%username%%" %%dummy_act%%:                              >> %_OUT_cmd%
  1210. echo\echo\::   %_EXE_this%                                              >> %_OUT_cmd%
  1211. if defined _EXE3 echo\echo\::    %_EXE3%                                >> %_OUT_cmd%
  1212. echo\if "%%1"=="start" ^(                                               >> %_OUT_cmd%
  1213. echo\   echo\::--- %%dummy_time_start%% --------                        >> %_OUT_cmd%
  1214. echo\   echo\:: %_EXE_this%                                             >> %_OUT_cmd%
  1215. if defined _EXE3 echoecho\::  %_EXE3%                                >> %_OUT_cmd%
  1216. echo\^)                                                                 >> %_OUT_cmd%
  1217. echo\if "%%1"=="end" echo\:::::::::::::::::                             >> %_OUT_cmd%
  1218. echo\if defined dummy_time_end set "dummy_time_start="                  >> %_OUT_cmd%
  1219. echo\endlocal ^& set "dummy_time_start=%%dummy_time_start%%"            >> %_OUT_cmd%
  1220. ::::::::::::::
  1221. :::::: fine file per dare risposta nella consolle elevata
  1222. ::::::::::::::
  1223.  
  1224. echo Set UAC = CreateObject^("Shell.Application"^) > "%_VBS%"
  1225. echo UAC.ShellExecute "%_CMD%"," /K title %RUN_AS_ADMIN_win_title% & cd /d %cd% & call %_OUT_cmd% start & %_EXE_FULL% & call %_OUT_cmd% end & set dummy_time_start=", "%cd%", "runas", 1 >> "%_VBS%"
  1226. cscript //nologo %_VBS%
  1227. if defined CMDOW_exe (
  1228.     REM echo\%CMDOW_exe% /p /f ^| findstr /r /c:".*%RUN_AS_ADMIN_win_title%" ^>nul 2^>^&1
  1229.     %CMDOW_exe% /p /f | findstr /r /c:".*%RUN_AS_ADMIN_win_title%" >nul 2>&1
  1230.     set ERROR_consolle=!errorlevel!
  1231. ) else (
  1232.     powershell "Get-Process | Where-Object {$_.mainWindowTitle} | Format-Table Id, Name, mainWindowtitle" ^
  1233.     | findstr /r /c:".*%RUN_AS_ADMIN_win_title%.*" >nul 2>&1
  1234.     set ERROR_consolle=!errorlevel!
  1235. )
  1236. REM echo\++++ ERROR_consolle==%ERROR_consolle%
  1237. if %ERROR_consolle% EQU 0 (
  1238.     set ERROR_consolle=
  1239.     echo\::
  1240.     echo\:: "%username%" chiede una consolle con permessi elevati
  1241.     echo\::  per eseguire %_EXE_this%
  1242.     if defined _EXE3 echo\::               %_EXE3%
  1243.     echo\::  CONSOLLE "%RUN_AS_ADMIN_win_title%" APERTA
  1244.     echo\::
  1245.     call :FOOTER
  1246.  
  1247. ) else (
  1248.     set "ERROR_run_as_admin_NO=UAC richiesta non valida"
  1249.     echo\::
  1250.     echo\:: CONSOLLE RIFIUTATA
  1251.     echo\:: "%username%" !ERROR_run_as_admin_NO!
  1252.     echo\::  comando UAC %_EXE_this%
  1253.     if defined _EXE3 echo\::   parametri: %_EXE3% .
  1254.     echo\::
  1255.     echo\:: autenticazione??? ERRORE bla bla bla
  1256.     echo\::
  1257.     call :FOOTER
  1258.     exit /b %ERROR%
  1259. )
  1260. :run_as_admin_end
  1261. :::::::::::::: function end ::::::::::::::::::::::::::::::::::::::::::
  1262. :::::::::::::: function end ::::::::::::::::::::::::::::::::::::::::::
  1263. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1264.  
  1265.  
  1266. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1267. :::::::::::::: user_is_admin ::::::::::::::::::::::::::::::::::::::::::::::
  1268. :::::::::::::: user_is_admin ::::::::::::::::::::::::::::::::::::::::::::::
  1269. :::: REM >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  1270. :::: REM if '%errorlevel%' NEQ '0' (
  1271. :::: REM goto UACPrompt
  1272. :::: REM ) else ( goto gotAdmin )
  1273. :::: REM :UACPrompt
  1274. :::: REM echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  1275. :::: REM echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
  1276. :::: REM "%temp%\getadmin.vbs"
  1277. :::: REM exit /B
  1278. :::: REM :gotAdmin
  1279.  
  1280. goto :user_is_admin_end
  1281. :user_is_admin
  1282. :USER_IS_ADMIN_sos
  1283. if not "%~0"==":USER_IS_ADMIN_sos" goto :user_is_admin_sos_end
  1284.     echo\::* %THIS_file% %C__%%~1%C_0% .
  1285.     echo\::
  1286.     echo\::  Controlla su questo computer "%computername%"
  1287.     echo\::  se l'utente locale "%username%" che esegue questo script
  1288.     echo\::  fa parte del gruppo locale "Users" oppure "Administrators"
  1289.     echo\::
  1290.     echo\::  Restituisce la var "my_USER_IS" valorizzata
  1291.     echo\::  con il gruppo di appartenenza
  1292.     exit /b %ERROR%
  1293. :user_is_admin_sos_end
  1294.  
  1295.     REM net session /list >nul 2>&1
  1296.     >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  1297.     set "is_admin=%errorlevel%"
  1298.     set "my_USER_IS="
  1299.     if %is_admin% EQU 0 (
  1300.         for /f "delims=* tokens=1,2*" %%A in ('net user %username% ^| findstr /i /r /x /c:"^.*[*]Administrators.*"')  do (
  1301.             if !errorlevel! EQU 0 (
  1302.                 set "my_USER_IS=%%B"
  1303.             )
  1304.         )
  1305.     )
  1306.     if %is_admin% GEQ 1 (
  1307.         for /f "delims=* tokens=1,2*" %%A in ('net user %username% ^| findstr /i /r /x /c:"^.*[*]Users.*"')  do (
  1308.             if !errorlevel! EQU 0 (
  1309.                 set "my_USER_IS=%%B"
  1310.             )
  1311.         )
  1312.     )
  1313.     if not defined my_USER_IS (
  1314.         set ERROR_USER_IS=%username% non é nel gruppo "*Users", non é nel gruppo "*Administrators"
  1315.         echo\::
  1316.         echo\::  %username% non é nel gruppo "*Users", non é nel gruppo "*Administrators"
  1317.         echo\::
  1318.         call :FOOTER
  1319.         exit /b %ERROR%
  1320.     )
  1321.  
  1322.     echo\:: utente locale "%username%" di questo host "%computername%"
  1323.     echo\:: gruppo locale "%my_USER_IS: =%"
  1324.     echo\:: valore restituito
  1325.     echo\::   %%my_USER_IS%%==%my_USER_IS: =%
  1326.     echo\::::::::::::::::::::::::::::::::::::::::
  1327.     echo\::%MSG:§=!LF!::%
  1328.     call :FOOTER
  1329.     (
  1330.         REM endlocal & endlocal
  1331.         endlocal
  1332.         set my_USER_IS=%my_USER_IS: =%
  1333.     )
  1334.  
  1335. :user_is_admin_end
  1336. :::::::::::::: user_is_admin end ::::::::::::::::::::::::::::::::::::::::::
  1337. :::::::::::::: user_is_admin end ::::::::::::::::::::::::::::::::::::::::::
  1338. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1339.  
  1340.  
  1341.  
  1342. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1343. :::::::::::::: my_geoip start :::::::::::::::::::::::::::::::::::::::::::
  1344. :::::::::::::: my_geoip start :::::::::::::::::::::::::::::::::::::::::::
  1345. goto :geoip_end
  1346. :geoip
  1347. REM setlocal enabledelayedexpansion
  1348. :GEOIP_sos
  1349. if not "%~0"==":GEOIP_sos" goto :geoip_sos_end
  1350.     echo\::* %THIS_file% %C__%%~1%C_0% .
  1351.     echo\::
  1352.     echo\::  Utilizza "curl.exe" per interrogare il servizio
  1353.     echo\::  web "http://ip-api.com/json/?fields=66846719"
  1354.     echo\:: -Se come parametro si aggiunge un indirizzo "IP"
  1355.     echo\::  oppure un nome a "DNS" vengono restituiti i valori
  1356.     echo\::  per il l'indirizzo.
  1357.     echo\:: -Se non è specificato un'indirizzo i valori restituiti
  1358.     echo\::  si riferiscono alla connessione internet in uso.
  1359.     echo\:: -Esempio:
  1360.     echo\::* %THIS_file% %1
  1361.     echo\::   restituisce i valori per la connessione internet in uso.
  1362.     echo\::* %THIS_file% %1 8.8.8.8
  1363.     echo\::   restituisce i valori per l'indirizzo IP "8.8.8.8"
  1364.     echo\::   il DNS pubblico di google
  1365.     echo\::* %THIS_file% %1 208.67.222.222
  1366.     echo\::   restituisce i valori per l'indirizzo IP "208.67.222.222"
  1367.     echo\::   il DNS pubblico di Cisco
  1368.     exit /b %ERROR%
  1369. :geoip_sos_end
  1370.  
  1371.     if exist "%~dp0curl.exe" (
  1372.         echo\:: "%~dp0curl.exe"
  1373.         set "CURL_exe=%~dp0curl.exe"
  1374.     )
  1375.     if not defined CURL_exe (
  1376.         if exist "%windir%\system32\curl.exe" (
  1377.             REM echo\:: "%windir%\system32\curl.exe"
  1378.             REM :::: "%windir%\system32" è un percorso in %path%
  1379.             set "CURL_exe=curl.exe"
  1380.         )
  1381.     )
  1382.     if not defined CURL_exe (
  1383.         set "ERROR_geoip=MANCA "curl.exe""
  1384.         echo\::
  1385.         echo\:: manca curl.exe
  1386.         echo\::
  1387.         call :FOOTER
  1388.         exit /b %ERROR%
  1389.     )
  1390.     REM trova %computername% ip4
  1391.     REM set "FIND_ip4=[0-9]*[.][0-9]*[.][0-9]*[.][0-9]*"
  1392.     REM ping -a -n 1 -4 %computername% | findstr /i /r /c:".*%computername%.*[%FIND_ip4%]" & echo error==%errorlevel%
  1393.  
  1394.     REM trova localhost [::1*
  1395.     REM ping -a -n 1 -6 %computername% | findstr /i /r /c:".*%computername%[ *[:1]*" & echo %errorlevel%
  1396.  
  1397.     REM ping -a -n 1 -6 %computername% | findstr /i /r /c:".*%computername%[ *[fe80:]*" & echo %errorlevel%
  1398.     REM trova connetività su internet
  1399.     REM ping -a -n 1 gnu.org | findstr /i /r /c:".*[[][0-9:].*" & echo %errorlevel%
  1400.  
  1401.     set "PING_this_2=gnu.org"
  1402.     set "PING_this_1=ip-api.com"
  1403.     set "PING_this=%PING_this_1%"
  1404.     REM ping -a -n 1 %PING_this% | findstr /i /r /c:".*[[][0-9:].*" >nul
  1405.     REM for /f "tokens=1,2 delims=^=" %%A in ( 'set PING_this_' ) do (
  1406.         REM ping -a -n 1 %%B >nul
  1407.         REM if !errorlevel! GTR 0 (
  1408.             REM set "ERROR_geoip_no_internet=connessione a internet non disponibile"
  1409.             REM set "NO_PING_this=%%B"
  1410.         REM )
  1411.         REM if !errorlevel! EQU 0 (
  1412.             REM set "ERROR_geoip_no_internet="
  1413.             REM set "NO_PING_this="
  1414.         REM )
  1415.         REM if defined ERROR_geoip_no_internet (
  1416.             REM ping -a -n 1 %%B >nul
  1417.             REM if !errorlevel! GTR 0 (
  1418.                 REM set "ERROR_geoip_no_internet=connessione a internet non disponibile"
  1419.                 REM set "NO_PING_this=%%B"
  1420.             REM )
  1421.         REM )
  1422.     REM )
  1423.     REM if defined NO_PING_this (
  1424.         REM echo\::
  1425.         REM echo\:: connessione a internet non disponibile
  1426.         REM echo\:: [ping -a -n 1 %NO_PING_this%] senza risposta
  1427.         REM echo\::
  1428.         REM call :FOOTER
  1429.         REM exit /b %ERROR%
  1430.     REM )
  1431.     ping -a -n 1 -f %PING_this% >nul
  1432.     if %errorlevel% GTR 0 (
  1433.         set "ERROR_geoip_no_internet=connessione a internet non disponibile"
  1434.         echo\::
  1435.         echo\:: connessione a internet non disponibile
  1436.         echo\:: [ping -a -n 1 -l 8 -f -w 128 %PING_this%] senza risposta
  1437.         echo\::
  1438.         call :FOOTER
  1439.         exit /b %ERROR%
  1440.     )
  1441.  
  1442.     :::: REM https://ip-api.com/docs/api:json
  1443.     :::: set "FIELDS=status,message,"
  1444.     :::: set "FIELDS=%FIELDS%continent,continentCode,country,countryCode,region,"
  1445.     :::: set "FIELDS=%FIELDS%regionName,city,district,zip,lat,lon,timezone,offset,currency,"
  1446.     :::: set "FIELDS=%FIELDS%isp,org,as,asname,reverse,mobile,proxy,hosting,query"
  1447.     set "FIELDS=66846719"
  1448.  
  1449.     set "ADDRESS=%~2"
  1450.     set "GEO_IP_API=http://ip-api.com/json/%ADDRESS%?fields=%FIELDS%"
  1451.     REM set "CURL_exe=%CURL_exe% -v -s -S -k -L --retry 1 -A "%THIS_file:~0,-4%""
  1452.     set "CURL_exe=%CURL_exe% -s -S -k -L --retry 1 -A "%THIS_file:~0,-4% %THIS_file_pid%""
  1453.     echo\:: %CURL_EXE% %GEO_IP_API%
  1454.     ::::::::::::
  1455.     for /f "tokens=*" %%A in ( '"%CURL_exe% %GEO_IP_API%"' ) do (
  1456.         REM if !errorlevel! GTR 0 (
  1457.             REM set "ERROR_geoip_curl=errore curl"
  1458.             REM echo\::
  1459.             REM echo\:: errore curl
  1460.             REM echo\::
  1461.             REM call :FOOTER
  1462.             REM exit /b %ERROR%
  1463.         REM )
  1464.         set "A_x=%%A"
  1465.         set A_start=!A_x:~0,1!
  1466.         set A_end=!A_x:~-1!
  1467.         set CK_A=!A_start!!A_end!
  1468.         if not "!CK_A!"=="{}" ( REM json restituito da curl sta su una sola riga
  1469.             set/a CK_A_line+=1
  1470.             if !CK_A_line! EQU 1 (
  1471.                 set "CK_A_line_1=!A_x!"
  1472.                 set "A_start_1=!A_x:~0,1!"
  1473.             )
  1474.             set "A_end=!A_x:~-1!"
  1475.         )
  1476.  
  1477.         if "!CK_A!"=="{}" (
  1478.             echo\:: valori restituiti:... .. .
  1479.             set "geo_ip=%%~A"
  1480.             set "geo_ip=!geo_ip:{=!"
  1481.             set "geo_ip=!geo_ip:}=!"
  1482.             set "geo_ip=!geo_ip:":==!"
  1483.             set "geo_ip=!geo_ip:"=!"
  1484.             set "geo_ip=!geo_ip:, =##!"
  1485.         )
  1486.     )
  1487.  
  1488.     if defined CK_A_line (
  1489.         set ERROR_geoip_json=valore json restituito non valido
  1490.         echo\::  !ERROR_geoip_json!,   atteso {... ..  .   .}
  1491.         echo\::  !ERROR_geoip_json!, ricevuto !A_start_1!... ..  .   .!A_end!
  1492.         if not !CK_A_line_1! EQU !CK_A_line! (
  1493.         echo\:: *!CK_A_line! righe... .. .   .    .     .
  1494.             echo\:: * 1 !CK_A_line_1!
  1495.             echo\:: *!CK_A_line! !A_x!
  1496.         ) else (
  1497.             echo\:: * 1 !CK_A_line_1!
  1498.         )
  1499.         call :FOOTER
  1500.         exit /b %ERROR%
  1501.     )
  1502.  
  1503.     REM echo\ ---- GEO_IP ----
  1504.     REM echo\%geo_ip:,=!lf!%
  1505.     for /f "tokens=1,2 delims=^=" %%a in ( "%geo_ip:,=!LF!%" ) do (
  1506.         set "A=%%a"
  1507.         set "B=%%b"
  1508.         if defined TR_exe (
  1509.             for /f "tokens=*" %%Z in ( 'echo\!A!^|"%TR_exe%" [:lower:] [:upper:]') do (
  1510.                 set "A=%%Z"
  1511.             )
  1512.         )
  1513.         if /i "!A!"=="status" (
  1514.             if "!B!"=="fail" (
  1515.                 set "ERROR_geoip_status=ip-api.com errore !B!"
  1516.             )
  1517.         )
  1518.         if defined ERROR_geoip_status (
  1519.             if "!B!" NEQ "fail" set "ERROR_geoip_!A!=ip-api.com errore !B!"
  1520.         )
  1521.         if not defined ERROR_geoip_status (
  1522.             REM if not defined B set "B="""
  1523.             if not defined B set "B=_NUL_"
  1524.             set "_!A!=!B:##=, !"
  1525.         )
  1526.     )
  1527.     set "A="
  1528.     set "B="
  1529.  
  1530.     if defined ERROR_geoip_status (
  1531.         call :FOOTER
  1532.         exit /b %ERROR%
  1533.     )
  1534.  
  1535.     if not defined ADDRESS set "ADDRESS=local_%_query%"
  1536.     echo\::::::::::::::::::::::::::::::::::::::::
  1537.     for /f "tokens=*" %%z in ( 'set _' ) do echo\:: my_%ADDRESS%%%z
  1538.     echo\::::::::::::::::::::::::::::::::::::::::
  1539.     echo\::%MSG:§=!LF!::%
  1540.     call :FOOTER
  1541.     set "N="
  1542.     for /f "tokens=1,2 delims=^=" %%G in ('set _') do (
  1543.         set /a N+=1
  1544.         if !N! EQU 1 (
  1545.             endlocal
  1546.         )
  1547.         set "my_%ADDRESS%%%G=%%H"
  1548.     )
  1549.     set "N="
  1550.  
  1551. :geoip_end
  1552. :::::::::::::: my_geoip end ::::::::::::::::::::::::::::::::::::::::::
  1553. :::::::::::::: my_geoip end ::::::::::::::::::::::::::::::::::::::::::
  1554. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1555.  
  1556. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1557. :::::::::::::: my_date ::::::::::::::::::::::::::::::::::::::::::::::::::
  1558. :::::::::::::: my_date ::::::::::::::::::::::::::::::::::::::::::::::::::
  1559. goto :my_date_end
  1560. :my_date
  1561. :MY_DATE_sos
  1562. if not "%~0"==":MY_DATE_sos" goto :my_date_sos_end
  1563.     echo\::* %THIS_file% %C__%%~1%C_0% .
  1564.     echo\::
  1565.     echo\:: restituisce una serie di variabili "my_....."
  1566.     echo\:: che possono essere utili.
  1567.  
  1568.     REM call "%THIS_file_full_path%" my_date >"%temp%\%~1.txt"
  1569.     REM set "N="
  1570.     REM for /f "tokens=*" %%Z in ('type "%temp%\%~1.txt"') do (
  1571.         REM set "Zx=%%Z"
  1572.         REM echo\!Zx! | findstr /x /r /c:"^[:][:][ ][m][y][_].*$" >nul 2>&1
  1573.         REM if !errorlevel! EQU 0 (
  1574.             REM set /a N+=1
  1575.             REM if !N! EQU 1 (
  1576.                 REM echo\::* %THIS_file% %C__%%~1%C_0% .
  1577.                 REM echo\::
  1578.                 REM echo\::  restituisce queste variabili... .. .
  1579.                 REM echo\!Zx!
  1580.             REM ) else (
  1581.                 REM echo\!Zx!
  1582.             REM )
  1583.         REM )
  1584.     REM )
  1585.     REM set "N="
  1586.     REM del /q "%temp%\%~1.txt"
  1587.     exit /b %ERROR%
  1588.  
  1589. :my_date_sos_end
  1590.  
  1591. REM for /f "tokens=1-5 delims= " %%a in ( 'wmic path win32_localtime get day^,dayofweek^,month^,year ^| findstr /R [0-9]' ) do (
  1592.     REM set DAY=%%a
  1593.     REM set DAY_OF_WEEK=%%b
  1594.     REM set MONTH_N=%%c
  1595.     REM set YEAR=%%d
  1596. REM )
  1597. :::: https://superuser.com/questions/331220/wmic-path-what-wmic-class-what
  1598. REM wmic path Win32_TimeZone get /format:list
  1599. REM wmic path Win32_UTCTime get /format:list
  1600.  
  1601.     wmic path win32_localtime get /format:list >nul 2>&1
  1602.     if %errorlevel% EQU 0 (
  1603.         set "COUNT_all_wmic="
  1604.         for /f "tokens=1,2 delims=^=" %%A in ('wmic path win32_localtime get /format:list') do (
  1605.             set /a COUNT_all_wmic+=1
  1606.             REM set "_%%A=%%B"
  1607.             REM REM @echo\ A--[ %%A ] B--[ %%B ]
  1608.             REM set /a COUNT_all+=1
  1609.             set "Ax=%%A"
  1610.             set "Bx=%%B"
  1611.             REM echo\---- 'Ax=!Ax!'  'Bx=!Bx!'
  1612.             REM :::: controllo se !Bx! è vuoto
  1613.             REM :::: Milliseconds= non
  1614.             if not !Bx!dummy==dummy (
  1615.                 REM :::: imposto solo !Bx! con valore
  1616.                 REM echo\:: valore valido !Ax!=!Bx!
  1617.                 set "!Ax!=!Bx!"
  1618.             )
  1619.         )
  1620.     ) else (
  1621.         set "ERROR_win32_localtime=wmic path win32_localtime"
  1622.     )
  1623.  
  1624.     if defined Year (
  1625.         set "_YEAR=%Year%"
  1626.     ) else (
  1627.         set "ERROR_my_date_YEAR=Non trovo l'anno"
  1628.     )
  1629.  
  1630.     if defined Month (
  1631.         if %Month%==1 set "_MONTH_NAME=gennaio"
  1632.         if %Month%==2 set "_MONTH_NAME=febbraio"
  1633.         if %Month%==3 set "_MONTH_NAME=marzo"
  1634.         if %Month%==4 set "_MONTH_NAME=aprile"
  1635.         if %Month%==5 set "_MONTH_NAME=maggio"
  1636.         if %Month%==6 set "_MONTH_NAME=giugno"
  1637.         if %Month%==7 set "_MONTH_NAME=luglio"
  1638.         if %Month%==8 set "_MONTH_NAME=agosto"
  1639.         if %Month%==9 set "_MONTH_NAME=settembre"
  1640.         if %Month%==10 set "_MONTH_NAME=ottobre"
  1641.         if %Month%==11 set "_MONTH_NAME=novembre"
  1642.         if %Month%==12 set "_MONTH_NAME=dicembre"
  1643.         if "%Month:~1,1%"=="" (
  1644.             set "_MONTH_N=0%Month%"
  1645.         ) else (
  1646.             set "_MONTH_N=%Month%"
  1647.         )
  1648.     ) else (
  1649.         set "ERROR_my_date_Month=Non trovo il mese"
  1650.     )
  1651.     if defined DayOfWeek (
  1652.         if %DayOfWeek%==0 set "_DAY_NAME=domenica"
  1653.         if %DayOfWeek%==1 set "_DAY_NAME=lunedì"
  1654.         if %DayOfWeek%==2 set "_DAY_NAME=martedì"
  1655.         if %DayOfWeek%==3 set "_DAY_NAME=mercoledì"
  1656.         if %DayOfWeek%==4 set "_DAY_NAME=giovedì"
  1657.         if %DayOfWeek%==5 set "_DAY_NAME=venerdì"
  1658.         if %DayOfWeek%==6 set "_DAY_NAME=sabato"
  1659.         if %DayOfWeek%==7 set "_DAY_NAME=domenica"
  1660.         if "%DayOfWeek:~1,1%"=="" (
  1661.             set "_DAY_OF_WEEK=0%DayOfWeek%"
  1662.         ) else (
  1663.             set "_DAY_OF_WEEK=%DayOfWeek%"
  1664.         )
  1665.     ) else (
  1666.         set "ERROR_my_date_DayOfWeek=Non trovo il giorno della settimana"
  1667.     )
  1668.     if defined Quarter (
  1669.         set "_QUARTER_IN_YEAR=%Quarter%"
  1670.     ) else (
  1671.         set "ERROR_my_date_QUARTER_IN_YEAR=Non trovo il quadrimestre"
  1672.     )
  1673.     if defined WeekInMonth (
  1674.         set "_WEEK_IN_MONTH=%WeekInMonth%"
  1675.     ) else (
  1676.         set "ERROR_my_date_WEEK_IN_MONTH=Non trovo la settimana nel mese"
  1677.     )
  1678.     if defined Day (
  1679.         if "%Day:~1,1%"=="" (
  1680.             set "_DAY_IN_MONTH=0%Day%"
  1681.         ) else (
  1682.             set "_DAY_IN_MONTH=%Day%"
  1683.         )
  1684.     ) else (
  1685.         set "ERROR_my_date_DAY_IN_MONTH=Non trovo il giorno del mese"
  1686.     )
  1687.  
  1688.     REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1689.     REM wmic path Win32_TimeZone get /format:list
  1690.     REM Bias=60
  1691.     REM Caption=(UTC+01:00) Amsterdam, Berlino, Berna, Roma, Stoccolma, Vienna
  1692.     REM DaylightBias=-60
  1693.     REM DaylightDay=5
  1694.     REM DaylightDayOfWeek=0
  1695.     REM DaylightHour=2
  1696.     REM DaylightMillisecond=0
  1697.     REM DaylightMinute=0
  1698.     REM DaylightMonth=3
  1699.     REM DaylightName=ora legale Europa occidentale
  1700.     REM DaylightSecond=0
  1701.     REM DaylightYear=0
  1702.     REM Description=(UTC+01:00) Amsterdam, Berlino, Berna, Roma, Stoccolma, Vienna
  1703.     REM SettingID=
  1704.     REM StandardBias=0
  1705.     REM StandardDay=5
  1706.     REM StandardDayOfWeek=0
  1707.     REM StandardHour=3
  1708.     REM StandardMillisecond=0
  1709.     REM StandardMinute=0
  1710.     REM StandardMonth=10
  1711.     REM StandardName=ora solare Europa occidentale
  1712.     REM StandardSecond=0
  1713.     REM StandardYear=0
  1714.     REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1715.     wmic path Win32_TimeZone get /format:list >nul 2>&1
  1716.     if %errorlevel% EQU 0 (
  1717.         set "COUNT_all_wmic="
  1718.         REM for /f "tokens=1,2 delims=^=" %%A in ('wmic path Win32_TimeZone get Description /format:list') do (
  1719.         for /f "tokens=1,2 delims=^=" %%A in ('wmic path Win32_TimeZone get /format:list') do (
  1720.             set /a COUNT_all_wmic+=1
  1721.             REM set "_%%A=%%B"
  1722.             REM REM @echo\ A--[ %%A ] B--[ %%B ]
  1723.             REM set /a COUNT_all+=1
  1724.             set "Ax=%%A"
  1725.             set "Bx=%%B"
  1726.             REM echo\---- 'Ax=!Ax!'  'Bx=!Bx!'
  1727.             REM :::: controllo se !Bx! è vuoto
  1728.             REM :::: Milliseconds= non
  1729.             if not !Bx!dummy==dummy (
  1730.                 REM if defined TR_UPPER (
  1731.                     REM for /f "tokens=*" %%Z in ( 'echo\!Ax!^|%TR_UPPER%') do (
  1732.                     REM set "Ax=%%Z"
  1733.                     REM echo\@@@@@@@@@!Ax!
  1734.                     REM )
  1735.                 REM )
  1736.  
  1737.                 REM :::: imposto solo !Bx! con valore
  1738.                 REM echo\:: valore valido !Ax!=!Bx!
  1739.                 set "!Ax!=!Bx!"
  1740.             )
  1741.         )
  1742.     ) else (
  1743.         set "ERROR_Win32_TimeZone=wmic path Win32_TimeZone"
  1744.     )
  1745.     if defined Description (
  1746.         set "_TIME_Description=%Description%"
  1747.     ) else (
  1748.         set "ERROR_TimeZone_Description=non trovo la descrizione di TimeZone"
  1749.     )
  1750.     if defined StandardName (
  1751.         set "_TIME_StandardName=%StandardName%"
  1752.     ) else (
  1753.         set "ERROR_TimeZone_StandardName=non trovo StandardName di TimeZone"
  1754.     )
  1755.     if defined DaylightName (
  1756.         set "_TIME_DaylightName=%DaylightName%"
  1757.     ) else (
  1758.         set "ERROR_TimeZone_DaylightName=non trovo DaylightName di TimeZone"
  1759.     )
  1760.  
  1761.     REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1762.     REM wmic path Win32_UTCTime get /format:list
  1763.     REM Day=4
  1764.     REM DayOfWeek=4
  1765.     REM Hour=12
  1766.     REM Milliseconds=
  1767.     REM Minute=26
  1768.     REM Month=4
  1769.     REM Quarter=2
  1770.     REM Second=7
  1771.     REM WeekInMonth=1
  1772.     REM Year=2024
  1773.     REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1774.     wmic path Win32_UTCTime get /format:list >nul 2>&1
  1775.     if %errorlevel% EQU 0 (
  1776.         set "COUNT_all_wmic="
  1777.         for /f "tokens=1,2 delims=^=" %%A in ('wmic path Win32_UTCTime get /format:list') do (
  1778.             set /a COUNT_all_wmic+=1
  1779.             REM set "_%%A=%%B"
  1780.             REM REM @echo\ A--[ %%A ] B--[ %%B ]
  1781.             REM set /a COUNT_all+=1
  1782.             set "Ax=%%A"
  1783.             set "Bx=%%B"
  1784.             REM echo\---- 'Ax=!Ax!'  'Bx=!Bx!'
  1785.             REM :::: controllo se !Bx! è vuoto
  1786.             if not !Bx!dummy==dummy (
  1787.                 REM :::: imposto solo !Bx! con valore
  1788.                 REM echo\:: valore valido !Ax!=!Bx!
  1789.                 set "!Ax!=!Bx!"
  1790.             )
  1791.         )
  1792.     ) else (
  1793.         set "ERROR_Win32_UTCTime=wmic path Win32_UTCTime"
  1794.     )
  1795.     if defined Day (
  1796.         if "%Day:~1,1%"=="" (
  1797.             set "_UTC_DAY_IN_MONTH=0%Day%"
  1798.         ) else (
  1799.             set "_UTC_DAY_IN_MONTH=%Day%"
  1800.         )
  1801.     )
  1802.     if defined DayOfWeek (
  1803.         if "%DayOfWeek:~1,1%"=="" (
  1804.             set "_UTC_DAY_OF_WEEK=0%DayOfWeek%"
  1805.         ) else (
  1806.             set "_UTC_DAY_OF_WEEK=%DayOfWeek%"
  1807.         )
  1808.     )
  1809.     if defined Month (
  1810.         if "%Month:~1,1%"=="" (
  1811.             set "_UTC_MONTH_N=0%Month%"
  1812.         ) else (
  1813.             set "_UTC_MONTH_N=%Month%"
  1814.         )
  1815.     )
  1816.     if defined Year (
  1817.         set _UTC_YEAR=%Year%
  1818.     )
  1819.     if defined Hour (
  1820.         if "%Hour:~1,1%"=="" (
  1821.             set "_UTC_HOUR=0%Hour%"
  1822.         ) else (
  1823.             set "_UTC_HOUR=%Hour%"
  1824.         )
  1825.     )
  1826.     if defined Minute (
  1827.         if "%Minute:~1,1%"=="" (
  1828.             set "_UTC_MINUTE=0%Minute%"
  1829.         ) else (
  1830.             set "_UTC_MINUTE=%Minute%"
  1831.         )
  1832.     )
  1833.     if defined Second (
  1834.         if "%Second:~1,1%"=="" (
  1835.             set "_UTC_SECOND=0%Second%"
  1836.         ) else (
  1837.             set "_UTC_SECOND=%Second%"
  1838.         )
  1839.     )
  1840.     set "_UTC_TIME=%_UTC_HOUR%:%_UTC_MINUTE%:%_UTC_SECOND%"
  1841.     set "_UTC_DATE=%_UTC_DAY_IN_MONTH%/%_UTC_MONTH_N%/%_UTC_YEAR%"
  1842.  
  1843.  
  1844.     set "_DATE_serial=%_YEAR%%_MONTH_N%%_DAY_IN_MONTH%"
  1845.     REM echo\@@@ _DATE_serial=%_DATE_serial%
  1846.  
  1847.     REM "wmic path win32_localtime get /format:list" non inizializza Milliseconds, non considera i centesimi di sec
  1848.     REM PRENDO I VALORI DA %time% e %date%
  1849.     REM PER VALORIZZARE _TIME_serial _DATE_serial ... .. .  .   .     .
  1850.     REM formato localizzato della data da "reg import myregPARETO-User.reg"
  1851.     REM reg query "HKCU\Control Panel\International"
  1852.     REM reg query "HKCU\Control Panel\International" /v sDecimal
  1853.  
  1854.     set "_CURRENT_date=%date%§%time: =0%" & REM spazi vuoti diventano "0"
  1855.     REM echo %_CURRENT_date%
  1856.     for /f "tokens=1-8 delims=/:,§" %%a in ("%_CURRENT_date%") do (
  1857.         REM echo  %%cYEAR %%bMONTH %%aDAY
  1858.         REM echo  %%dHOURS %%eMIN %%fSEC %%gCENTs
  1859.         REM set "_Year=%%c"
  1860.         REM set "_Month=%%b"
  1861.         REM set "_Day=%%a"
  1862.         set "_HOUR=%%d"
  1863.         set "_MINUTE=%%e"
  1864.         set "_SECOND=%%f"
  1865.         set "_SECOND_CENT=%%g"
  1866.         REM set "_DATE_serial=%%c%%b%%a"
  1867.         REM set "_TIME_serial=%%d%%e%%f%%g"
  1868.     )
  1869.     set "_CURRENT_date="
  1870.     set "_TIME_serial=%_HOUR%%_MINUTE%%_SECOND%%_SECOND_CENT%"
  1871.  
  1872.     set "_DATE=%_DAY_NAME% %Day% %_MONTH_NAME% %_YEAR%"
  1873.     set "_TIME=%_HOUR%:%_MINUTE%:%_SECOND%,%_SECOND_CENT%"
  1874.     REM echo\@@@_DATE==%_DATE%
  1875.     REM echo\@@@_TIME==%_TIME%
  1876.     REM echo "%~dpnx0" %1
  1877.     echo\:: %THIS_file% %C__%%~1%C_0% .
  1878.     echo\::
  1879.     echo\:: valori restituiti... .. .
  1880.     echo\::::::::::::::::::::::::::::::::::::::::
  1881.     for /f "tokens=1,2 delims=^=" %%A in ( 'set _' ) do (
  1882.         set Az=
  1883.         set Bz=
  1884.         set "Az=%%A"
  1885.         set "Bz=%%B"
  1886.         echo\:: my!Az!=!Bz!
  1887.     )
  1888.     echo\::::::::::::::::::::::::::::::::::::::::
  1889.     echo\::%MSG:§=!LF!::%
  1890.     call :FOOTER
  1891.     set "N="
  1892.     for /f "tokens=1,2 delims=^=" %%G in ('set _') do (
  1893.         set /a N+=1
  1894.         REM if "!N!" EQU "1" endlocal & endlocal
  1895.         if "!N!" EQU "1" endlocal
  1896.         set "my%%G=%%H"
  1897.     )
  1898.     set "N="
  1899. :my_date_end
  1900. :::::::::::::: my_date end ::::::::::::::::::::::::::::::::::::::::::
  1901. :::::::::::::: my_date end ::::::::::::::::::::::::::::::::::::::::::
  1902. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1903.  
  1904. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1905. :::::::::::::: my_ip4 :::::::::::::::::::::::::::::::::::::::::::::::::::
  1906. :::::::::::::: my_ip4 :::::::::::::::::::::::::::::::::::::::::::::::::::
  1907. goto :my_IP4_end
  1908. :my_IP4
  1909. REM setlocal enabledelayedexpansion
  1910. :MY_IP4_sos
  1911. if not "%~0"==":MY_IP4_sos" goto :my_ip4_sos_end
  1912.     echo\::* %THIS_file% %C__%%~1%C_0% %C__%to_file%C_0% .
  1913.     echo\::
  1914.     echo\::  Con il parametro "to_file" l'output
  1915.     echo\::  é salvato nel file "%USERPROFILE%\myIP4.txt"
  1916.     echo\:: -se disponibile l'indirizzo ip4 imposta la var "my_ip4"
  1917.     echo\::    esce con %%errorlevel%%=0
  1918.     echo\:: -se non è disponibile l'indirizzo ip4
  1919.     echo\::    esce con %%errorlevel%%^>=1
  1920. exit /b %ERROR%
  1921. :my_ip4_sos_end
  1922.  
  1923.     set "IP4output=%USERPROFILE%\myIP4.txt"
  1924.     if /i "%~2"=="to_file" set "%~2=%IP4output%"
  1925.     REM set "output=%USERPROFILE%\myIP4.txt"
  1926.     :: il file  di output viene usato da "%myscripts%\bginfo\myBgInfo.cmd"
  1927.     :: per generare l'immagine per il deskTop
  1928.  
  1929.     set "IP4=-"
  1930.     REM grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"
  1931.     REM grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}"
  1932.     REM for /f "usebackq tokens=1-2* delims=:" %%a in (`ipconfig ^| findstr /i /r /c:"ipv4[. : ]*[0-9]"`) do set "IP4=-%%b!IP4: =!"
  1933.     for /f "usebackq tokens=1-2* delims=:" %%a in (`ipconfig ^| findstr /i /r /c:"ipv4[. : ]*[0-9]*[.][0-9]*[.][0-9]*[.][0-9]*$"`) do (
  1934.         set "IP4=!IP4!%%b -"
  1935.     )
  1936.  
  1937.     if "%IP4%"=="-" set "IP4=-x.x.x.x IP4 NON DISPONIBILE-" & set "ERROR_IP4=x.x.x.x IP4 NON DISPONIBILE"
  1938.     :: tutto su una riga senza CR-LF
  1939.     if defined to_file echo\ | set /p "IP4=%IP4%" > "%IP4output%"
  1940.  
  1941.     REM echo\:: %THIS_file% %C__%%~1%C_0% .
  1942.     REM echo\:: return my_IP4=%IP4%
  1943.     if not defined to_file (
  1944.         echo\:: %THIS_file% %C__%%~1%C_0% .
  1945.         echo\::
  1946.         echo\:: return my_IP4=%IP4%
  1947.         echo\::  ^|
  1948.         echo\::  ^|con il parametro "to_File"
  1949.         echo\::  ^| "%THIS_file%" my_IP4 to_File
  1950.         echo\::  ^|l'output viene salvato nel file
  1951.         echo\::  ^|"%IP4output%"
  1952.     )
  1953.     if defined to_file (
  1954.         echo\:: %THIS_file% %C__%%~1%C_0% %C__%to_file%C_0% .
  1955.         echo\::
  1956.         echo\:: return my_IP4=%IP4%
  1957.         echo\::  ^|output salvato nel file.
  1958.         echo\::  ^|"%IP4output%"
  1959.     )
  1960.     echo\::::::::::::::::::::::::::::::::::::::::
  1961.     echo\::%MSG:§=!LF!::%
  1962.     call :FOOTER
  1963. (
  1964.     REM endlocal & endlocal
  1965.     endlocal
  1966.     set "my_IP4=%IP4%"
  1967.     exit /b %ERROR%
  1968. )
  1969. :my_IP4_end
  1970. :::::::::::::: my_ip4 end :::::::::::::::::::::::::::::::::::::::::::::::
  1971. :::::::::::::: my_ip4 end :::::::::::::::::::::::::::::::::::::::::::::::
  1972. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1973. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1974.  
  1975. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1976. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1977. :::::::::::::: dov'é firefox?? ::::::::::::::::::::::::::::::::::::::::::
  1978. :::::::::::::: dov'é firefox?? ::::::::::::::::::::::::::::::::::::::::::
  1979. goto :WHERE_IS_FF_end
  1980. :WHERE_IS_FF
  1981. REM setlocal enabledelayedexpansion
  1982. :WHERE_IS_FF_sos
  1983. if not "%0"==":WHERE_IS_FF_sos" goto :WHERE_IS_FF_sos_end
  1984.     echo\::* %THIS_file% %C__%%~1%C_0% .
  1985.     echo\::
  1986.     echo\::  Cerca "firefox.exe" nei percorsi d'installazione.
  1987.     for /f "tokens=1,2 delims=^=" %%A in ( 'set program' ) do (
  1988.         echo\::        %%%%A%%=="%%B"
  1989.     )
  1990.     echo\:: Cerca la directory predefinita dei profili
  1991.     echo\::  per l'utente "%USERNAME%" che esegue questo script
  1992.     echo\:: -In caso positivo imposta le var
  1993.     echo\::      my_FIREFOX_exe_PATH
  1994.     echo\::      my_FIREFOX_PATH
  1995.     echo\::      my_FIREFOX_PROFILES
  1996.     echo\::  ed esce con %%errorlevel%%=0
  1997.     echo\:: -In caso negativo esce con %%errorlevel%%^>=1
  1998. exit /b %ERROR%
  1999. :WHERE_IS_FF_sos_end
  2000.  
  2001.     set "FIREFOX_exe_PATH="
  2002.     set "FIREFOX_PATH="
  2003.     set "FIREFOX_PROFILES="
  2004.     set "FIREFOX_exe=firefox.exe"
  2005.  
  2006.     if exist "%ProgramFiles%\Mozilla Firefox\%FIREFOX_exe%" (
  2007.         set "FIREFOX_exe_PATH=%ProgramFiles%\Mozilla Firefox\%FIREFOX_exe%"
  2008.         set "FIREFOX_PATH=%ProgramFiles%\Mozilla Firefox\"
  2009.     ) else (
  2010.         echo\ attendi, cerco ..."%FIREFOX_exe%" nei percorsi d'installazione
  2011.     )
  2012.  
  2013.     if not defined FIREFOX_exe_PATH (
  2014.         for /F "tokens=2 delims=^=" %%A in ( '@set ProgramFiles' ) do (
  2015.             echo\ "%%A"
  2016.             for /f "tokens=*" %%G in ('where /r "%%A" %FIREFOX_exe% ^2^>nul') do (
  2017.                 echo\ "%%G"
  2018.                 set "FIREFOX_exe_PATH=%%~fG"
  2019.                 set "FIREFOX_PATH=%%~dpG"
  2020.             )
  2021.         )
  2022.     )
  2023.  
  2024.     if not defined FIREFOX_exe_PATH (
  2025.         if "%ProgramW6432%"=="%ProgramFiles%" (
  2026.             goto :where_is_FF00
  2027.          )
  2028.     )
  2029.     if not defined FIREFOX_exe_PATH (
  2030.         for /f "tokens=*" %%M in ('where /r "%ProgramW6432%" %FIREFOX_exe% ^2^>nul') do (
  2031.             set "FIREFOX_exe_PATH=%%~fM"
  2032.             set "FIREFOX_PATH=%%~dpM"
  2033.         )
  2034.     )
  2035.  
  2036.     :where_is_FF00
  2037.     if not defined FIREFOX_exe_PATH (
  2038.         set "ERROR_firefox_path=nei percorsi d'installazione dei programmi § "%FIREFOX_exe%" non c'é"
  2039.     )
  2040.  
  2041.     if defined FIREFOX_exe_PATH (
  2042.         set "my_FIREFOX_PATH=%FIREFOX_PATH%"
  2043.         set "my_FIREFOX_exe_PATH=%FIREFOX_exe_PATH%"
  2044.         echo\:: return my_FIREFOX_PATH="!FIREFOX_PATH!"
  2045.         echo\::        my_FIREFOX_exe_PATH="!FIREFOX_exe_PATH!"
  2046.         if exist "%appdata%\mozilla\firefox\profiles.ini" (
  2047.             set "my_FIREFOX_PROFILES=%appdata%\mozilla\firefox\"
  2048.             echo\::        my_FIREFOX_PROFILES="!my_FIREFOX_PROFILES!"
  2049.             echo\::::::::::::::::::::::::::::::::::::::::
  2050.             echo\::%MSG:§=!LF!::%
  2051.         )
  2052.     ) else (
  2053.         if exist "%appdata%\mozilla\firefox\profiles.ini" (
  2054.             set "FIREFOX_PROFILES=%appdata%\mozilla\firefox\"
  2055.             echo\::::::::::::::::::::::::::::::::::::::::
  2056.             echo\::  Trovati profili personali di "%USERNAME%" in
  2057.             echo\::  "!FIREFOX_PROFILES!"
  2058.         )
  2059.     )
  2060.  
  2061.     call :FOOTER
  2062.  
  2063. (
  2064.     REM endlocal & endlocal
  2065.     endlocal
  2066.     set "my_FIREFOX_exe_PATH=%my_FIREFOX_exe_PATH%"
  2067.     set "my_FIREFOX_PATH=%my_FIREFOX_PATH%"
  2068.     set "my_FIREFOX_PROFILES=%my_FIREFOX_PROFILES%"
  2069.     exit /b %ERROR%
  2070. )
  2071. :WHERE_IS_FF_end
  2072. :::::::::::::: dov'é firefox?? fine :::::::::::::::::::::::::::::::::::::::::
  2073. :::::::::::::: dov'é firefox?? fine :::::::::::::::::::::::::::::::::::::::::
  2074. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2075. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2076.  
  2077.  
  2078.  
  2079.  
  2080. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2081. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2082. ::::::::::::: Etichette attive solo se richamate da CALL :::::::::::::::::::::::
  2083. :HEADER
  2084. if not "%~0"==":HEADER" goto :HEADER_end
  2085.     echo\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2086.     REM echo\ ** %THIS_file% last modified "%THIS_file_date%" bit-size=%THIS_file_size%
  2087.     echo\ ** %THIS_file% versione %INFO_ver_date% %INFO_ver_time%
  2088.     REM echo\ %THIS_file_full_path% %ALL_0arg:"=%
  2089.     REM echo\ %THIS_file_full_path% %ALL_0arg%
  2090.     REM echo\ %THIS_file_full_path% %1
  2091.     echo\ %THIS_file_full_path%
  2092.     echo\         start %TIME_start%
  2093.     echo\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2094.     if not "%~1"=="" (
  2095.         echo\  %~1
  2096.         echo\::::::::::::::::::::::::::::::::::::::::
  2097.     )
  2098.     for /f "tokens=1,2 delims=^=" %%a in ( '"set ERROR_ 2>nul"' ) do (
  2099.         echo\%C_RED% [%%a] %C_0%%%b
  2100.     )
  2101.     echo\::::::::::::::::::::::::::::::::::::::::
  2102. goto :EOF
  2103. :HEADER_end
  2104.  
  2105. :FOOTER
  2106. if not "%~0"==":FOOTER" goto :FOOTER_end
  2107.     echo\::::::::::::::::::::::::::::::::::::::::
  2108.     REM set ERROR_
  2109.     for /f "tokens=1,2 delims=^=" %%A in ( '"@set ERROR_ 2>nul"' ) do (
  2110.         set /a ERROR+=1
  2111.         set "X=%%B"
  2112.         REM echo\ %C_RED%[%%A]%C_0% %%B
  2113.         REM echo\ %C_RED%[%%A]%C_0% !X:$=%LF%!
  2114.         echo\ %C_RED%[%%A]%C_0% !X!
  2115.     )
  2116.     if not defined ERROR (
  2117.         set ERROR=0
  2118.     )
  2119.     set "TIME_end=%time%"
  2120.     echo\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2121.     REM echo\ %THIS_file_full_path% %ALL_0arg:"=%
  2122.     echo\ ** %THIS_file% versione %INFO_ver_date% %INFO_ver_time%
  2123.     echo\ %THIS_file_full_path%
  2124.     if %ERROR% GTR 0 echo\ %C_RED%EXIT errorlevel%C_0%=%ERROR%
  2125.     echo\  Avviato alle %TIME_start%
  2126.     echo\     Fine alle %TIME_end%
  2127.     echo\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2128.     echo\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2129.     chcp %CHCP_OLD% > nul
  2130.     endlocal
  2131.     exit /b !ERROR!
  2132. :FOOTER_end
  2133.  
  2134. :SOS_all
  2135. if not "%~0"==":SOS_all" goto :SOS_all_end
  2136.     echo\::*Questo file "%THIS_file_full_path%"
  2137.     echo\:: contiene funzioni indipendenti e restituiscono variabili
  2138.     echo\:: che iniziano con "my_" visualizzabili con "set my_".
  2139.     echo\::*Per ogni funzione è disponibile un'aiuto
  2140.     echo\:: richiamabile con "[-h|/h|-?|/?|help]" seguito dal nome della funzione.
  2141.     echo\::*Le funzioni disponibili sono elencate qui sotto:
  2142.     echo\::
  2143.     set /a N=0
  2144.     for /f "tokens=*" %%A in ( 'findstr /r /x /c:"^[:][A-Z_0-9].*_sos$" "%THIS_file_full_path%"' ) do (
  2145.         set /a N+=1
  2146.         set "X=%%A"
  2147.         set "X=!X::=!"
  2148.         set "X=!X:_sos=!"
  2149.         REM echo\@@@!N!- %%A - !X!
  2150.         if "!N!" EQU "4" (
  2151.             set "Xz=!Xz! - !X! §"
  2152.             set /a N=0
  2153.         ) else (
  2154.             set "Xz=!Xz! - !X!"
  2155.         )
  2156.     )
  2157.     echo\::   %Xz:§=!LF!::   % & set "N=" & set "X=" & set "Xz="
  2158.     echo\::
  2159.     echo\::*"%THIS_file_full_path%" [-h^|/h^|-?^|/?^|help] %C__%all%C_0%  .
  2160.     echo\:: Visualizza l'aiuto per tutte le funzioni
  2161.     echo\::::::::::::::::::::::::::::::::::::::::
  2162.     echo\::---------
  2163.     echo\:: %MSG:§=!LF!:: %
  2164.     echo\::---------
  2165.     echo\::::::::::::::::::::::::::::::::::::::::
  2166.     echo\::::::::::da fare o migliorare::::::::::
  2167.  
  2168.     REM echo\
  2169.     REM echo\* "%THIS_file%" where_is_ff
  2170.     REM echo\* "%THIS_file%" my_date
  2171.     REM echo\*^|"%THIS_file%" my_ip4 to_file
  2172.     REM echo\ ^|  con il parametro "to_file" l'output
  2173.     REM echo\ ^|  é salvato nel file "%USERPROFILE%\myIP4.txt"
  2174.     REM echo\
  2175.     REM echo\
  2176.     REM echo\* "%THIS_file%" user_is_admin
  2177.     REM echo\
  2178.     REM echo\*^|"%THIS_file%" run_as_admin
  2179.     REM echo\ ^|  %%2="path al file da eseguire come Administrators"
  2180.     REM echo\ ^|  %%3="eventuali parametri da passare"
  2181.     REM echo\ ^|  Spazi vuoti devono essere racchiusi tra " "
  2182.     REM echo\
  2183.     REM echo\*^|"%THIS_file%" time_elapsed %%2 "%%3"
  2184.     REM REM set "pat=[-:,.|;#\/]"
  2185.     REM REM echo\echo %time%x ^| findstr /i /r /c:"[ 0-9][0-9]!pat![0-9][0-9]!pat![0-9][0-9]!pat![0-9][0-9]"
  2186.     REM REM echo\%time% | findstr /i /r /c:[ 0-9][0-9]!!pat!![0-9][0-9]!pat![0-9][0-9]!pat![0-9]*$ & echo error=%errorlevel%
  2187.     REM echo\ ^|  %%2=TS oppure TE indica come considerare %%3
  2188.     REM echo\ ^|     TS TIME start considera %%3 come "%%time%%" di avvio
  2189.     REM echo\ ^|     TE TIME end   considera %%3 come "%%time%%" di fine
  2190.     REM echo\ ^|"%THIS_file%" time_elapsed CALC
  2191.     REM echo\ ^|  Calcola la differenza tra TS "%%time%%" e TE "%%time%%"
  2192.     REM echo\ ^|  Restituisce le var:
  2193.     REM echo\ ^| .......................................
  2194.     REM REM echo\::%THIS_file% exit %%errorlevel%%==0 tutto OK
  2195.     REM REM echo\::%THIS_file% exit %%errorlevel%%=^>1 ERRORE
  2196.     REM REM echo\::reset tutte le var "my_"
  2197.     REM REM echo\::%RESET_all_var%
  2198.     REM endlocal
  2199. goto :EOF
  2200. :SOS_all_end
  2201. ::::::::::::: Etichette attive solo se richamate da CALL fine ::::::::::::::::::
  2202. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2203.  
Advertisement
Add Comment
Please, Sign In to add comment