16657 shaares
Voici comment inhiber l'exécution d'un script d'ouverture de session sur vos OS serveurs.
Dim winOS
Set WshShell = CreateObject("WScript.Shell")
winOS = LCase(GetObject("winmgmts:root\cimv2:Win32_OperatingSystem=@").Caption)
If InStr(winOs, "server") > 0 Then
' Si OS Windows Server
' decommenter pour debug :
' WshShell.Run "cmd /C echo " & winOs & " > %temp%\BM_os_version.log"
Else
WshShell.Run "\\srv-app.maboite.local\app$\run.exe /s"
End If