MSFN Forum: Execute a dos program as soon as possible on boot? - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Execute a dos program as soon as possible on boot? Rate Topic: -----

#1 User is offline   GrofLuigi 

  • GroupPolicy Tattoo Artist
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,160
  • Joined: 21-April 05
  • OS:none specified
  • Country: Country Flag

Posted 28 November 2008 - 04:54 PM

I have a commandline program that I want to execute on every boot (hdparm with some parameters, not decided yet on all, I just know I need - B 254 to stop the annoying HDD head parking clicks). The OS is Server 2003 used as a workstation.

Where to put it so it gets executed as soon as possible? From googling I think hklm/run, but maybe there's another more suitable place (I haven't found definitive info on startup order - does autoexec.bat come sooner or later)?

Thanks.

GL


#2 User is offline   weEvil 

  • n00b
  • PipPipPipPipPip
  • Group: Banned
  • Posts: 944
  • Joined: 21-August 06

Posted 29 November 2008 - 01:17 PM

Windows NT and newer parse Autoexec.bat on user login.

#3 User is offline   cluberti 

  • Gustatus similis pullus
  • Group: Supervisor
  • Posts: 10,936
  • Joined: 09-September 01
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 29 November 2008 - 11:14 PM

Setting it as a Machine Startup script in computer policy (gpedit.msc) is as soon as you're going to run this, unless you wish to do some research into how to run a command at boot time (like as seen with defragmenter program's boot time defrag, or pagedefrag from sysinternals).

#4 User is offline   os2fan2 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 390
  • Joined: 09-September 04

Posted 30 November 2008 - 01:48 AM

Windows NT only passes autoexec.bat for environment variables. You can't launch a DOS app from there.

The earliest you could launch a DOS app is at T39 (which is where the system environment is up and running, but the users are not yet created. In an install from cdrom, this happens after the post-character reboot. In a setup started by winnt32.exe, it is the reboot after the files are copied to the fixed disk.

#5 User is offline   GrofLuigi 

  • GroupPolicy Tattoo Artist
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,160
  • Joined: 21-April 05
  • OS:none specified
  • Country: Country Flag

Posted 30 November 2008 - 04:19 PM

I'm not asking about unattended, just everyday usage. Anyway, with this particular program it doesn't matter (i've put it in user's start menu startup), but I have another one that I want to be started as soon as possible. Also, I want to try my ideas of rearranging the order of startup programs.

I couldn't find definitive info on the exact startup order - for example, some kind of table - where it would say hklm/run first, then hklm/start menu, then hkcu/run... then startup scripts... then logon scripts...

Or maybe it isn't guaranteed - there is some paralelism and there is no guarantee which will come first? I often see the order of the tray icons changed in consequent reboot (and there is no icon hiding here :)) so that would mean some of the programs started faster/slower than before. One factor for this could be drive fragmentation, for example.

But, when I think about it, something has got to come first. :unsure:

I've read there are programs for this, but they insert delays - and I don't want that.

GL

* Edit - and what about the order of several items in one place (start menu, for example)? Who gets executed first? I read there is also no guarantee for this.

This post has been edited by GrofLuigi: 30 November 2008 - 04:23 PM


#6 User is offline   Mijzelf 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 447
  • Joined: 11-April 07

Posted 01 December 2008 - 06:32 AM

Quote

I couldn't find definitive info on the exact startup order
http://support.micro....com/kb/179365/

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy