Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

HKLM\ RunOnce does not run until login

Posted on 2004-09-24
11
Medium Priority
?
7,729 Views
Last Modified: 2010-05-18
I have enter the command c:\firstrun.cmd into the HKLM\Software\Microsoft\Windows\CurrectVersion\Runonce key and the program only runs after loggin in I want it to run before login any ideas
0
Comment
Question by:stephanjenner
[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
11 Comments
 
LVL 10

Expert Comment

by:Longbow
ID: 12141031
If these are 16 bit (dos) programs you can run them from autoexec.nt (see the Windows Resource Kit)
If these are 32 bits you can make a service with them :
http://www.firedaemon.com/
0
 
LVL 31

Expert Comment

by:merowinger
ID: 12141327
the programs under runonce will only run one time, are you sure you want these key???

mero
0
 
LVL 6

Expert Comment

by:jthow
ID: 12141411
stephanjenner,

You can start an application at the services loading phase before logon by adding it to the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurretnCOntrolSet|Control\Session Manager\BootExecute

The default entry is autocheck autocheck *

Autocheck is the boot time version of Chkdsk, the wildcard * causes an automatic check of each partition.

Before editing the registry, make sure you have a current Emergency Repair Disk for your system and that you have backed up the registry files.

JohnT
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:beem4n
ID: 12142608
Hi,

i suggest you to use "Application as service"

it has the following abilities:

- Launch any application as Windows NT/2000/XP/2003 service
- Launch your application at system boot, before user logon
- Runs executable: 16 bit (Dos, Windows, OS/2), 32 bit, batch files, scripts (VBScript, JScript) as a service
- Run your application without the need of a user session
... and more , visit their URL and take a glance:

http://www.eltima.com/products/application-as-service/
0
 

Author Comment

by:stephanjenner
ID: 12144158
I do need to run this just once it is a script to add the machine to the domain so runonce is perfect for me the bootexec will that run .cmd files and will it have network access at this time also whats the format

Cheers
0
 
LVL 10

Expert Comment

by:Longbow
ID: 12146417
Why to run it before login ?
Do you use this script after cloning the computer ?
In this case use AutoAdminLogon and run the script from RunOnce.
For security reason you can encrypt the script.

If it is your case you can give these details in the original question.
Because we can give other solutions.
0
 
LVL 10

Expert Comment

by:Longbow
ID: 12146968
Here is a thread about the suggest you post here :
http://www.experts-exchange.com/Operating_Systems/WinNT/Q_20458875.html
0
 

Author Comment

by:stephanjenner
ID: 12148421
Yes I ru n the script after cloning to add the computer to the domain there is 2 parts to the script one is firstrun.cmd which executes joindomain.vbs the vbs grads the computer name and then joins the domain usining netdom. then firstrun.cmd deletes the scipt leaving no passwords etc behind. I could run an auto login I guess then delete the registry key as well as the script? Any other ideas.

0
 
LVL 10

Accepted Solution

by:
Longbow earned 1000 total points
ID: 12148585
I can suggest to run the vbs script from HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
or from the Startup directory in the profile.
The last line of the script can be a "delete" command
 or a line wich delete the key in the registry.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogon
Add/Modify these keys :
AutoAdminLogon=1
DefaultPassword=AdminPassword
DefaultUserName=AnAdminAccount

You can encrypt your .vbs file.
It will become a .vbe
So do not forget to change any instance .vbs to .vbe in your script.
Script Encoder Link :
http://www.microsoft.com/downloads/details.aspx?FamilyId=E7877F67-C447-4873-B1B0-21F0626A6329&displaylang=en

I created a .vbe with at least thousand lines.
Each ghosted PC can send me a mail before it shutdown.
So i know the subject ;-)
0
 

Author Comment

by:stephanjenner
ID: 12149514
Thanks excellent advice will utilize it
0
 
LVL 10

Expert Comment

by:Longbow
ID: 12149798
Thanks. I know ;-)

If you are not hear the computer wich is cloned you can add some lines to disable the keyboard and mouse from the script.
For some reason (network problem) the script can stops and a user can have access to your script.
You can know a vbe script can be decoded.
But that's for another question.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

610 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