Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 16th, 2005, 08:14 AM
irish_lassie irish_lassie is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 1 irish_lassie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 6 sec
Reputation Power: 0
Run a .vbs on a remote PC

Hi,



I'm new to VBscript and trying to get MyProgram.vbs(which list all software installed on a PC) to run on a remote PC but it wont do anything....the program runs fine on my local machine,and it runs fine on the remote PC if I run it from there, but it wont work when I try remotely, 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

Reply With Quote
  #2  
Old April 16th, 2005, 12:27 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 48 m 4 sec
Reputation Power: 8
Do you do have appropriate NTLM/Kerberos permissions to do this?

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Run a .vbs on a remote PC


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT