@echo off ::: Leave the "echo off" command on the first line! ::: This causes Windows 9x to close a DOS window when finished ::: NOTE: If you run this batchfile exactly as it is, it will place some ::: harmless entries in your Registry and win.ini, then delete itself. ::: This batchfile installs a value in any or all of 3 different locations ::: in the Windows Registry, which will then cause Windows to run the ::: specified application(s) at startup. ::: It places comparable commands in either of two lines in the win.ini ::: file with the same basic result. ::: It shows no visible feedback to the user, aside from a DOS ::: window that opens briefly then closes. ::: All filenames and descriptions in this file are for example only. ::: You'll want to change all instances of "infname.inf", ::: "Description of Your Choice" and "appname.ext" to whatever ::: is appropriate, and of course delete the lines you don't need. ::: I wrote this using several INF files as examples. I also looked up ::: Microsoft's page http://www.microsoft.com/hwdev/devdes/printerinf.htm ::: to find out how the UpdateIniFields syntax works. ::: Created Sunday, 13 Sept 1998 by pchelp@nwi.net ::: All rights cheerfully shrugged off. Enjoy. :::create the INF file::: echo [Version] >%windir%\inf\infname.inf echo Signature="$CHICAGO$" >>%windir%\inf\infname.inf echo. >>%windir%\inf\infname.inf echo [InstallThis] >>%windir%\inf\infname.inf echo UpdateIniFields=Ini.Entries >>%windir%\inf\infname.inf echo AddReg=Registry.Entries >>%windir%\inf\infname.inf echo. >>%windir%\inf\infname.inf echo [Ini.Entries] >>%windir%\inf\infname.inf echo win.ini,windows,load,,appname.ext >>%windir%\inf\infname.inf echo win.ini,windows,run,,appname.ext >>%windir%\inf\infname.inf echo. >>%windir%\inf\infname.inf echo [Registry.Entries] >>%windir%\inf\infname.inf echo HKLM,"Software\Microsoft\Windows\CurrentVersion\RunServices","Description of Your Choice",,"appname.ext" >>%windir%\inf\infname.inf echo HKLM,"Software\Microsoft\Windows\CurrentVersion\Run","Description of Your Choice",,"appname.ext" >>%windir%\inf\infname.inf echo HKCU,"Software\Microsoft\Windows\CurrentVersion\Run","Description of Your Choice",,"appname.ext" >>%windir%\inf\infname.inf :::end of INF file::: :::install the INF::: %windir%\rundll.exe setupx.dll,InstallHinfSection InstallThis 132 %windir%\inf\infname.inf :::quietly delete the INF file, no point keeping it::: del %windir%\inf\infname.inf>nul :::delete this batchfile::: ::: This will leave only a one-line batchfile, usually in the root dir of c:\ echo @del %0>%windir%\..\removethis.bat %windir%\..\removethis.bat