Automatically Run Program When Computer is Turned On

Automatically Run Program When Computer is Turned On

Anonymous
Not applicable
700 Views
13 Replies
Message 1 of 14

Automatically Run Program When Computer is Turned On

Anonymous
Not applicable
I am wondering what is the easiest way to make a program
automatically run when the computer is turned on.

I have written a program that automatically does some
company specialized maintainance operations but it is
necessary that it should run automatically as soon as
user's machine is turned on.

In the good old days of DOS I think I read somewhere that
this is performed using somekind of batch file ... if I
remember correctly I think it was either Autoexec.bat or
Config.sys but I more inclined to think it might have been
Autoexec.bat.

But DOS has long been gone and all our machines are running
on Windows XP. Besides, I havent tried anything like it
even in the old DOS.

What files do I need to change in a Windows XP environment
how would the entry read... do I put it near the end, start
or middle?

Thanks for all the help you can give.

Thanks again,
Matt

P.S.
Incidentally, would it be possible by any chance to accomplish what I am trying to do without the need to alter any AutoExec.bat/Config.sys or equivalent?
0 Likes
701 Views
13 Replies
Replies (13)
Message 2 of 14

Anonymous
Not applicable
Look into Windows startup/Shutdown script (in group policy editor).

If the computer is in domain network, domain grouip policy could be easily
used to control which computers runs which tasks at startup/shutdown.

You can also look into logon/logoff script, if the tasks to run is
user-specific.

If it is domain-wide settings, you need to go to domain Group policy Editor.
If it is non-domain computer, click "Start->Run->Enter "gpedit.msc"->Click
"OK"->Expense node "Computer Configuration->Windows Settings->Script
(Startup/Shutdown)"->double-click "Startup" or "Shutdown". Then add script
you want to use. Of course you need to prepare your script first (in
VBScript, PowerShell or any other Windows scripting technology).



wrote in message news:5749244@discussion.autodesk.com...
I am wondering what is the easiest way to make a program
automatically run when the computer is turned on.

I have written a program that automatically does some
company specialized maintainance operations but it is
necessary that it should run automatically as soon as
user's machine is turned on.

In the good old days of DOS I think I read somewhere that
this is performed using somekind of batch file ... if I
remember correctly I think it was either Autoexec.bat or
Config.sys but I more inclined to think it might have been
Autoexec.bat.

But DOS has long been gone and all our machines are running
on Windows XP. Besides, I havent tried anything like it
even in the old DOS.

What files do I need to change in a Windows XP environment
how would the entry read... do I put it near the end, start
or middle?

Thanks for all the help you can give.

Thanks again,
Matt

P.S.
Incidentally, would it be possible by any chance to accomplish what I am
trying to do without the need to alter any AutoExec.bat/Config.sys or
equivalent?
0 Likes
Message 3 of 14

Anonymous
Not applicable
Thank you for your valuable response I will go and look deeper at the gpedit.msc command.

From the looks it then I guess Autoexec.bat is dead..

As you may have noticed I am quite new at it ... to become more confident I would really like to try maybe some simple task ... I would be trying to run an executable called OurSystemMaintain.exe ... I am wondering if you might know a website by any chance? Something with a bonus screenshot or two would be a tremendous boost indeed ...

Thanks again,
Matt
0 Likes
Message 4 of 14

Anonymous
Not applicable
I have tried the steps outlined currently but it keeps giving me the error saying "Windows cannot find gpedit.msc Make sure you typed the name correctly and then try again"

Wondering if there is another command that would perhaps say have a higher likelihood of being in the XP operating system. If none exists, wondering if there is a safe place (I do not use anti-virus and rely only on firewall) where I can download a copy of said gpedit.msc?

Thanks again,
Matt
0 Likes
Message 5 of 14

Anonymous
Not applicable
gpedit.msc is at "C:\Windows[or Winnt]\System32\"

I verified it with my WinXP, Win2003 and Win Vista.



"Norman Yuan" wrote in message
news:5749249@discussion.autodesk.com...
Look into Windows startup/Shutdown script (in group policy editor).

If the computer is in domain network, domain grouip policy could be easily
used to control which computers runs which tasks at startup/shutdown.

You can also look into logon/logoff script, if the tasks to run is
user-specific.

