Shaba1
(Fresh Scripter)
2005-09-15 01:58 AM
Finding out if a particular service is running WIN98

I need to find out in the log on script that I use for my windows 98 machine IF the my antivirus network communication program is running.From what I can tell it runs as a "service" on windows 98. If so I want to skip the part of the script that copies it from the netlogon share and starts it running. I know that I could probably do that on an 2000 or xp machine easily but since 98 machines have not active services manager how would I get kix to sense if the service is running

LonkeroAdministrator
(KiX Master Guru)
2005-09-15 02:48 AM
Re: Finding out if a particular service is running WIN98

well, I'm not sure if there even is such concept as service in win9x.

but you could look for running process, I think.


Roberto_Koempel
(Fresh Scripter)
2005-09-15 01:37 PM
Re: Finding out if a particular service is running WIN98

I'd check on files on the target computer and presume that if the files are there that the "service" is running too.
You could also put a batch-file into the autostart-folder of the machine in question, if you're sure that the program is not running and don't want to run there personally.
In that case the job would start the next time the user logs on.

Another, more complicated, way is to check on the registry if a certain run-key is set and, if not, copy the files and write the registry keys in question.


zxcv
(Lurker)
2005-09-19 11:33 AM
Re: Finding out if a particular service is running WIN98

wut does kix exact mean?

LonkeroAdministrator
(KiX Master Guru)
2005-09-19 11:36 AM
Re: Finding out if a particular service is running WIN98

kix exact?
why you ask?


Shaba1
(Fresh Scripter)
2005-09-19 09:09 PM
Re: Finding out if a particular service is running WIN98

Quote:

well, I'm not sure if there even is such concept as service in win9x.

but you could look for running process, I think.




How would you check for running processes. I looked in the manual and did not see a function or macro that seems to do that. The closest I can come is checking for the resistry key and after that the next closest is checking for the file.


NTDOCAdministrator
(KiX Master)
2005-09-19 09:34 PM
Re: Finding out if a particular service is running WIN98

Do the Windows 9x systems have WMI installed on them? If not then you'll have to use a 3rd party tool.

One that supports Windows 9x and is free can be found here.
http://www.teamcti.com/pview/

If they have WMI installed then you can write a script or check out one of the UDFs on the board here to check out if the application is running or not.


Mart
(KiX Supporter)
2005-09-19 09:35 PM
Re: Finding out if a particular service is running WIN98

Maybe this will help. Not tested it cause I don't have 9x running.
EnumProcess() - enum specific process PIDs and/or terminate them
You will need WMI for this.


Shaba1
(Fresh Scripter)
2005-09-20 11:55 PM
Re: Finding out if a particular service is running WIN98

I went to technet and could not make heads or tails of their WMI page. Mostly the page talked about if one wanted to PROGRAM the API for wmi. Nothing about a simple install of it on 98 machines. I assume that my machines do have WMI,because I just did a search and found wmiexe.exe and wmi.dll as well as several other files in the C:\windows\systems directory. I do have pview. I downloaded it onto the machine at my desk just to see what was running. I can do a push of pview out to all the other 98 machines via the logon.kix script if I have to.

NTDOCAdministrator
(KiX Master)
2005-09-21 12:07 AM
Re: Finding out if a particular service is running WIN98

Well writing WMI scripts is not too difficult thanks to tools like scripto-matic and UDFs here on the board.

Basically find what you're wanting to find and using a UDF plug in the parameter the UDF wants.

Take a look here for ideas/methods to confirm WMI installation. There should be a WBEM folder if it's installed. Something like this: C:\WINDOWS\SYSTEM\WBEM with some files in the folder.

If they don't have WMI then PV.EXE and extracting it's output could work as well. One could also do some checking with stuff like If Exist and check that the file and program are on the system, check that their is an entry in the Registry or in the Startup group to run the application and from there on a Windows 9x one could "assume" it's working. Not as solid a method as WMI/PV but depends on how much coding skill you have and time to put into this.

ConfirmWMI
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=114011


2manyhats
(Fresh Scripter)
2005-09-24 07:24 AM
Re: Finding out if a particular service is running WIN98

From my 9x experience there will always be an entry in the registry under one of the run keys to start this pseudo service in a 9x environment. VNC is good example. Remove it and it won't start. Period.

2manyhats
(Fresh Scripter)
2005-09-25 08:53 PM
Re: Finding out if a particular service is running WIN98

Go to this link and download the WMI core 1.5. I was just there and downloaded it.

MS WMI Download Site

Good luck!

Kevin


2manyhats
(Fresh Scripter)
2005-09-25 08:59 PM
Re: Finding out if a particular service is running WIN98

In your opinion whats better and why. WMI or PV?

Kevin


Sealeopard
(KiX Master)
2005-09-26 02:47 AM
Re: Finding out if a particular service is running WIN98

Option #3: Getting rid of a non-supported operating system. Otherwise, WMI and a Win98 system properly set up for remote WMI access.

2manyhats
(Fresh Scripter)
2005-09-26 06:31 AM
Re: Finding out if a particular service is running WIN98

Yeah, I guess in a perfect world . Politics, politics, politics, oh... and money and politics, politics, politics & politics

PS. I've seen some insane hostility on the board looking at some other posts. So just to let you know at least one of us has a sense of humor until you start the mother jokes


LonkeroAdministrator
(KiX Master Guru)
2005-09-26 01:23 PM
Re: Finding out if a particular service is running WIN98

hmm...
good to know.
so I just skip the mother part and ...


2manyhats
(Fresh Scripter)
2005-09-26 06:20 PM
Re: Finding out if a particular service is running WIN98

Ok, it sounds like you've done this before. Do you know what the switches are and can it be installed silently. Don't see that info on the MS site. Haven't tried connecting remotely yet but the documentation sure makes this out to be a hassle. I see why 9x is a huge waste developmental resources.

K


LonkeroAdministrator
(KiX Master Guru)
2005-09-26 06:46 PM
Re: Finding out if a particular service is running WIN98

and btw.
the politics you should take is that win9x is a huge security risk and unpossible to maintain with current resources.
that's how many of us got rid of them.
try the proven tactics


Shaba1
(Fresh Scripter)
2005-09-30 12:16 AM
Re: Finding out if a particular service is running WIN98

Quote:

Do the Windows 9x systems have WMI installed on them? If not then you'll have to use a 3rd party tool.

One that supports Windows 9x and is free can be found here.
http://www.teamcti.com/pview/

If they have WMI installed then you can write a script or check out one of the UDFs on the board here to check out if the application is running or not.




Thanks NTDOC. I already have PVEIW on my server just to be able to check out some things. I can copy it from the netlog directory to each 98 machine then use it also to kill whatever spyware processes are running before I run spybot on the machine. I read the readme for it. It has a pretty robust commandline interface. Now I just have to figure out how to do the same things on the XP machines without having to add them to my domain. I have password protected the built-in local administrator account on those XP machines, but that's not actively logged in on any of those XP machines. Right now they are on my network but not added to the domain that I have the 98 machines on. The just use the network router(NAT) and firewall to access the INTERNET. But for security reasons and to stop all the damn spyware and adware that the users are downloading unknowingly and to be able to implement software restrictions they are going to be added to the domain really soon.