PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework
Unable to execute from remote computer
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework
Unable to execute from remote computer
![]() |
Unable to execute from remote computer |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello!
i have a problem when i tries to execute a program from my webserver. if i sit on my pc as in this case even is the webserver then i can run program on other computers through this code im using psexec.exe from sysinternals "Public Sub runcommand(ByVal FileToExecute As String, ByVal Computername As String, ByVal parameters As String) Dim processClass As System.Management.ManagementClass = New System.Management.ManagementClass("Win32_Process") Dim inParams As System.Management.ManagementBaseObject = processClass.GetMethodParameters("Create") inParams("CommandLine") = FileToExecute Dim outParams As System.Management.ManagementBaseObject = processClass.InvokeMethod("Create", inParams, Nothing) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim psexecinteraktiv As String = "c:\Inetpub\wwwroot\Test\Tools\psexec.exe -i" & " \\" & Me.tbcompname.Text & " " & Me.tbparam.Text Me.lblshowString.Text = psexecnormal End If runcommand(psexecnormal, "", "") Me.lblshowString.Text = psexecnormal End Sub this works fine from the server on other computere but not from other computers to same computers that works from server. i have impersonated the user and im admin on all PC trying to reach i can from other computers run another script that just creates a folder on the webserver throug the same code. hope i have explaind the problem good enough for someone to give me a hint |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

