H
Homeboy_X
Hi,
ich habe folgendes Problem:
ich arbeite als Praktikant in einer Internet-Firma. Über eine Eingabemaske soll über nslookup der MX-Record beliebiger in unserem Nameserver eingetragenen Domains abgefragt werden. Ich habe in Visual Basic ein Programm geschrieben, mit dem das alles wunderbar funktioniert hat, doch meine ASP-Seite kennt die Befehle scheinbar nicht. Das VB sieht so aus:
----------------------------------------------------------
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function GetExitCodeProcess Lib "kernel32" (ByVal hProcess As Long, lpExitCode As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Const STILL_ACTIVE = &H103
Const PROCESS_QUERY_INFORMATION = &H400
Sub Shell32Bit(ByVal JobToDo As String)
Dim hProcess As Long
Dim RetVal As Long
'The next line launches JobToDo as icon,
'captures process ID
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, Flase, Shell(JobToDo, 6))
Do
'Get the status of the process
GetExitCodeProcess hProcess, RetVal
'Sleep command recommended as well
'as DoEvents
DoEvents: Sleep 100
'Loop while the process is active
Loop While RetVal = STILL_ACTIVE
End Sub
Private Sub Form_Load()
Dim JobToDo As String
JobToDo = "c:\test.bat muensingen.de"
Shell32Bit JobToDo
End Sub
--------------------------------------------
und in test.bat steht eigentlich nur noch der nslookup-Befehl drin...
Frage:
Es geht doch sicher ganz einfach, ich hab hier nur absolut KEINE Doku zu ASP zur Hand,
also wie kann ich ganz einfach nur eine *.bat Datei von ASP aus laufen lassen??
Viele Grüsse
Homeboy_X
ich habe folgendes Problem:
ich arbeite als Praktikant in einer Internet-Firma. Über eine Eingabemaske soll über nslookup der MX-Record beliebiger in unserem Nameserver eingetragenen Domains abgefragt werden. Ich habe in Visual Basic ein Programm geschrieben, mit dem das alles wunderbar funktioniert hat, doch meine ASP-Seite kennt die Befehle scheinbar nicht. Das VB sieht so aus:
----------------------------------------------------------
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function GetExitCodeProcess Lib "kernel32" (ByVal hProcess As Long, lpExitCode As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Const STILL_ACTIVE = &H103
Const PROCESS_QUERY_INFORMATION = &H400
Sub Shell32Bit(ByVal JobToDo As String)
Dim hProcess As Long
Dim RetVal As Long
'The next line launches JobToDo as icon,
'captures process ID
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, Flase, Shell(JobToDo, 6))
Do
'Get the status of the process
GetExitCodeProcess hProcess, RetVal
'Sleep command recommended as well
'as DoEvents
DoEvents: Sleep 100
'Loop while the process is active
Loop While RetVal = STILL_ACTIVE
End Sub
Private Sub Form_Load()
Dim JobToDo As String
JobToDo = "c:\test.bat muensingen.de"
Shell32Bit JobToDo
End Sub
--------------------------------------------
und in test.bat steht eigentlich nur noch der nslookup-Befehl drin...
Frage:
Es geht doch sicher ganz einfach, ich hab hier nur absolut KEINE Doku zu ASP zur Hand,
also wie kann ich ganz einfach nur eine *.bat Datei von ASP aus laufen lassen??
Viele Grüsse
Homeboy_X