CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2000
    Location
    Switzerland
    Posts
    944

    Run command without Login

    I want to run a command after my server boots up but without me having to log on first.
    Seems the Run key in the registry or the programs in the StartUp folder are only executed when someone logs on.
    I could write a service of course, but may be there is another way?
    Thank you all

  2. #2
    Join Date
    Feb 2001
    Location
    teh INTARWEB
    Posts
    542
    The standard way is to write a service and use RunOnce (ref. MS doc: http://support.microsoft.com/default...;EN-US;q179365 )

    { you already knew this anyway.. }

  3. #3
    Join Date
    May 2002
    Location
    Texas
    Posts
    222
    I'm assuming you are using W2K server.

    You could write a service as you said.
    You could put the executable in a startup script.
    You could put the executable in the scheduler and run on boot (user ID and password required).

  4. #4
    Join Date
    Apr 2000
    Location
    Switzerland
    Posts
    944
    Thanks
    I don't think that one can tell the scheduler to do anything just after it's loaded - one always needs a time / date.
    But I forgot autoexec.nt - hope it will do the trick.

  5. #5
    Join Date
    May 2002
    Location
    Texas
    Posts
    222
    Originally posted by solex
    Thanks
    I don't think that one can tell the scheduler to do anything just after it's loaded - one always needs a time / date.
    But I forgot autoexec.nt - hope it will do the trick.
    Like I said, I'm assuming you are using Windows 2000 server. Yes, you can. You don't need a time/date.

  6. #6
    Join Date
    Apr 2000
    Location
    Switzerland
    Posts
    944
    Thanks - didn't know that but as I am running NT 4 this is not available and autoexec.nt is no use here - so I had to go for a service.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured