vbscript - Delete registry folder and sub folder using VBS -


I want to delete the registry folder and sub-folder by using this vb script.

In the reg file we can do the script as below:

  [- HKEY_LOCAL_MACHINE \ software \ abc \ prr]   

Under the script above, will delete sub folder

How can one get the same using a VB script?

I tried to use .RegDelete but I think it only works for the key and not for the registry folder.

Thank you.

[path] RegDelete [key] | [Value]

The Path Path (hence Windows can find it) to download the paths Windows 98 Tips and tips on hacks pages to see Windows always find it.

Do not start RegDelete with any user interface, or do not close key or values ​​in the inverted commas while typing the value to delete or delete.

Key key to delete key always ends in a backslash if the key has a space then it must be attached in reverse coma. Keys and subkeys will be removed.

Value Deletion value values ​​do not have a backslash at the back. If the key has a location then it should be enclosed in reverse comma.

Copy the following lines into a new text document and save it as RegDelete.vbs.

  Deletes key or value from RegDelete.vbs' registry. Resume 'error' vbPara = vbCRLF & amp; VbCRLF strExplain = "Delete the registry key and deleting the value from the registry." & Amp; VbPara & amp; "The key must end with a backspace and no value." & Amp; VbPara & amp; "To type a key or delete value, start without parameters, or keep a key or value on the command line (use the inverted comma to move the key or value if there is space in it)." & Amp; VbPara & amp; "Continue" strTitle = "delete reg" key = "" set silent silence = "" set dim. Sh = WScript.CreateObject ("WScript.Shell") ReportErrors "Shell Creation" key = GetKey () If the key & lt ; & Gt; "" Then B = SR regress (key) if error Number = 0 then SR Regalit key if error Number = 0 then silent; & Lt; & Gt; "Yes" then the MSBBX key & amp; "Deleted", vbOKOnly + vbInformation, strTitle Else ReportErrors "DeletingKey" end if else Err.Number = -2147024893 Then Err.Clear MsgBox key & amp; "Expiration was not existent", vbOKOnly + vbCritical, strTitle Else ReportErrors "read before deleting the key" end if the end ends the report reporter "Main" function GetKey () Dim AG Set AG = Wscript.Arguments ReportErrors "Agrets Build "if AG calculation = 1 then GetKey = AG (0) mute =" yes "then Ag.Count> 1 then sgBox ". Try to attach a lot of parameters on the command line in a space important", vbOKOnly + vbCritical, strTitle then Ag.Count = 0 then MsgBox (strExplain, vbYesNo + vbInformation, strTitle) = 6 then GetKey = InputBox ( "Enter the value or key to delete." & Amp; vbPara & amp; "The key must end in a backspace", strTitle, strNamet1) end if the closing function sub-reportAprers (strModuleName) if err.number & lt; & Gt; 0 Then there was an error in "Msgbox" & amp; StrModuleName & amp; "Module of" & amp; Err.number & amp; "-" & amp; Err.description & amp; "Type", vbCritical + vbOKOnly, "Some Unexpected" Err.clear End Sub    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -