Solved

How to develop a Service for Win95

Posted on 2000-03-29
12
200 Views
Last Modified: 2013-11-20
As we can develop services for WinNT workstation. How can I develop an application that works as a service for Windows 95 Operatining system
0
Comment
Question by:imtiazahmad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
  • +1
12 Comments
 

Author Comment

by:imtiazahmad
ID: 2668113
Plese give me the code if any one know how to develop Service for WIN95
0
 
LVL 6

Expert Comment

by:snoegler
ID: 2668733
Because Win95 has no security levels, and no access restrictions, there is no need for services. Every app without user interaction which is launched at startup (HKLM\Software\Microsoft\Windows\CurrentVersion\Run) acts like a service
0
 

Author Comment

by:imtiazahmad
ID: 2669468
What I need is like a service in WIn NT is running continuously from the system start-Up I want to have an application which will start at the startup and execute in seperate thread. If U have any idea about this please let me knowledgable
0
Do you have a plan for Continuity?

It's inevitable. People leave organizations creating a gap in your service. That's where Percona comes in.

See how Pepper.com relies on Percona to:
-Manage their database
-Guarantee data safety and protection
-Provide database expertise that is available for any situation

 
LVL 32

Accepted Solution

by:
jhance earned 25 total points
ID: 2669620
Win95 has the ability to start a program as a "service".  Create a registry key value at:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices

The name of this key can be anything and the value of the key is a command line string (i.e. pathname to a program) that will get run when Windows boots.

Generally programs started here either hide their window (use ShowWindow(SW_HIDE) or display themselves in the system tray.

There are not services in the same context as an NT Service but you can accomplish similar things using them.  Be aware also that unlike NT, there is no restriction on who can install or remove services from this registry key.
0
 
LVL 1

Expert Comment

by:MT_MU
ID: 2670544
One other comment...

Check out the function

RegisterServiceProcess (Win95/98 only)
0
 

Author Comment

by:imtiazahmad
ID: 2673329
OK lets forget about the service
I would like to know how to write an application which executes itself after some specified period of time delay
0
 

Author Comment

by:imtiazahmad
ID: 2673423
OK lets forget about the service
I would like to know how to write an application which executes itself after some specified period of time delay
0
 
LVL 6

Expert Comment

by:snoegler
ID: 2673540
Hmm ...
Why don't you write a small .EXE which gets loaded every startup (HKLM\Software\Microsoft\Windows\CurrentVersion\Run), which checks if the delay you want has passed - and if so, it launches your 'real' app.

You could also use the interfaces to the task planner, but it is only available on newer windows versions.

0
 

Author Comment

by:imtiazahmad
ID: 2678903
Can yiu give me asample for the which can launch itself after some delay
0
 
LVL 32

Expert Comment

by:jhance
ID: 2679532
Only Windows NT & 2000 have a scheduler that you can use to run at a particular time.  If you need to delay an app's startup, you can do something like:

main()
{
   // Delay before starting up
   Sleep(5000);

etc...

}

If you need a longer delay that is possible with Sleep, put it in a look and call it enough times to generate the delay you need.
0
 

Author Comment

by:imtiazahmad
ID: 2684171
I want to have this application run on Windows 95 / 98 without any scheduler
0
 
LVL 32

Expert Comment

by:jhance
ID: 2684239
So what in the world _DO_ you want.

This question has been completely answered.  Note:


Item 1:

>Win95 has the ability to start a
>program as a "service".  Create a
>registry key value at:

>HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices

Item 2:

>RegisterServiceProcess

Item 3:


main()
{
   // Delay before starting up
   Sleep(5000);

etc...

}



What _ELSE_ do you need?
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question