![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | values Ok, if I have a main key like: HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer I wanted to write 10 values under the one key like: NoBands NoMoving CloseDragBands" NoSetbar NoTools NoSave NoToolbarsOnTaskbar NoTaskbar Would I have to keep writing the main key every time I added a values like: HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer "values" HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer "values" Or is there an easy way. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: values You mean the WScript.Shell RegWrite method? You have to use the full path each time. Otherwise how would the function know where to write? There's no 2-stage option that would allow you to do something like set the key as an object and then write to it. But you can make it more efficient by putting the whole thing into a sub, so that you can just do something like: WriteAnotherValue "NoBands", 1, "REG_DWORD" (WriteAnotherValue would then be a sub that combines your parameters with the full path and writes the value.) Or you can use a variable: sPath = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\" With that you can use: Obj.RegWrite sPath & "NoBands", 1, "REG_DWORD" Obj.RegWrite sPath & "NoMoving", 1, "REG_DWORD" etc. Quote: > Ok, if I have a main key like: > HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer > I wanted to write 10 values under the one key like: > NoBands > NoMoving > CloseDragBands" > NoSetbar > NoTools > NoSave > NoToolbarsOnTaskbar > NoTaskbar > > Would I have to keep writing the main key every time I added a values Quote: > > HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer "values" > HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer "values" > Or is there an easy way. > > > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: values That's about right, I will give it a try. "mayayana" <mayaXXyana@xxxxxx> wrote in message news:uczGD6sAJHA.3756@xxxxxx Quote: > You mean the WScript.Shell RegWrite method? > You have to use the full path each time. Otherwise > how would the function know where to write? > There's no 2-stage option that would allow you > to do something like set the key as an object and > then write to it. > But you can make it more efficient by putting > the whole thing into a sub, so that you can just > do something like: > > WriteAnotherValue "NoBands", 1, "REG_DWORD" > > (WriteAnotherValue would then be a sub that combines > your parameters with the full path and writes the value.) > > Or you can use a variable: > > sPath = > "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\" > > With that you can use: > > Obj.RegWrite sPath & "NoBands", 1, "REG_DWORD" > Obj.RegWrite sPath & "NoMoving", 1, "REG_DWORD" > > etc. > Quote: >> Ok, if I have a main key like: >> HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer >> I wanted to write 10 values under the one key like: >> NoBands >> NoMoving >> CloseDragBands" >> NoSetbar >> NoTools >> NoSave >> NoToolbarsOnTaskbar >> NoTaskbar >> >> Would I have to keep writing the main key every time I added a values Quote: >> >> HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer >> "values" >> HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer "values" >> Or is there an easy way. >> >> >> > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Lookup values | PowerShell | |||
| Compare values | PowerShell | |||
| Re: how to change xml values | PowerShell | |||
| need some registry values | Vista General | |||
| Tip: CRC and MD5 values for Vista | Vista General | |||