PC Review


Reply
Thread Tools Rate Thread

Unable to execute from remote computer

 
 
Lelle
Guest
Posts: n/a
 
      24th Nov 2004
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute a pass-through query from a remote computer claudiaidm Microsoft Access Queries 0 4th Nov 2008 12:34 AM
Is there a way to execute a DosBox batch script on the remote computer? mr_ravi_patil@yahoo.com Windows XP Work Remotely 0 4th Feb 2007 01:44 PM
Is there a way to execute a DosBox batch script on the remote computer? mr_ravi_patil@yahoo.com Windows XP Work Remotely 0 4th Feb 2007 01:02 PM
unable to restart services to a remote computer using computer management console Karthik Microsoft Windows 2000 0 26th Aug 2004 05:23 PM
unable to restart services to a remote computer using computer management console Karthik Microsoft Windows 2000 0 26th Aug 2004 05:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 AM.