How to execute vb script through php?
Posted: Thu Jan 21, 2010 10:36 am
I'm trying to get the current logged in user of the machine. The vbscript gets the right information but how can I execute this in php?
Code: Select all
<html><body>
<script language="vbscript">
Dim objNet
On Error Resume Next
Set objNet = CreateObject("WScript.NetWork")
If Err.Number <> 0 Then
MsgBox "Don't be Shy." & vbCRLF &_
"Do not press ""No"" If your browser warns you."
Document.Location = "test.php"
End if
Dim strInfo
strInfo = "User Name is " & objNet.UserName & vbCRLF & _
"Computer Name is " & objNet.ComputerName & vbCRLF & _
"Domain Name is " & objNet.UserDomain
MsgBox strInfo
Set objNet = Nothing
</script>
</body>
<?php
// DISPLAY VB SCRIPT CONTENTS
?>
</html>