I was wondering if there was a way to make it so that my qbasic program (that I compiled) starts up when Windows loads via editing the qbasic code. If so what would I put as the code? Thanks
There are others way to do it:
- one way is to edit your msdos.sys, but that means that your program will be used as a shell-program.
- one other way is to make a pif-file in windows say on your desktop. You will have to edit this file. Just for the record, I'm Dutch and I use Dutch programs but I will try to help you. If you make a pif-file from qbasic.exe or QB.exe and it is on your desktop, you click on it with your right mouse button and click in the menu on settings or something, it should be on the bottom of the menu. In the box with 'Target:' you see the path and exe file e.g. 'Target: c:\dos\qbasic.exe' this is it.
you change this to 'Target: c:\dos\qbasic.exe c:\path\programfile.bas' then you press OK and move it into your startup menu of the startmenu.
Ummm, if it's Win 3.x, you should NOT edit MSDOS.SYS nor IO.sys.
You'll need to edit the file Command.com and change it to start your "batch" file instead of autoexec.
(Note: your batch file doesn't need to have a .BAT extension either. ;-))
Then, conclude your "batch" file by simply CALLing or directly running AUTOEXEC.BAT from within it. That way, the user can change the autoexec all they want, but your batch will:
1) remain hidden [for lack of a better word] and unchanged [unless you change it], and
2) will always run prior to running autoexec.bat.
TO FuzzBall5:
There is a way (other than those mentioned above) that will work on Windows 3.x, 95, 98, 98se, and ME (I'm unsure about NT, XP or 2000 machines). But, you have not shown any interest nor responded since you initially posted this question. So, I will presume that you have found your answer elsewhere, and I'll leave it at that.
>Quebasic2 "In windows 98 and up, you can not use the autoexec.bat file to load progs when windows starts. It will not load it."
autoexec.bat will run compiled programs in autoexec before
windows shows the desktop. I have a birthday reminder program written in qb4.5 that pauses autoexec and informs me
of whose birthday is near -- "Send Card" each time I reboot.
(if no birthday is within 2 days, program doesnt display
anything or pause autoexec.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.