Solved

How to add/edit DWORD values

Posted on 2004-08-25
4
500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

829 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