Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

executer .vbs dans du code vb

2 réponses
Avatar
Damien
Hello, je souhaite executer du fichier .vbs (vb script) =E0=20
partir d'un code vb. J'ai essay=E9 la fonction shell() mais=20
elle ne foncitonne que pour des executable apparemment.
Quelqu'un a t'il une id=E9e?

Merci

Damien

2 réponses

Avatar
François Picalausa
Hello,

tu peux utiliser shellexecute, comme décrit dans la faq:
http://faq.vb.free.fr/index.php?question=8" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://faq.vb.free.fr/index.php?question=8

Tu pourrais aussi utiliser le Windows Script Control pour avoir plus de
contrôle sur le script:
http://www.microsoft.com/downloads/details.aspx?FamilyID×e31492-2595-49e6-8c02-1426fec693ac&DisplayLang=en
http://www.microsoft.com/mind/0799/script/script.asp

--
François Picalausa (MVP VB)
http://faq.vb.free.fr --- http://msdn.microsoft.com
http://apisvb.europe.webmatrixhosting.net

"Damien" a écrit dans le message
de news:17cbf01c44987$11032d50$
Hello, je souhaite executer du fichier .vbs (vb script) à
partir d'un code vb. J'ai essayé la fonction shell() mais
elle ne foncitonne que pour des executable apparemment.
Quelqu'un a t'il une idée?

Merci

Damien


Avatar
ng
Salut,

Ou sinon :

Dim strChemin As String
strChemin = "c:1.vbs"
Call Shell("wscript """ & strChemin & """", vbNormalFocus)

--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/
http://apisvb.europe.webmatrixhosting.net/



Damien a écrit :

Hello, je souhaite executer du fichier .vbs (vb script) à
partir d'un code vb. J'ai essayé la fonction shell() mais
elle ne foncitonne que pour des executable apparemment.
Quelqu'un a t'il une idée?

Merci

Damien