LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 630 users online 211537 members 1246 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
DaisyMontana
Interests: Having oral with Nick Jonas
Mood: Euphoric
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
7 online / 24 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic

Run a .vbs on a remote PC
Can't run a vbscript program on a remote PC
Replies: 2Last Post May 6, 2006 5:42am by squirellplayingtag
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Single page for this topic Email Print Favorite
( mary21 )


Novice
Reply
Hi,

I'm new to VBscript and trying to get MyProgram.vbs to run on a remote PC but it wont do anything....the program runs fine on my local machine, any help would be much appreciated...here's the code I have for running a remote program:


'==========================
'Remote.vbs
'==========================

Const OverwriteExisting = TRUE

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "C:\Scripts\MyProgram.vbs", _
   "\\remoteIPAddress\C$\Scripts\",OverWriteExisting

strComputer = "remoteIPAddress"

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process")

Error = objWMIService.Create("c:\scripts\MyProgram.vbs", null, null,intProcessID)

If Error = 0 Then
       MsgBox (strProcess & " was started with a process ID of " & intProcessID & ".")
   
Else
       MsgBox (strProcess & " could not be started due to error " & _
       errReturn & ".")
   
End If

=================================

So it does copy the program to c:\Scripts of the remote PC but it wont run the program...I do believe that it kicks of a wscript process in the process list on task manager.  Please help :)


10:56 am on April 15, 2005 | Joined: April 2005 | Days Active: 2
Join to learn more about mary21 Ireland | Posts: 2 | Points: 22
Post from this position was omitted due to content violations
squirellplayingtag


Dairy Product Addict

Patron
Reply
Have you checked if the remote machine has .net installed?

-------
"The most abundant element in the universe is
hydrogen, then second is stupidity."-Harlan Ellison
"What good fortune for our governments that the
people do not think."-Hitler

5:42 am on May 6, 2006 | Joined: Jan. 2003 | Days Active: 1,260
Join to learn more about squirellplayingtag Maryland, United States | Straight Male | Posts: 6,458 | Points: 27,128
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic