•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 456,196 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,924 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 2125 | Replies: 0
![]() |
| |
I need to add registry keys and replace registry keys inside a vbs script...I started one...and it executes fine. However, I want to append "M:\MLS\bin" portion to the end of the existing key...as you may guess, I don't want to overwrite all my PATH environmental variables...but that is what is happening here:
So, how does one append to the existing key in this script? Please understand that this is at the very end of a longer vbs script. If this is posted in the wrong forum, please let me known.
Dim WSHShell
On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\EnableOpLocks", 0, "REG_DWORD"
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\EnableOpLockForceClose", 1, "REG_DWORD"
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MRxSmb\Parameters\OpLocksDisabled", 1, "REG_DWORD"
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path", "M:\MLS\bin" , "REG_EXPAND_SZ"
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\STATION", 70, "REG_DWORD"
WScript.QuitSo, how does one append to the existing key in this script? Please understand that this is at the very end of a longer vbs script. If this is posted in the wrong forum, please let me known.
Last edited by TKS : May 3rd, 2007 at 5:13 pm. Reason: changed code
My Home Away from Home: Yet Another Linux Blog
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Problems with opening and editing a registry key with C++ (C++)
- editing registry over network (VB.NET)
- Restoring a Registry Setting thru VBS (Windows NT / 2000 / XP / 2003)
- Editing registry after deleting application (Windows NT / 2000 / XP / 2003)
- Registry (Windows NT / 2000 / XP / 2003)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Multiplication table
- Next Thread: Creating a time counter


Hybrid Mode