Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to develop a Service for Win95

Posted on 2000-03-29
12
Medium Priority
?
205 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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 32

Accepted Solution

by:
jhance earned 100 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

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

569 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