Ouverture de commande dos

DRDams

XLDnaute Nouveau
Bonjour,
Pourriez vous vérifier mon code SVP, je débute et j'ai uhn probleme.
j'ai créer un message au démarrage de windows et apres avoir cliquer sur le bouton OK je voudrais faire ouvrir l'invité de commande (commande DOS) de windows.
Merci à vous.

dim WSHShell
set WSHShell=wscript.createobject('wscript.shell')
WSHShell.Popup 'Bonjour !' & chr(13) & _
date & ' ' & chr(13) & _
time & chr(13) & _
'Ouverture de commande Dos ' & chr(13) & _
'Appuyer sur Ok ' & _
'pour continuer.' & chr(13) & _
, s, 'Message'
Set WSHShell = wscript.CreateObject('WScript.Shell')
Set Shell=Wscript.CreateObject('Shell.Application')
Shell.Open 'cmd.exe'
 

Hervé

XLDnaute Barbatruc
bonsoir drdams

c'est pas du vba, ca ?

lol

c'est du vbs

essaye comme ceci :

Dim WSHShell
Set WSHShell = Wscript.CreateObject('wscript.shell')
WSHShell.Popup 'Bonjour !' & chr(13) & date & ' ' & chr(13) & _
time & chr(13) & _
'Ouverture de commande Dos ' & chr(13) & _
'Appuyer sur Ok ' & _
'pour continuer.' & chr(13) , s, 'Message'
Set WSHShell = Wscript.CreateObject('WScript.Shell')
Set Shell = Wscript.CreateObject('Shell.Application')
Shell.Open 'c:\\windows\\system32\\cmd.exe'

chez moi ca marche

salut
 

Discussions similaires

Statistiques des forums

Discussions
312 488
Messages
2 088 862
Membres
103 979
dernier inscrit
imed