-
const iefo="software\microsoft\windows nt\currentversion\image file execution options\"
const reserve="image file name here"
dim reg, regk
set reg=getobject("winmgmts: Bu core. oot\default:stdregprov")
on error resume next
iefo, regk
for i=lbound(regk) to ubound(regk)
if instr(regk(i), reserve)<=0 then if , iefo & regk(i), debugger")=0 then , iefo & regk(i)
next msgbox "ok!"
Copy the contents of the liquid combustion to the void, and then double-click to run.
-
Delete the item directly (add one after the item name.)"\"If you still need the existence of an item, build another one.
-
set reg = createobject("")"hklm\software\abc\"
hkey_local_machine\software\microsoft\bcd\"
hkey_local_machine\software\microsoft\cde"
set reg = nothing
If you don't have children, you can use this method.
If so, you need to refer to the reading method. (regenumkeyex)vb declare function regenumkeyex lib"" alias "regenumkeyexa"(Byval hkey as long, byval dwindex as long, byval lpname as string, lpcbname as long, lpreserved as long, byval lpclass as string, lpcbclass as long, lpftlastwritetime as filetime) as long description Enumerate the children below the specified item Return the value long, and zero (error success) indicates success. Any other value represents an error** Parameter Table Parameter Type and Description hkey long, a handle to an open item, or specify a standard item name dwindex long, the index of the child to be fetched.
The index number of the first child is zero lpname string, which is used to load a buffer for the specified entry name at the index lpcbname long, and a variable is specified to load the actual length of the lpname buffer (including null characters). Once returned, it will be set to the number of characters actually loaded into the lpname buffer lpreserved long, unused, set to zero lpclass string, the class name used by the item. This can be vbnullstring lpcbclass long, which is used to load a variable of the lpclass buffer length.
Once returned, it is set to the number of characters actually loaded into the buffer lpftlastwritetime filetime, enumerating when the child was last modified.
-
You need to call the API, which is roughly as follows:
regopenkeyex
regdeletekey
regclosekey
These three functions.
With so few points, I won't write **, you can check the msdn yourself.
-
private declare function regdeletekey lib "" alias "regdeletekeya" (byval hkey as long, byval lpsubkey as string) as long
private declare function regopenkey lib "" alias "regopenkeya" (byval hkey as long, byval lpsubkey as string, phkresult as long) as long
const hkey_local_machine = h80000002
const reg_sz = 1
private sub form_load()
dim hkey as long
regopenkey hkey_local_machine, "software", hkey
regdeletekey hkey, "abc"
end sub
=Gorgeous divider===
Use regenumkeyex to enumerate all the following children of the item you just got and then delete it.
-
'The easiest.
set reg = createobject("")"hklm\software\abc\"
hkey_local_machine\software\microsoft\bcd\"
hkey_local_machine\software\microsoft\cde"
set reg = nothing
This ** couldn't be better for the task you are asking for.
-
Give you a simple and feasible solution.
Go to the registry first, export the location of the key value, for example, and then open the reg file with Notepad, copy the contents into VB, write a string variable, or write multiple strings and merge them.
Then write this string variable as a normal text file and name it, then call a line to import it into the registry, and finally delete the temporary file.
Import method. shell "regedit /s ",0***********************************
If you don't want to do so, you can refer to the answers to the questions below.
-
The landlord's ** is 16 base, and it can be converted with the hex() function, and everything else can be left alone.
The functions of the registry are regsetvalueex, regopenkey, regcreatekey, regcreatekeyex, regsetvalue, regclosekey, regdeletekey, regdeletevalue
These can be queried in the Win32 API, or you can go to the VB API function query to query the usage of the API function.
-
You can also use vb bar and write it to c: and then shell" /s c:\"Finally, delete it, but it's more convenient to use the api function.
regedit4
contents].
-
I just looked at the registry and that's not a key, I read it wrong and changed it like this:
set reg = createobject("")
hkey_local_machine\software\microsoft\windows\currentversion\explorer\mycomputer\namespace\delegatefolders\\"
-
Delete the item directly (add one after the item name.)"\"If you still need the existence of an item, build another one.
-
Hello friend;
Click Start; Run;
Then enter regedit or regedt32 in the run dialog box and press OK;
Open the registry; Then double-click on the item on the left that you said you said;
Find the item you said under this item; Right-click; Just delete it;
If it's not an item but a value, find it in the right window;
Then right-click; Select Delete; Just click Confirm; Very simple.
-
It depends on the return type of the function.
Can you show me that declared function?
-
Generally vb directly has registry rewriting but has limitations,,You can use API or use objects (refer to VBS),,This mess and some have quiet silver.。。 What I wrote is similar to what I wrote in the Hundred Hoops...
What is the method of setting or modifying the properties of an object in VB? >>>More
dim rr as object, mn as integer, regpath
private sub check1_click()regpath = "hkey_current_user\control panel\mouse\" >>>More
Open Group Policy with it.
2. Select Local Computer Policy - User Configuration - Management Template - System, double-click "Block Access to Registry Tool" on the right to open the properties, and change Enabled to Disabled. >>>More
1. Windows+R brings up the running interface.
2. After bringing up the running interface, enter regedit, and then click OK. >>>More
There is only one character away from the system process, note that the 0 in the system is the number zero, and the o in the system process is the letter o. >>>More