Toshi's right. You can't directly manipulate the registry in QB.
However, you can create a REG file through QB like:
open "c:\RegMe.REG" for output as 10
print #10, "REGEDIT4"
print #10, chr$(10)
print #10, "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]"
print #10, "QBAutoStart""="C:\\MiggyD\\QB45\\Qb.exe"
close #10
'-give system time to write out the file or you'll get an error
'-code pop-up (due to writeback delays)
cls
print "Accessing Registry...please wait."
sleep 10
shell "regedit /s /u \RegMe.REG"
end
[red]NOTE!!!-DON'T MESS AROUND WITH THE REGISTRY IF YOU DON'T KNOW WHAT YOU'RE DOING!!! THERE CAN BE SERIOUS CONSEQUENCES[/red]
The above example will run once (not everytime). It was designed to give you an example of the work-around to access the registry (not to delete it--that's really dangerous if you are a novice. And even some intermediate programmers should not play with it either.
Anyway, the above code will create a Regkey to start QB from the specified directory listed once the computer is started/rebooted. You'll notice the double backslashes, they are required (due to C programming) to address the path to the program(s).
With that said, Happy programming and DO NO HARM!!
--MiggyD [sig]<p> <br><a href=mailto: > </a><br><a href= > </a><br>English is too hard to learn, the vowles change too much like come/home, comb/tomb, book/school, high/bye/sty, etc., etc. So should I say Geez or Sheez or Cheeze? hehe.[/sig]