Solved

How to develop a Service for Win95

Posted on 2000-03-29
12
195 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

785 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