ok....jamen så laver du bare et link på din webside til en .vbs fil.
Nedenstående er et script hvorpå du kan starte en service på din server.
Indholdet af filen ser sådan ud:
Dim strComputerName ' The Computer Name to be queried via WMI
Dim strWinMgt ' The WMI management String
On Error Resume Next
'get computer's name or ip address
strComputerName = ucase(InputBox("Enter the remote computers name or IP","Computer Name/IP"))
AppPath = ucase(InputBox("Enter path to application:" & VBCRLF & VBCRLF & "Example:C:\WINNT\SYSTEM32\Calc.exe","Application Path"))
WorkingDirectory = ucase(InputBox("Enter path to application directory" & VBCRLF & VBCRLF & "Example: C:\WINNT\SYSTEM32","Application Working Directory"))
strWinMgt = "
winmgmts://" & strComputerName & ""
'
' Get Computer/User Info
'
Set CompSysSet = GetObject(strWinMgt).ExecQuery("select * from Win32_ComputerSystem")
for each CompSys in CompSysSet
strDescription = CompSys.Description
strModel = CompSys.Model
strName = CompSys.Name
strManufacturer = CompSys.Manufacturer
strUserName = CompSys.UserName
next
CompInfo = "Computer Information" & VBCrLf & VBCrLf
CompInfo = CompInfo & "Computer Name: " & strName & VBTab & "User: " & strUserName & VBCrLf
'connect to processes
Set Process = GetObject(strWinMgt).Get("Win32_Process")
'start app
RetVal = Process.Create (AppPath,WorkingDirectory,null,PID)
'if 0 not returned error
if RetVal <> 0 then
MsgBox "Error: " & Err.Description & ":" & Err.Number
else
'build ProcessInfo string
Set Processes = GetObject(strWinMgt).ExecQuery("select * from Win32_Process where ProcessID = " & PID)
for each Process in Processes
RetVal = Process.GetOwner(strUser,strDomain)
ProcessInfo = "Name: " & Process.Caption & VBTAB & "ProcessID: " & PID & VBCRLF
ProcessInfo = ProcessInfo & "Process Owner: " & ucase(strDomain) & "\" & ucase(strUser) & VBCRLF
next
'display info about computer and process
RetVal = MsgBox (CompInfo & VBCRLF & VBCRLF & "Application started." & VBCRLF & VBCRLF & _
ProcessInfo,VBOKOnly,strComputerName & " - Start Application")
end if
msgbox "Done!!"