Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Making sure a program ALWAYS runs....

Posted on 1998-05-14
11
236 Views
Last Modified: 2012-05-04
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?
0
Comment
Question by:GreatOne
  • 3
  • 2
  • 2
  • +3
11 Comments
 
LVL 17

Expert Comment

by:mikecr
ID: 1016386
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
 

Author Comment

by:GreatOne
ID: 1016387
I am trying to avoid putting stuff in my autoexec.bat file. Are you sure there is no other way?
0
 
LVL 17

Expert Comment

by:mikecr
ID: 1016388
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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 2

Expert Comment

by:tylox
ID: 1016389
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
 
LVL 1

Expert Comment

by:chrisrip
ID: 1016390
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
 
LVL 2

Expert Comment

by:tylox
ID: 1016391
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
 

Author Comment

by:GreatOne
ID: 1016392
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
 
LVL 7

Expert Comment

by:rin1010
ID: 1016393

  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
 
LVL 2

Expert Comment

by:tylox
ID: 1016394
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
 
LVL 7

Expert Comment

by:rin1010
ID: 1016395

 Launch line? Meant to say Lunch line.

0
 
LVL 2

Accepted Solution

by:
Dane Pickering earned 30 total points
ID: 1016396
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question