December 16th, 2004, 06:15 AM
Running an app on startup
I need to do something quick on my win2k box. I have an exe with me and I would like that exe to be executed on startup with admin rights.
I plan to run a script that fires commands to a server at regular intervals (load testing), and I want to be able to do this whenever any user logs into my system. The script works with administrator as the user. I obviously have admin rights to my system.
I tried googling and found lot of methods to code hooks and stuff to do this. I do not have any C/C++ development environment (being a Java guy) but can request my IT dept. to provide me with one if it is absolutely necessary.
Thanks for all the help.
December 16th, 2004, 06:26 AM
i just read somewhere that putting the file in C:\Documents and Settings\All Users\Start Menu\Programs\Startup should solve the problem.
It dosen't, as the application gets executed everytime someone logs in but it dosent execute in admin mode. I would expect this to happen, but just to confirm, is the behavior ok?
Better Laugh At Your Own Problems..
Coz...The World Laughs At Them
December 16th, 2004, 07:36 AM
this is correct, the applications started by your startup folder will be run under the same account as the one who has logged in.
if you want to start an application with full rights, you could create a service which can do that.
for this you can use instsrv.exe which can be downloaded for free from microsoft since it is a part of the resource kit.
instsrv.exe <name of service> <path to executable>
instsrv.exe MyService c:\test.exe
there is only one thing: not every program can be started as a service like this.
December 22nd, 2004, 07:03 PM
I haven't ever used any windows beyond 98... however, on 98 there are other methods or starting it up. One is with regestry (somthing I'm not a fan of describing how to do), the other is a file called "win.ini" in your windows dir.
December 26th, 2004, 04:37 PM
win 98, millenium, Xp and maybe 95 are all the same in start up
they have the registry keys in :
applying this in programming is easy using APIs
visit White Scorpion's website and download the keylogger he wrote,
you will find a good example
December 26th, 2004, 09:45 PM
dia_byte is right, only one disadvantage --> it doesn't run with full rights, only with the rights of the user that is logged in... the only way to get past this is using the program as a service, or to use the runas service to specify another account...