| | |
Editing Registry with VBS
![]() |
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.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
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.Quit
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.
Last edited by TKS; May 3rd, 2007 at 5:13 pm. Reason: changed code
My Home Away from Home: Yet Another Linux Blog
![]() |
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)
- Editing registry after deleting application (Windows NT / 2000 / XP)
- Registry (Windows NT / 2000 / XP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Multiplication table
- Next Thread: Creating a time counter
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