If it is domain-wide settings, you need to go to domain Group policy Editor.
If it is non-domain computer, click "Start->Run->Enter "gpedit.msc"->Click
"OK"->Expense node "Computer Configuration->Windows Settings->Script
(Startup/Shutdown)"->double-click "Startup" or "Shutdown". Then add script
you want to use. Of course you need to prepare your script first (in
VBScript, PowerShell or any other Windows scripting technology).



wrote in message news:5749244@discussion.autodesk.com...
I am wondering what is the easiest way to make a program
automatically run when the computer is turned on.

I have written a program that automatically does some
company specialized maintainance operations but it is
necessary that it should run automatically as soon as
user's machine is turned on.

In the good old days of DOS I think I read somewhere that
this is performed using somekind of batch file ... if I
remember correctly I think it was either Autoexec.bat or
Config.sys but I more inclined to think it might have been
Autoexec.bat.

But DOS has long been gone and all our machines are running
on Windows XP. Besides, I havent tried anything like it
even in the old DOS.

What files do I need to change in a Windows XP environment
how would the entry read... do I put it near the end, start
or middle?

Thanks for all the help you can give.

Thanks again,
Matt

P.S.
Incidentally, would it be possible by any chance to accomplish what I am
trying to do without the need to alter any AutoExec.bat/Config.sys or
equivalent?
0 Likes
Message 6 of 14

Anonymous
Not applicable
You probably have an Autoexec.bat file but just don't see it. By default,
"Hide protected operating system files" is turned on (in Folder Options |
View). To see it turn this off. Assuming you are talking about an .exe file, I
would think you could run it from the autoexec.bat file.

Another method would be to put a shortcut to your file in your Windows Startup
group. I do this to run another batch file with stuff that I did not want to
add to the autoexec.bat file.

(The above is for XP - I don't know if it holds true for Vista).

Ken Krupa

matt_1ca wrote:

> From the looks it then I guess Autoexec.bat is dead..
0 Likes
Message 7 of 14

Anonymous
Not applicable
Programs in Windows startup group is user specific, that is, only start when
a user is logged on.

"Ken Krupa" wrote in message
news:5749791@discussion.autodesk.com...
You probably have an Autoexec.bat file but just don't see it. By default,
"Hide protected operating system files" is turned on (in Folder Options |
View). To see it turn this off. Assuming you are talking about an .exe file,
I
would think you could run it from the autoexec.bat file.

Another method would be to put a shortcut to your file in your Windows
Startup
group. I do this to run another batch file with stuff that I did not want to
add to the autoexec.bat file.

(The above is for XP - I don't know if it holds true for Vista).

Ken Krupa

matt_1ca wrote:

> From the looks it then I guess Autoexec.bat is dead..
0 Likes
Message 8 of 14

Ed__Jobe
Mentor
Mentor
Matt, you didn't say if your program is a window's exe. If it is, you can just put a shortcut in the All Programs\Startup folder.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 9 of 14

Anonymous
Not applicable
if you create a file called "AUTOEXEC.BAT" and place it in your root directory, windows will process it if found.

I use it, on XP SP2, to set a few paths on my system during startup. Message was edited by: DanLan
0 Likes
Message 10 of 14

Anonymous
Not applicable
Cannot succeed in finding that file for some reason .. what I am finding are these files glu32.dll gpkcsp.dll .... I do not know why but gpedit.msc would be in between those two files I tried to sort by name to make sure I am not missing anything and made sure the option to show hidden and system files are likewise turned ... unfortunately I havent any success in finding it.. it maybe probably in a majority of XP machines but it does not seem to be in all as my machine uses XP as well.

I havent checked with my other machine but I might have to look for another technique...

Thanks a bundle,
Matt
0 Likes
Message 11 of 14

Anonymous
Not applicable
Thanks Ken, yours and Ed's technique seem to be the way to go ... I tried it manually and it worked like a charm .

Thanks again ...

Gratefully,
Matt
0 Likes
Message 12 of 14

Anonymous
Not applicable
This is an interesting concept ... I will go and try it out as well ... thanks for sharing this strategy...

Thanks again,
Matt
0 Likes
Message 13 of 14

Anonymous
Not applicable
This method is straightforward and elegant .. I owe you and Ken ... I tried it and it worked like pure genius...

Thanks,
Matt
0 Likes
Message 14 of 14

Anonymous
Not applicable
Edit: Oops, please ignore, didn't read all posts throughly... Message was edited by: Colin French
0 Likes