I’m in a bit of pickle with ASP and VBscript variable and hope someone could get me some advice.
There’s a FORM’ I’ve created in ASP and its purpose is to capture the name(s) of users. The plan is then to pass the information from ASP to VBScript. My dilemma is how to extract the information in ASP and use it in VBScript. (Please see code below)
I’ve read in some forums that is simply can’t be done. Unfortunately, I can’t run what I need in any other form except in VBscript
There was one suggestion though to create a .vbs file and pass the ASP variable as an argument. But not having much experience with VBScript, I’m not 100% percent sure how that is done.
Thanks in advance for all the help.
Regards
[html]<HTML>
<BODY>
<Table>
<TR height="20" style="height: 15.0pt">
<TD colspan="8" align=Left>
<img border="0" src="R:\Pic.bmp" width="150" height="150">
</TD>
</TR>
<TR>
<TD>
<FORM method="POST" action="ActionRequest1.asp">
<br>
Customer :
<br>
<select multiple name="Name" Size="3">
<option value =" John " selected> John </option>
<option value =" Jane "> Jane </option>
<option value =" Cory "> Cory </option>
</select>
<br>
<br>
<INPUT type="submit" value="Submit">
</FORM>
</TD>
</TR>
</Table>
</BODY>
</HTML>
[/html]
'------------- VBSCRIPT -------------------------------------
Expand|Select|Wrap|Line Numbers
- <HTML>
- <HEAD>
- <TITLE>List files and folders for users</TITLE>
- </HEAD>
- <script language="VBScript" type="text/vbscript">
- Dim wshell
- Dim Query
- Query = Request.Form("Name")‘ <----- Need the variable from ASP which is where I’m stuck at the moment
- Set wshell = CreateObject("WScript.shell")
- wshell.run "%comspec% /C R: & CD \" & Query & " & Dir /S /T:W /O:D *.txt > c:\Results.txt", 0, True
- set wshell = nothing
- </script>
- </BODY>
- </HTML>