Poser une condition dans un fichier .bat
Résolu/Fermé
lucy100souci
-
7 déc. 2009 à 16:04
tompols Messages postés 1273 Date d'inscription jeudi 29 juillet 2004 Statut Contributeur Dernière intervention 25 novembre 2013 - 7 déc. 2009 à 16:09
tompols Messages postés 1273 Date d'inscription jeudi 29 juillet 2004 Statut Contributeur Dernière intervention 25 novembre 2013 - 7 déc. 2009 à 16:09
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
- Fichier bat - Guide
- Comment réduire la taille d'un fichier - Guide
- Fichier rar - Guide
- Comment ouvrir un fichier epub ? - Guide
- Ouvrir un fichier .bin - Guide
1 réponse
tompols
Messages postés
1273
Date d'inscription
jeudi 29 juillet 2004
Statut
Contributeur
Dernière intervention
25 novembre 2013
435
7 déc. 2009 à 16:09
7 déc. 2009 à 16:09
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