Solved

running an .EXE befor logon on 3.51WKS

Posted on 1997-07-04
4
235 Views
Last Modified: 2013-12-28
dos any one know the registry key for running an .EXE
befor user logon?
(On win95 the key is
 Local_machine/softwere/micro$oft/wondows/curentVertion/run
 -or .../runonce .../runservice .../runserviceonce
 but on nt it is differnt.)
0
Comment
Question by:etamir
  • 3
4 Comments
 
LVL 2

Accepted Solution

by:
gantriis earned 120 total points
ID: 1779519
Hi etamir.

Usually you would write a Windows NT service that will be set to start automatically in order to accomplish this.

However, the Windows NT resource kit contains a utility - SRVANY - that will help you to run a usual .EXE or .BAT file as a service. This means that the file can be set to start execute before any users logs on to the system.

The resource kit files you will need are:
SRVANY.WRI: Documents what you should do.
SRVANY.EXE: Helps you run a usual EXE as a service.
INSTSRV.EXE: Helps you install the SRVANY service.

I have copied a few useful points from the SRVANY.WRI file below:

The benefits of SRVANY include:
- allow apps to survive logoff/logon sequences, hence saving the overhead of re-starting them for each new user
- allow server apps to come-up and service requests even when no user is logged-on
- allow apps to run and perform a task in a specific logon account, different from the currently logged-on user

Installation:

- Copy SRVANY.EXE to your system and install it as a Windows NT service, for example:
      INSTSRV MyService c:\tools\srvany.exe
- configure via the Services applet ("Startup..." dialog) of the Control Panel as manual or automatic, as appropriate.
- set via the Services applet ("Startup..." dialog) of the Control Panel the account for the service. If you need access to the screen & keyboard, you must choose the LocalSystem account and click the "Allow Service to Interact with Desktop", otherwise choose any account and specify the correct logon password. Note that the LocalSystem account doesn't have network access.

Specifying the application to start & its parameters:

Run the Registry Editor (REGEDT32.EXE):
- under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyService: create a 'Parameters' key
- under the above key, create an 'Application' value of type REG_SZ and specify there the full path of your app executable (including the extension). For example:
       Application: REG_SZ: D:\TOOLS\VI.EXE
 - OPTIONAL: under the above key, create an 'AppParameters' value of type REG_SZ and specify the parameters for your app. For Example:
      AppParameters: REG_SZ: C:\TMP\FOO
- OPTIONAL: under the above key, create an 'AppDirectory' value of type REG_SZ and specify the current directory to use for the app, eg:
      AppDirectory: REG_SZ: C:\TMP


Hope this answers your question.

Cheers
JG
0
 

Author Comment

by:etamir
ID: 1779520
thanks!
can you just Email me SRVANY.WRI, SRVANY.EXE and NSTSRV.EXE ?
or at least tell me where I can get them.
I do not have a way to get the Windows NT resource kit.
I will apreciate it if you could send me the files..
my work Email is <eliezer at actcom.co.il> and I can dounload very big files if nessesry.
0
 

Author Comment

by:etamir
ID: 1779521
Adjusted points to 125
0
 

Author Comment

by:etamir
ID: 1779522
Thanks for the answer !
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

810 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