Page 1 of 1

Registry creation to Run Wscript files

Posted: Fri Sep 30, 2005 3:14 pm
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

Posted: Fri Sep 30, 2005 3:18 pm
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.

Posted: Fri Sep 30, 2005 10:45 pm
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.