Solved

How to develop a Service for Win95

Posted on 2000-03-29
12
194 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to calculate times for developing software? 8 65
Process filename extension 3 172
Best tools for Backup and restore of Wordpress site 6 55
Change to event 1 99
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

929 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now