Link to home
Start Free TrialLog in
Avatar of PLEASE DELETE MY ACCOUNT AND ALL ITS DATA PLEASE DELETE MY ACCOUNT AND ALL ITS DATA
PLEASE DELETE MY ACCOUNT AND ALL ITS DATA PLEASE DELETE MY ACCOUNT AND ALL ITS DATA

asked on

Urgent! Windows AUTOSTART program

How can I make a program that starts automatically when you start windows? It can't be in the "Startup" folder. (May be WIN.INI autoexec=...? What's the code to modify it?).
Avatar of shlomoy
shlomoy

try editing AUTOEXEC.BAT and CONFIG.SYS
these have remained since MS_DOS.

some other startup places are:
startup folder, WIN.INI, SYSTEM.INI - but the INIs depend on the application...
in any case the CONFIG.SYS comes up first, and AUTOEXEC.BAT comes up befor the GUI.
Windows 3.1?
Sorry, I misunderstood.
If you don't wanna mess arround with the Register, then i suggest that you use [like stated up] the RUN parameter,

If you have Win3.x go to File Menu, then Run Submenu...
If you have Win 95 go to Start button, then Run menu...

Type SYSEDIT

then a set of windows will appear (the system files, like autoexec.bat, config.sys, Win.ini, etc) close the ones you're not going to moddify and select the one that says WIN.INI there should be some lines like:

    [windows]
    load=
    run=
    NullPort=None
    ...
    ...

In the line where says RUN= you type the name of the file you want windows to execute, if the file is not in the path then you should provide it too, like:

    [windows]
    load=
    run=C:\mydir\Myexefile.exe
    NullPort=None
    ...
    ...

:)
you should create a windows application for that since it would be easier to deal with INI files... you can still do it but a little bit harder.. read line by line (to save some memory, but slower) and then check the line, for whatever key you want to change... then just place your line there, and there you have it..

..-=ViKtOr=-..
ASKER CERTIFIED SOLUTION
Avatar of My name is Mud
My name is Mud

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>{This is where the WIN.INI file is located}
>>       WinIniName: String = 'C:\WINDOWS\WIN.INI';
>>       {This is the Command that you wanna add}
>>       ExeFileToAdd: String = ' C:\MYDIR\MYEXEFILE.EXE'; {Note the Space
>>     Before C:...}

That is not true on non-English version of windows... That's why I said you should use windows and then use GetWindowsDirectory() to get the Windows directory on non-English version of Windows.. that way the Ini fiel handling would be a whole lot easier.. try using Delphi.. there you can use the object TIniFile and do this in no time with less memory... the code would not be as much either ;) you can create a console as well...

..-=ViKtOr=-..
Vic that's easy, just seek the MSDOS.SYS, there's a line where windows is hidden... :)