Registry creation to Run Wscript files

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
cryptid
Newbie
Posts: 9
Joined: Thu Aug 18, 2005 2:57 am
Contact:

Registry creation to Run Wscript files

Post by cryptid »

ok here is my problem,i usually make a new .reg file using the command

Code: Select all

Open file.reg for output as #1
so that the programs that i creat run at startup but i was trying to eneter this value in REGEDIT.exe as

Code: Select all

Wscript C:\file.vbs C:\file.bat
using the .reg file generated by my programs that looks like this

Code: Select all

REGEDIT 4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"test"="Wscipt C:\invi.vbs C:\make.bat"
on execution of the file it says that registries have been entered succesfully but no registry has been made in regedit.exe

so please help me with my reg file

and is there any other method by which i can make registry enteries into regedit without having to generate .reg file every time i mean like is there a command in Qbasic with which i can enter values directly in regedit.exe
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

I know you can enter values directly through regedit.exe, but other than that i have not had much experience with the registry.

also, shouldn't this be in general? and QB cannot access the regestry because there was no regestry in dos.
Image
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

I exported a registry setting from regedit in XP and here's what I got:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"CTFMON.EXE"="D:\\WINDOWS\\System32\\ctfmon.exe"
and you HAVE to use reg files to import data into the registry...that's how it's done if you're using regedit. You'd use the /s switch if you want the popup window to not appear though. Since DOS doesn't have access to the registry (unless you use something like EqReg or something, which is a major hack), you'd have to use reg files to add data to the registry...no way around it.
Post Reply