Poser une condition dans un fichier .bat
Résolu
lucy100souci
-
tompols Messages postés 1325 Statut Contributeur -
tompols Messages postés 1325 Statut Contributeur -
Bonjour,
Je suis débutante.
J'aimerais créer un fichier .bat sous XP commencant par la condition suivante :
=> Si Acrobat Standard 7 est installé sur le poste ALORS ne rien faire
=> Si Acrobat standard 7 n'est pas installé alors lancer les actions suivantes.
J'ai juste un problème pour poser cette condition.
Auriez-vous une solution ?
MERCI
Je suis débutante.
J'aimerais créer un fichier .bat sous XP commencant par la condition suivante :
=> Si Acrobat Standard 7 est installé sur le poste ALORS ne rien faire
=> Si Acrobat standard 7 n'est pas installé alors lancer les actions suivantes.
J'ai juste un problème pour poser cette condition.
Auriez-vous une solution ?
MERCI
A voir également:
- Poser une condition dans un fichier .bat
- Creer un fichier .bat - Guide
- Fichier bin - Guide
- Comment réduire la taille d'un fichier - Guide
- Fichier epub - Guide
- Fichier rar - Guide
1 réponse
Bonour
en vbs :
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product'")
For Each objSoftware in colSoftware
If Instr(objSoftware.Name, "Acrobat Standard") then
ce que tu veux faire
End if
Next
en vbs :
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product'")
For Each objSoftware in colSoftware
If Instr(objSoftware.Name, "Acrobat Standard") then
ce que tu veux faire
End if
Next