PDA

Click to See Complete Forum and Search --> : Start-Up items


bbosh
Oct 29th, 2000, 03:52 PM
I finally have a working (but not pretty) version of my shell running. Upon the magical reboot, I found that the only thing that automaticly starts is my shell. I have no entries for Load= or Run=, so I don't know if they would automaticly start. So to ensure compatibility, I need to get everything in
Start>Programs>Start Up
HKCU\Software\Microsoft\Windows\Current Version\Run || RunOnce

I know that the dynamic path to Start Up is available at
HKCU\Software\Microsoft\Windows\Current Version\Explorer\Shell Folders\Startup
So then I could set
File1.Path=RegStartUpPath
But how do I then execute all the items within? Also, I know there is a Enum function for reg keys, but I don't know it either, and a search didn't turn up anything.

gxpark
Oct 31st, 2000, 11:38 AM
First of all, you may also want to check the same keys, but under HKLM.

Then, to execute the items you found in HK??\...\Startup, just walk the folder, and execute each item with Shell or ShellExecute.

There are several ways to walk a folder. One is with a DirListBox, which you can hide. Other is to use the FileSystemObject, and yet other, is with the following line:

Shell "Dir " & RegStartUpPath & " /B > c:\runlist.lst"

then open c:\runlist.lst and execute each line...

And, to walk the key values, there are plenty of examples on the web. But, you may better get a free reg control. Just search for "registry" and "ActiveX" for example.

If you need further assistance, don't hesitate in asking.