Sortie Powershell vers variable batch
dans un script batch
REM Controle d'autorisation pour le programe demandé
if "%exe:~-3%" == "lnk" (
FOR /F "tokens=* USEBACKQ" %%F IN (`powershell.exe -noninteractive -command $sh^=New-Object -ComObject WScript.Shell^;$sh.CreateShortcut^('%exe%'^).TargetPath`) DO (
SET exe=%%F
)
)
Dernière modification : le 2024/02/20
