Results 1 to 11 of 11

Thread: runonce (VB6)

  1. #1
    Lloyd
    Guest

    runonce (VB6)

    I am trying to figure out how to run an exe file one time after the user logs on. I know there are several runonce keys in the registry but I am not sure which one to use and if they do what I am asking.

    Also I need some help the coding to place the key into the registry from a vb app. If anyone can help it would be appreciated.

    Thanks
    Lloyd

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runonce (VB6)

    This is the key:

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentV ersionRunOnce

    The Help on PrivateProfileString should suffice for how to construct the syntax. Look in the Run key just above the RunOnce for examples of what values in the key look like.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runonce (VB6)

    Local_Machine seems to be the one, right?

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runonce (VB6)

    Is this a test?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runonce (VB6)

    yes

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runonce (VB6)

    You're a good teacher.

    This might be a better one, eh prof?

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVe rsionRunOnce
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runonce (VB6)

    > HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVe rsionRunOnce

    This doesn't have any entries. The Local machine did.

    It's not doing what i expected at all. I thought it would run stuff once-per-day.

    I put d:gamessol.exe in there, but that comes up each time I reboot, not just first thing each morning.


    Are you using RunOnce, if so, how and why?

    Thanks.

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runonce (VB6)

    I'm not using it. Lloyd up there at the top is trying to use it. I understood RunOnce to run the listed app(s) once -- that is, the next time Windows starts it runs what it finds there and then removes the entry from the registry.

    Doesn't work huh?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  9. #9
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runonce (VB6)

    > Doesn't work huh?

    (blush)

    Well, now I'm not sure.

    I had assumed "RunOnce" meant "run once per day". I have put the call to Sol.EXE back into the key and will report back in a day or two.

    Sorry for the delay in replying. I was away for four days managing the crops & livestock on a farm North of here .....

    Yes thank you, very well indeed .......

  10. #10
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runonce (VB6)

    OK Lloyd, did you get it working? What does it do? Can you give us a practical example of its use?

    For me (Win95 collector's edition) it runs SOL.EXE every time I reboot.

  11. #11
    Lloyd
    Guest

    Re: runonce (VB6)

    We have not yet tried it out. We been installing new software/wireless LAN'S on 240 mobile vehicles for the past 7 days, 15 hours a day.

    Initially we were discussing doing something so when we imaged the drives on all the computers it would have the runonce in registry of all the cars. However due to time constraints we just couldnt get the testing done in time.

    It is something we are looking at in the future.

    Thanks however for the info. Once things slow down in a few weeks I will get back at it.

Posting Permissions

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