Results 1 to 11 of 11

Thread: [2008] On windows load...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    242

    Exclamation [2008] On windows load...

    Can some one assist me how can i make my project load directly when the windows will start...

    please need help on this..
    < advertising link removed by moderator >

  2. #2
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: [2008] On windows load...

    You need to add an entry of your application in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run OR
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Just open the registry editor and go to the above locations. You will see a list of applications that runs when OS is started. You need to add an entry for your application here.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    242

    Re: [2008] On windows load...

    not just on my pc..

    When others will use also to be same ..!!
    < advertising link removed by moderator >

  4. #4

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    242

    Re: [2008] On windows load...

    ahh ok il try that way thanks for your help..
    < advertising link removed by moderator >

  6. #6
    Lively Member
    Join Date
    Jan 2007
    Posts
    96

    Re: [2008] On windows load...

    Could also make an option in your programs settings for "Start On Windows Load" where if the user sets to true/false a shortcut to the application will be created/deleted in/from the Startup folder of your Start Menu. If you are hesitant about messing with the registry then this is a simple method to achieve your goal.

  7. #7
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [2008] On windows load...

    Hi,

    I think the easiest way would be to put a shortcut to the application.exe file in the 'C:\Documents and Settings\All Users\Start Menu\Programs\Startup'
    folder. You can make the setup do this automatically by right clicking 'File
    System on Target Machine' in the project output window and selecting 'Add
    Special Folder'. Just select 'User's Start Menu' and you are away.

    The application will automatically terminate when you terminate the
    operating system.

    Hope it helps,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    242

    Re: [2008] On windows load...

    Can some one assist me how can i make when user checks on check box the application start on windows load when user unchecks the application not start on windows load..?!

    can some one assist me..?!
    < advertising link removed by moderator >

  9. #9
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: [2008] On windows load...

    vb.net Code:
    1. Private Sub chkStartup_CheckedChanged( _
    2.     ByVal sender As System.Object, _
    3.     ByVal e As System.EventArgs _
    4. ) Handles chkStartup.CheckedChanged
    5.  
    6.     Dim regKey As Microsoft.Win32.RegistryKey
    7.     regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
    8.    
    9.     If chkStartup.Checked = True Then
    10.         regKey.SetValue(Me.GetType.Assembly.GetName.Name, Me.GetType.Assembly.Location)
    11.     Else
    12.         regKey.DeleteValue(Me.GetType.Assembly.GetName.Name)
    13.     End If
    14.  
    15.     regKey.Close()
    16.     regKey = Nothing
    17. End Sub

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    242

    Exclamation Re: [2008] On windows load...

    id dint get how to make this erectly can u assist me a bit easier...?!

    where i have to edit that hkey and so on...

    Quote Originally Posted by Deepak Sakpal
    You need to add an entry of your application in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run OR
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Just open the registry editor and go to the above locations. You will see a list of applications that runs when OS is started. You need to add an entry for your application here.
    < advertising link removed by moderator >

  11. #11
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: [2008] On windows load...

    Quote Originally Posted by TetovaBoy
    id dint get how to make this erectly can u assist me a bit easier...?!

    where i have to edit that hkey and so on...
    I have already said that, you need to do it through the application setup. There one more way to do it. You can use some part of the code from my last post to add your application to the system start up.

    vb.net Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.   AddAppToStartup()
    3. End Sub
    4.  
    5. Private Sub AddAppToStartup()
    6.   Dim regKey As Microsoft.Win32.RegistryKey
    7.   regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
    8.   regKey.SetValue(Me.GetType.Assembly.GetName.Name, Me.GetType.Assembly.Location)
    9.   regKey.Close()
    10.   regKey = Nothing
    11. End Sub
    Just make sure that it does not conflicts with the Check box code.

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