Results 1 to 6 of 6

Thread: Running an app on startup

  1. #1
    Senior Member
    Join Date
    Oct 2001

    Question Running an app on startup

    Hi Guys

    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.

  2. #2
    Senior Member
    Join Date
    Oct 2001

    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

  3. #3
    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.

  4. #4
    Senior Member
    Join Date
    Oct 2003
    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.

  5. #5
    Join Date
    Oct 2004
    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
    [gloworange][shadow]www.geocities.com/dia_byte0 [/shadow] [/gloworange]

    No To 1559 !

    Signature image is too tall!

  6. #6
    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts