Solved

Making sure a program ALWAYS runs....

Posted on 1998-05-14
11
233 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
 
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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
Stuck in voice control mode on your Amazon Firestick?  Here is how to turn it off!!!
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now