Bonjour,

je débute en ASP.

Je souhaite créer une page Web qui permet d'executer un vbs sur le serveur web (IIS v5) dès que je clique sur un bouton.

Lorsque je lance la page, rien ne se produit

le vbs ne s'excute pas.

Pouvez vous m'aider svp.

voici le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<%@ LANGUAGE=VBSCRIPT %>
<% OPTION EXPLICIT %>
<html>
<head>
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
<title id=titletext>Page</title>
</head>
  <body>
  <form action="lance_vbs.asp?Etape=1" method="post" enctype="multipart/form-data">
      <p align="center"><input type="submit" value="Réserver un compte"></p>
  </form>
 
<%
Select Case Request.Querystring("Etape")
Case ""
Case "1"
  Dim objShell
  Dim vbsFile
  vbsFile = Server.MapPath("test.vbs")
  Set objShell = server.CreateObject("Wscript.Shell")
  objShell.Run "vbsFile",1,FALSE 
  Set objShell = Nothing
  Response.Write "Done : " & Server.MapPath("test.vbs")
End Select
%>
 
  </body>
</html>