Solved

How to add/edit DWORD values

Posted on 2004-08-25
4
492 Views
Last Modified: 2006-11-17
How do I do this? It seems if I edit any values like this:

Dim Reg As Object
        Dim Value As Decimal
        Reg = CreateObject("wscript.shell")
        Value = 1
        Reg.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr", Value)

It reverts the original DWORD value into a string value.
0
Comment
Question by:drakkarnoir
  • 2
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 500 total points
ID: 11898380
Hi there...
if I understood your problem right, here is the solution...

        Dim Reg As Object
        Dim Value As String
        Reg = CreateObject("wscript.shell")
        Value = "1"
        Reg.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr", Value)

To return to normal setting...

        Dim Reg As Object
        Dim Value As String
        Reg = CreateObject("wscript.shell")
        Value = ""
        Reg.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr", Value)

Let me know if this is what you want...
-Baan
0
 

Author Comment

by:drakkarnoir
ID: 11898448
Hmmm, no, not really. I just wanted to know how I could edit the registry without making DWORD values into strings after they change to any value.
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 11898503
I am sorry to say that... but, your question is still not clear to me...
0
 

Author Comment

by:drakkarnoir
ID: 11899255
Hmm, ok let me try again.

The original registry key is of a DWORD value. However, when I change it with VB.NET ... it changes from DWORD type to String.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now