Making sure a program ALWAYS runs....

I wrote this program that I want to run everytime I turn my computer on. I know that I can put it in the autoexec.bat but I have been having some troubles with that file recently. So is there any other way to make sure my program will run upon boot?
GreatOneAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mikecrCommented:
If your using Windows, you can put it into the startup group and it will run when Windows starts. The only other way to get it to start in Dos would be to use a call command in the autoexec.bat file to get it to run. I.e, @call c:\runnit.bat. Is this what your looking for?

Thanks,
Mike
0
GreatOneAuthor Commented:
I am trying to avoid putting stuff in my autoexec.bat file. Are you sure there is no other way?
0
mikecrCommented:
Unless you put it in Windows startup, NO! The bootstrap loader turns control of the PC over to the operating system which in turn automatically runs autoexec.bat and config.sys if they are available. You could create a boot menu that would run a different autoexec.bat file instead of the screwed up one, but there isn't any other way that I know of.

Thanks,
Mike
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

tyloxCommented:
You say you don`t want to add anything to your autoexec.bat
files, so all I can suggest is to add the program to your
windows "startup" group.This will launch the program every
time you`re running windows:
1)press "Start"
2)select "Settings", then "Taskbar", click-on "Taskbar"
3)press "Start menu programs" tab
4)press "add"
5)type-in the path to the program, eg;C:\windows\myprogram\my.exe
6)scroll down to folder called "StartUp"(NOT to be confused
with "Start Menu")
7)highlight this folder and press "next"
8)Select a name for your program
9)Pick an icon you like and press "Finish"
10)Press "OK" and you`re done! This program will now always
auto-start whenever Windows is running.

PS: If it`s a Dos program you want to always run, you`ll have to edit your autiexec.bat file;-)
0
Chris RipollMaster of NoneCommented:
One other way if running windows; create a winstart.bat file in windows directory. Will execute winstart.bat command before launching windows.

NO OTHER WAY!!

CR
0
tyloxCommented:
GreatOne,
   Am I correct in assuming that this program is DOS?If so,
will it run in a dos-window? I have, I THINK, one other way
for you to do this.It`s rather inelegant, sort of a "Rube
Goldbergish"-type of setup, but MIGHT allow your computer to
launch a dos-program upon start-up without editing/creating any autoexec.bat/dosstart.bat files. It`s only theory, but I
think it *might* work.It would help if we knew a little more
about the program you want to auto-start, and it certainly wouldn`t hurt to post your existing autoexec.bat file here
for analysis.By far, the easiest way, is for you to "call"
the program in your autoexec.bat files...if you are "having
problems" with your current file, maybe we can help solve
what might be an existing *problem*, so that you could go
forward and call the program in your autoexec.bat file in a
more "accepted" and S.O.P.-type of way, rather than bastard-
ize some other part of your system, just to get this program
to launch automatically.More info would be helpful;-)
0
GreatOneAuthor Commented:
Tylox,
You want more info, well here you go. I wrote a little program for DOS that will change the background if it is a certain date. I want to put this on my friends computer but don't want him to know its there. He has problems with viruses in the past and now always checks what files are on his computer. He particularly checks the contents of autoexec.bat and config.sys. If i were to put in the windows start up group, he would see it running and would probably think its a virus. So that's the info. What would you do?
0
rin1010Commented:

  If you have access to your "friend's" autoexec.bat file, look to see if he's launching anything that he doesn't absolutely need. (e.g., MSCDEX, SMARTDRV, DOSKEY) If so, rename your program to one of those, put it in the proper path... Well, you get the idea...  Might fool him for a while....

  If you've compiled it as a DOS program, and it's made to run in the background, do its thing and close, you might have to create a pif so it doesn't open a window. Regardless... your best bet, (if he ain't too sharp) is add it to the Run or Launch line in WIN.INI, or go with the WINSTART.BAT idea...
0
tyloxCommented:
Now that you`ve "come clean"<g>regarding what it is you really
want to do, the fact that you want to hide the program`s very
existance from an obviously paranoid and rather overly diligent
friend, pretty much eliminates doing what *I* had in mind.You
might as well reject my answer now, and put it back up for the
others to take a stab-at.Sorry I couldn`t help you:-(
0
rin1010Commented:

 Launch line? Meant to say Lunch line.

0
Dane PickeringCommented:
I am not sure if this is what you want, but this is the only place that no-one has mentioned (provided that you are using windows 95) follow these steps.


Click on start > run
type in REGEDIT and click ok
regedit will load up,
double click the following :-

HKEY_LOCAL_MACHINE
Software
Microsoft
Windows
CurrentVersion
Run

in here you will find a list of all files that are loaded by windows each time it is started up.  what you need to do now is right click your mouse button in the right hand panel
click on new and string
in name the string whatever you want.
after you make the string, highlight it and hit enter, you now enter the path/filename/paramaters that you want to run.

if you want to hide it as it is a dos app, you may need to make a pif file and have the reference in here to the pif file and have the exe on his hdd in a wierd folder that he won't even look in, or simply hide the file.

good luck, lemme know how you go.
-- Dane

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hardware

From novice to tech pro — start learning today.