LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 438 users online 224837 members 473 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
The Persuader
Interests: Computer technology,getting rid of ...
Mood: Tearful
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
5 online / 15 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Adding Reply

Quoting Post
Archived Topic: It will not be bumped to the top of the forum.
Topic Run a .vbs on a remote PC
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
mary21 Posted at 10:56 am on April 15, 2005
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 :)

Replies
squirellplayingtag Posted at 5:42 am on May 6, 2006
Have you checked if the remote machine has .net installed?
issy14 Posted at 2:34 am on May 6, 2006
Post from this position was omitted due to content violations
All 2 previous replies displayed.