How to correctly update a REG_EXPAND_SZ setting?
Hi all, hi Friedrich,
I need to update a REG_EXPAND_SZ setting:
Original:
---------
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Windows
%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows
SharedSection=1024,20480,768 Windows=On SubSystemType=Windows
ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3
ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16
Must become:
------------
%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows
SharedSection=1024,20480,8192 Windows=On SubSystemType=Windows
ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3
ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16
So the part, that has to be changed is:
SharedSection=1024,20480,768
into:
SharedSection=1024,20480,8192
The third number (768) is the size of non-interactive (services)
sessions, and has to become: 8192
So how can I accomplish this with SB?
Can somebody please help me?
--
Best regards,
Jeffrey
Re: How to correctly update a REG_EXPAND_SZ setting?
Anyone?
I need to finish my setup and don't know how to handle with this
REG_EXPAND_SZ setting in SB. ;-)
Best regards,
Jeffrey
3 Attachment(s)
Re: How to correctly update a REG_EXPAND_SZ setting?
Hi Jeffrey,
> I need to finish my setup and don't know how to handle with this
> REG_EXPAND_SZ setting in SB. ;-)
Just one script function (see attached screenshots) with the changed value
(768 to 8192).
Does this help?
Friedrich
Re: How to correctly update a REG_EXPAND_SZ setting?
Hi Friedrich,
Thank you, but it's more complicated:
I know how to create/update a registry setting in SB, but I *only* want
to change 768 into 8192. So I don't want to overwrite the rest at my
customers pc. Because then I take the risk that I overwrite other
settings at my customers pc.
So first I need to read THEIR original registry setting.
And after that, I have to replace 768 into 8192, and put this little
portion back into THEIR original registry setting.
I hope you understand me?
Best regards
Jeffrey
2 Attachment(s)
Re: How to correctly update a REG_EXPAND_SZ setting?
Hi Jeffrey,
> Thank you, but it's more complicated:
>
> I know how to create/update a registry setting in SB, but I *only* want
> to change 768 into 8192. So I don't want to overwrite the rest at my
> customers pc. Because then I take the risk that I overwrite other
> settings at my customers pc.
>
> So first I need to read THEIR original registry setting.
> And after that, I have to replace 768 into 8192, and put this little
> portion back into THEIR original registry setting.
>
> I hope you understand me?
No problem (see attached screenshot). Read the old value (Line 76), replace
768 with 8192 (Line 78), re-write the new value (Line 80).
Does this help?
Friedrich
Re: How to correctly update a REG_EXPAND_SZ setting?
Hi Friedrich,
Yes, super, that's what I'm looking for.
You're the master!
SB rocks, so so powerful!!
Best regards,
Jeffrey
Re: How to correctly update a REG_EXPAND_SZ setting?
Hi Friedrich,
Oops...
SB reads:
%SystemRoot%\system32\csrss.exe as:
C:\WINDOWS\system32\csrss.exe
What will happen when I write my find/replace stuff back?
Will it contain %SystemRoot% (which is needed) or will it contain
C:\WINDOWS (wrong)?
Best regards,
Jeffrey
Re: How to correctly update a REG_EXPAND_SZ setting?
Hi Friedrich,
When writing back, %SystemRoot% has been "overwritten" by C:\WINDOWS
I don't want that of course.
The culprit is that the ReadRegistry is expanding %SystemRoot% into
C:\WINDOWS, so that I'm not able to write back the original %SystemRoot%.
Hmm, complex, this one...
Best regards,
Jeffrey
3 Attachment(s)
Re: How to correctly update a REG_EXPAND_SZ setting?
Hi Jeffrey,
> When writing back, %SystemRoot% has been "overwritten" by C:\WINDOWS
> I don't want that of course.
> The culprit is that the ReadRegistry is expanding %SystemRoot% into
> C:\WINDOWS, so that I'm not able to write back the original %SystemRoot%.
>
> Hmm, complex, this one...
This is what I see here from my test script (it rertieves %SystemRoot%).
And it writes back %SystemRoot% after the replace operation....
Friedrich
1 Attachment(s)
Re: How to correctly update a REG_EXPAND_SZ setting?
Hi Friedrich,
Here on my Windows 10 Pro 64-bit machine, it's shown expanded, see
screenshot attached.
Best regards,
Jeffrey