Link to home
Start Free TrialLog in
Avatar of Xces
Xces

asked on

Removing Services from command prompt

I have a problem, we have a network with servers NT and Novell, each workstation has Novell Client, there are almost 1000 workstation, we need remove the Novell Client and install it Client services for Netware, I tried with SMS Installer but it didn't work, my question are, How I can remove from command prompt a service?, and the next question is, How I can install a service (Client Service for Netware) from command prompt?, the main idea is write it in a program and run from the logon script.

Thanks
Avatar of jkr
jkr
Flag of Germany image

Well, most services follow the convention to install or remove themselves when a command line switch as "-install" or "-remove" is given. You might want to try that for your services. It's just

"<service's executalble>.exe -install"

or

"<service's executalble>.exe -remove"

respectively..
Avatar of Xces
Xces

ASKER

Ok, but, What is the executable of Client Services for Netware?
Avatar of Xces

ASKER

Ok, but, What is the executable of Client Services for Netware?
Someone from here mailed me a command that could do this, SERVICE.EXE.
If you post up your email address, I'll send it to you.

SERVICE version 1.09 (Oct 18 1999)
usage: service <computer name> <operation> [ <service name> ]
       [ <command line> ] [ <display name> ] [ /u[ser] user ]
       [ /d[epends] dependencies ].
       operation = inst    to install and start a new service
       operation = instm   to install a new service (starts manually)
       operation = start   to start the service
       operation = stop    to stop the service
       operation = restart to restart the service
       operation = remove  to remove the service
       operation = auto    to configure the service/auto start
       operation = manual  to configure the service/manual start
       operation = disable to configure the service/disabled
       operation = depends to change the service dependencies
       operation = stat    to get the status of an existing service
       operation = listw   to list Win32 services in database
       operation = listd   to list Driver services in database
       operation = list    to list both Win32 & Driver services in database
use - instead of <computer name> to run this command on local computer.
The service name is required for the start, stop and remove options.
The command line is required for install a new service.
If not specified, the display name of the service is the service name.
The /d or /depends option allows to specify the service dependencies.
The /u or /user options allow to specify a identification user name.
In this case, you must enter a valid password when prompted.
In the NT resource kit there's a program called xnet which will do the job for you looks the same like Tim's service.exe. However when you have 1000 workstations you will use technet (which contains a copy of NT4 resource kit :))

>>Ok, but, What is the executable of
>>Client Services for Netware?

You can find this out by taking a look at

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

and looking for the clear text name of the service. The 'ImagePath' value contains that name...
Avatar of Xces

ASKER

Tim_Holman, this is my email address, jmsantimi@hotmail.com, thanks a lot
Avatar of Xces

ASKER

jkr, yes, but the problem is that the service is started with NTws.sys and I cant run the command -remove
Avatar of Xces

ASKER

I installed Resource Kit and I didn´t find the command that you say, there is a command called Srvinstw.exe but is not that I need.
Do you need to remove the service from many workstations (remote) or from a single (or few) workstations locally??
Avatar of Xces

ASKER

Almost 1000 workstations with Intranetware Client and install them Client Services for Netware
When a user has admin rights on the workstation, you can write a script that uses kill.exe from the NT-reskit to kill all active processes that have to do with your service.
Then just delete the files and corresponding registry key's in HLM\SYSTEM\CurrentControlSet\Services.
But I guess they don't have.
You can approach this in different ways.
If the scheduler service is started you can that take care of it. Just create a script as stated earlier, copy it to the WS during a logonsession and let SMS take care of adding the script using the soon.exe command from the NT reskit.
Or you can use SMS for installing a service on every workstation using srvany and instsrv together with sc.exe that runs under an administrative account, and then let this service run a central managed script (stored on the netlogon of a DC) to perform the deinstallation.
For the installation, the same service can be used, but with a different script.
You could try Wise install to make a package that installes the new client in silent mode.
Wise can install most types of services, as long as no extra protocols are needed.
Did you get the file OK ?
Did it work ?
ASKER CERTIFIED SOLUTION
Avatar of Tim Holman
Tim Holman
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial