Page 1 of 1 1
Topic Options
#156073 - 2006-01-26 08:26 PM How to run kix scripts remotely?
Jeff7492 Offline
Lurker

Registered: 2006-01-26
Posts: 3
General question. I am a newbie to kix but I have already found many scripts written by others that I'd love to use. I have run them and tested them locally on my pc so I know they work, but I want to run these scripts on the 50+ workstations in my building. I don't want to run them via logon scripts because these user don't logoff all too much and I don't need the scripts to run all the time, just gathering info on the workstations.

My question is:

Is there a way I can execute these kix scripts on the workstations from my command prompt?

I apologize if this has been discussed previously.

Thanks in advance,
Jeff

Top
#156074 - 2006-01-26 09:49 PM Re: How to run kix scripts remotely?
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
It all depends on what you want to do on the remote system. The task scheduler can also be told to execute a task on a specified time. This way you can run script using elevated privileges so you can get info a regular user cant get and you can specify when it should run.
There are lots of ways to get info from a remote machine. We would be able to give more specific help if you can say what you are after exactly.

Below is a simple example that reads the Service Pack version from pc1, pc2, pc3 and pc4.

Code:

$computers = Split("pc1~pc2~pc3~pc4","~")
For Each $computer in $computers
$rc = ReadValue ("\\" + $computer + "\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion")
?$rc
Sleep 1
Next

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#156075 - 2006-01-26 10:01 PM Re: How to run kix scripts remotely?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
You can run scripts remotely, all files must be on the remote computer. The scripts cannot contain any commands referring to network resources or group memberships.

It kind of depends on what you mean "run remotely" Are you trying to get information abour a remote PC, or are you trying to make the remote machine DO something?
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#156076 - 2006-01-26 10:02 PM Re: How to run kix scripts remotely?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well with some crafty coding you actually can run stuff from a network resource.
Top
#156077 - 2006-01-26 10:28 PM Re: How to run kix scripts remotely?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Golf anyone?
$computers = Split("pc1~pc2~pc3~pc4","~")

$computers = 'pc1','pc2','pc3','pc4'
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156078 - 2006-01-26 11:21 PM Re: How to run kix scripts remotely?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
$computers = Split('pc1 pc2 pc3 pc4')
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 1300 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.046 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org