Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Re: Using variables to copy files

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,2622
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Re: Using variables to copy files
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
 Re: Using variables to copy files - 4/9/2005 12:31:03 AM   
  holtitan

 

Posts: 26
Score: 0
Joined: 3/28/2005
From:
Status: offline
The target is running W2K with WSH 5.6. I already set the remote bit to 1 and re-booted the box. I can run :

Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("executeprogram.vbs", "computername")
RemoteScript.Execute

Do While RemoteScript.Status <> 2
WScript.Sleep 100
Loop

______________________________________________________________________
dim wshobject
set wshobject=wscript.createobject("wscript.shell")
MsgBox ("test")
wshobject.run ("C:\winnt\system32\calc.exe")

______________________________________________________________________

without a problem. So I know that the remote execute is working. Of course the calculator doesn't pop up on the remote machine. However, a calc.exe process is started on the remote machine. Hmmmm..... I'm not doing something right...

(in reply to holtitan)
 
 
Post #: 21
 
 Re: Using variables to copy files - 4/9/2005 9:14:24 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
Replace:

wshobject.run ("C:\winnt\system32\calc.exe")

with:

wshobject.run "C:\winnt\system32\calc.exe" ,1

(in reply to holtitan)
 
 
Post #: 22
 
 Re: Using variables to copy files - 4/10/2005 8:31:38 AM   
  holtitan

 

Posts: 26
Score: 0
Joined: 3/28/2005
From:
Status: offline
What does the ",1" do?

(in reply to holtitan)
 
 
Post #: 23
 
 Re: Using variables to copy files - 4/10/2005 10:55:56 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
So that the calculator will be shown on the desktop.

(in reply to holtitan)
 
 
Post #: 24
 
 Re: Using variables to copy files - 4/11/2005 3:47:52 AM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
when you remotely execute scripts you wont ever get any output unless you have it log to file then retrieve the log files. its like a scheduled task in that respect, also make sure you dont have any msg boxes(use cscript) or the script will wait for someone to click the ok.

(in reply to holtitan)
 
 
Post #: 25
 
 Re: Using variables to copy files - 4/11/2005 6:34:30 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
I was just wondering when I got an error of "permission denied" when I use msgbox though :\

Any ideas ?

(in reply to holtitan)
 
 
Post #: 26
 
 
Page:  <<   < prev  1 [2]
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Re: Using variables to copy files Page: <<   < prev  1 [2]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts