|
Hi,
I am redirecting from asp page to vbs file.The VBS script resides on same folder as of asp pages in my windows/IIS server.
I am using windows2003 and IIS 6.0.
Script is running properly but it is asking user to open/save the file.
My code for .asp page is :
<%@language="vbscript" %>
<% dim a
a=request.form("sometextbox")
if a="" then
%>
<html>
<body>
--------some code -------
</body>
</html>
<%
else
response.redirect("file.vbs")
end if
%>
code for file.vbs file is:-
On Error Resume Next
Dim ForReading
Dim Filename,fil,fold
Filename="C:\temp.txt"
ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
set fil=objFSO.GetFile("c:\temp.txt")
If objFSO.FileExists(Filename) Then
Set objTextFile = objFSO.OpenTextFile _
(Filename, ForReading)
IP=objTextFile.ReadLine
objTextFile.close
'Delete the temporary file
fil.delete(true)
'Call RDP
dim wshell
set wshell=CreateObject("WScript.Shell")
wshell.Run "C:\windows\system32\mstsc.exe /v:"& IP
set wshell=nothing
End If
It is first asking me to open or save the file.
If i click "open" then it asks to run or don't Run
But i want to hide these internal workings from the users.
How do i prevent these popup from occurring?
Can anyone help me in this issue?
Thanks in advance.
Anu
|