Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-06-2003, 12:28 PM   #1 (permalink)
moremonks
Registered User
 
Join Date: Jun 2003
Posts: 9
moremonks is on a distinguished road
Remote Execution

Not entirely C++ related, but I feel that the answer (if any) is probably going to be more related to C++ than anything else. Does anyone have any idea how to execute a file, or simply run any command on a remote machine? It seems very simple, but I simply cannot figure out how to do this. Also, the environment is one in which I have admin privileges on all machines, so permissions shouldn't be a problem. Thanks in advance.
moremonks is offline   Reply With Quote
Old 06-06-2003, 01:10 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,529
sde is on a distinguished road
what type of operating systems are we talking here? i know if you have a web server running on the remote machine, it would be very easy to use php or perl/cgi to execute a file through a web browser.
__________________
Mike
sde is offline   Reply With Quote
Old 06-06-2003, 06:09 PM   #3 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
ssh user@host "/usr/local/bin/mycommand -asdf"
joe_bruin is offline   Reply With Quote
Old 06-10-2003, 09:01 AM   #4 (permalink)
moremonks
Registered User
 
Join Date: Jun 2003
Posts: 9
moremonks is on a distinguished road
Sorry for the delay. Forgot I posted this. I'm talking about lots of win2k pro machines, and I've found a solution. A neat little VBScript thing that goes like this:

Set objLocator = CreateObject("WbemScripting.SWbemLocator")

Set objService = objLocator.ConnectServer ("nd001676", "root\\cimv2", username, password)
ObjService.Security_.impersonationlevel = 3

Set objInstance = objService.Get("Win32_Process")

status = objInstance.Create("c:\\depends.exe", null, null, intProcessId)



Thanks for the help though.username
moremonks is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Problem] Remote SQLServer CE ahan MS Technologies ( ASP, VB, C#, .NET ) 0 10-07-2004 08:28 PM
halt after execution Blaqb0x Standard C, C++ 2 09-07-2002 03:37 AM


All times are GMT -8. The time now is 01:14 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting