PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Unable to execute from remote computer

Reply

Unable to execute from remote computer

 
Thread Tools Rate Thread
Old 24-11-2004, 05:26 PM   #1
Lelle
Guest
 
Posts: n/a
Default Unable to execute from remote computer


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


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off