Results 1 to 10 of 10

Thread: run my program on start

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    run my program on start

    i have a laptop i use as my server for my client/server chat program

    but how can i make my server program auto execute on my laptop when i switch my laptop on?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: run my program on start

    Quote Originally Posted by Pouncer
    but how can i make my server program auto execute on my laptop when i switch my laptop on?
    I could retire if I had a dollar for everything this question has been asked.

    When I did a forum search on this topic, I got over 500 matches.

    Here is just one that was asked on Tuesday.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: run my program on start

    but this code here

    VB Code:
    1. Private Sub Form_Load()
    2. 'Add the program to regedit. So it runs each time the computer restarts.
    3. Dim sAppEXE As String
    4.   sAppEXE = App.Path & IIf(Right$(App.Path, 1) = "\", "", "\") & App.EXEName & ".exe"
    5.     SaveSettingString HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Run", App.Title, Chr$(34) & sAppEXE & Chr$(34)
    6. End Sub

    i cant see this path in my regedit

    HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Run


  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: run my program on start

    You want the one under HK_LOCAL_MACHINE rather than HK_CURRENT_USER
    Attached Images Attached Images  

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: run my program on start

    ah i see now thanks, so if i want to remove the program from the registry, i just delete it from regedit manually?

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: run my program on start

    Quote Originally Posted by Pouncer
    ah i see now thanks, so if i want to remove the program from the registry, i just delete it from regedit manually?
    Yep, that is what I do.

  7. #7
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Re: run my program on start

    i went to use the same code and it added to regedit no problem but when the app loaded on comp startup, it bypassed the login screen and showed the main MDI form. thats not supposed to happen because of security. what do you recommend? also, would like to give user the ability to remove from startup if they wanted to. been on PSC to find something and havent found anything that doesnt do the same thing so far (bypasses login form)

  8. #8
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: run my program on start

    so the program by passes the login screen it dosent for me every time i make an app start up are you talking about the windows login screen ?

  9. #9
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Re: run my program on start

    Quote Originally Posted by dark_shadow
    so the program by passes the login screen it dosent for me every time i make an app start up are you talking about the windows login screen ?
    no, app login screen

  10. #10
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: run my program on start

    so why not have the login screen run first? put the start up code in the login screens form_load its all compiled into one right?

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