Modifying virtual memory using a package

I am making a program that uses a package to improve PC performance, and now I have come to the conclusion that I need to edit the Windows virtual memory to a size that I can change in the code. if necessary, this can be done in .reg, as I can get the batch file to execute it. can anyone help. My os is Windows 7, maximum 32 bit

+1
source share
2 answers

Duplicate stream from superuser.

https://superuser.com/questions/689066/changing-virtual-memory-using-batch/

This is how I do it, it’s much easier to edit than the .reg file, because the registry stores this field as a hex element. Also included is a script with two page files, if you need to delete , d:\pagefile.sys 4096 4096 for one c: \ pagefile.

 start /wait /b powershell -command "Set-ItemProperty -Path 'registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management' -Name 'PagingFiles' -Value 'c:\pagefile.sys 1024 1024, d:\pagefile.sys 4096 4096'" # 

Here is the registry version with the same settings, but as you can see, it cannot be edited directly.

 Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management] "PagingFiles"=hex(7):63,00,3a,00,5c,00,70,00,61,00,67,00,65,00,66,00,69,00,6c,\ 00,65,00,2e,00,73,00,79,00,73,00,20,00,31,00,30,00,32,00,34,00,20,00,31,00,\ 30,00,32,00,34,00,2c,00,20,00,64,00,3a,00,5c,00,70,00,61,00,67,00,65,00,66,\ 00,69,00,6c,00,65,00,2e,00,73,00,79,00,73,00,20,00,34,00,30,00,39,00,36,00,\ 20,00,34,00,30,00,39,00,36,00,00,00,00,00 

For a true batch method, reg.exe may be an alternative to scill powershell. But the syntax is straight up binary. See the final JRV post in this thread.

http://social.technet.microsoft.com/Forums/scriptcenter/en-US/03ba4174-78ee-45ee-aa26-d8a0eb610f85/add-reg-key-to-registry-with-hex-data

This will need to be rewritten with the exact hexadecimal of all the settings you make.

 REG ADD "HKCU\Software\Microsoft\Internet Explorer\Toolbar\ShellBrowser" /v "{83E8BF99-F3C0-4475-B453-9F9E8E4548C3}" /t REG_BINARY /d 09bfe883c0f37544b4539f 
+1
source

I am not an expert on this, but if you mean the size of the page file, it seems to live in the registry at:

HKLM \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management \ PagingFiles

and this is the name of the page file, followed by its minimum and maximum sizes specified in MB, separated by a space.

I don’t know if this has changed as a result of something and I would not want to experiment too much on my machine, but it can make you start ...

+2
source

Source: https://habr.com/ru/post/891482/


All Articles