Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to add/edit DWORD values

Posted on 2004-08-25
4
Medium Priority
?
507 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

719 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