Page 1 of 1 1
Topic Options
#121402 - 2004-06-17 08:37 AM Q - How to create a service with KiXtart?
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Guys,

I need to create a service on remote clients. And of course I'd like to do this with the help of KiXtart.

The service needs to run a KiX script which checks every 10 minutes or so if there's a job file waiting in a local folder.

Challenge is how do I create a service on all my clients within a certain IP Range (10.0.1.1 - 10.0.2.255).

_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#121403 - 2004-06-17 08:46 AM Re: Q - How to create a service with KiXtart?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
REMOTEXEC.EXE from the Resource Kit should cover what you need. If you want to create your own service, you may also need - SRVANY.EXE, and INSTSRV.EXE. Now, for the code.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#121404 - 2004-06-17 08:51 AM Re: Q - How to create a service with KiXtart?
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Will dig in the reskit.

I knew about srvany etc.. Could it be done without remotexec. Is a service anything else than some local files and an entry in HKLMSCCS\Services?
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#121405 - 2004-06-17 09:01 AM Re: Q - How to create a service with KiXtart?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
srvany is your starter, true.
but then, why remoteExec when you can do "Xnet install"?
_________________________
!

download KiXnet

Top
#121406 - 2004-06-17 09:05 AM Re: Q - How to create a service with KiXtart?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Lonk,

He did say remotely install, right?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#121407 - 2004-06-17 09:09 AM Re: Q - How to create a service with KiXtart?
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Yep,

remotely. I thought it was searching my subnet for active workstations, copy some files to it, tweaking the registry and at next reboot the service would start...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#121408 - 2004-06-17 09:44 AM Re: Q - How to create a service with KiXtart?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, what is wrong with:
xnet install \\somebloodymachine\somebloodymyownservice ?
_________________________
!

download KiXnet

Top
#121409 - 2004-06-17 09:45 AM Re: Q - How to create a service with KiXtart?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Code:
XNET 1.07


Usage : XNET INSTALL [[\\Server\]ServiceName] [/b:Binary] [/d:Dependencies] [/l:LoadOrderGroup] [/n:DisplayName] [/u:User] [/p:Password] [/i:Interactive] [/s:StartType]

ServiceName - name of service, optionally preceded by name of remote
machine (eg : \\REMOTE\MSSQLServer).
Binary - name of executable.
Dependencies - dependencies of service.
Interactive - specify Yes or No to allow service to interact with desktop.
LoadOrderGroup - LoadOrderGroup of service.
DisplayName - 'Long' name of service (aka DisplayName).
User - name of (domain) user account to assign to service. Specify
'LocalSystem' to assign system account.
Password - Password for service.
StartType - indicates when a service will be started. Possible values
are 'auto' (started at system startup), 'demand' (started
at user request) and 'disabled'

_________________________
!

download KiXnet

Top
#121410 - 2004-06-17 01:26 PM Re: Q - How to create a service with KiXtart?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why a service? Why not set up a scheduled task?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#121411 - 2004-06-17 02:03 PM Re: Q - How to create a service with KiXtart?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
service is neat.
service can be set up easily and forgotten.
service is something most ppl won't tamber with.

not sure on client workstations but on servers, services are sooooo cool
_________________________
!

download KiXnet

Top
#121412 - 2004-06-17 03:05 PM Re: Q - How to create a service with KiXtart?
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Why?

see SWAP - Start With Admin Powers
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#121413 - 2004-06-17 03:13 PM Re: Q - How to create a service with KiXtart?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
One limitation I can see with both service as well as tasks. If you use a domain account.. If the account password changes, you have to change the password in the service or in the task too..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#121414 - 2004-06-19 09:08 AM Re: Q - How to create a service with KiXtart?
ChristopheM Offline
Hey THIS is FUN
*****

Registered: 2002-05-13
Posts: 311
Loc: STRASBOURG, France
with sc from the resource kit, you can do what you want with services (create, modify, delete, stop, start, query).

there is also FileNotify which is certainly more optimized that a kix script as a service :
  • this tool is provided to run as a service (filenotify -install)
  • configuration is in a .txt file (in the program directory)
  • you decide what object you scan (directory, file), what event perform an action (create, delete, modify, rename, change attribute, change security) and what action to do (define the commandline to execute so you can start a kix script)
  • the service reacts when the event occurs. There is no polling.

if your script may access to network resource, you should change account and password of the service because by default, it runs with the local system account.

so, if files are available on the remote computer, you can (for example) start a job with psexec that execute :
filenotify -install
net start filenotify

when you want to change the configuration, execute remotely a script that stops the service, copy a new version of the config file filenotify.txt and restarts the service.
_________________________
Christophe

Top
#121415 - 2004-07-12 12:36 PM Re: Q - How to create a service with KiXtart?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nice to hear microsoft has been able to produce replacement for xnet.
or?
does it support remote?
_________________________
!

download KiXnet

Top
#121416 - 2004-07-13 02:31 PM Re: Q - How to create a service with KiXtart?
Rory Daniels Offline
Getting the hang of it

Registered: 2003-02-25
Posts: 64
Loc: Bristol, UK
You can use my WMIChangeService() Function just posted on UDF forum to Change the user and password if required.

Rory

WIMChangeService()

Top
#121417 - 2004-07-13 05:13 PM Re: Q - How to create a service with KiXtart?
Rory Daniels Offline
Getting the hang of it

Registered: 2003-02-25
Posts: 64
Loc: Bristol, UK
Just posted a function for creating services using WMI.
WMICreateService()

Cheers

Rory

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.069 seconds in which 0.027 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