hello everyone.
i am looking for a program that when run i can go to the system properties menu from control panel.
and even better. if it goes right to the performance options.
and better than that if you can set it to open the virtual memory.
then you will be my hero.
source code included.
im a total C++/Csharp noobie
although if its in C++ its fine
i would prefer visual basic.
or any language realy, except for binary and ASM (cause thats overdoing it.
Creating a program?
Opening the system properties is easy. 'sysdm.cpl' is the name of the file. And if you run this command
control.exe sysdm.cpl,,3
(without any programming! ha!)
It should open directly to the advanced tab of system properties.
However, I can do you one better.
Using a registry monitor I managed to catch the registry setting that the control applet changes.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentContr... Manager\Memory Management
is the key under which the setting dwells. Looks like under the value "PagingFiles" there is a string "C:\pagefile.sys %d %d" where the %d are integers the first being initial size of pagefile and the second being max size of pagefile. So just to taunt you I write a routine in Assembly to set this value. (TASM)
buf db 100 dup (?)
subkey db "SYSTEM\CurrentControlSet\Control\Sessio... Manager\Memory Management",0
pat db "C:\pagefile.sys %d %d",0,0
value db "PagingFiles"
hKey dd ?
SetPageFile proc init:dword, max:dword
call RegOpenKeyA, 80000002h, offset subkey, offset hKey
push max
push init
push offset pat
push offset buf
call _wsprintfA
add esp, 20
call lstrlenA, offset buf
inc eax
call RegSetValueExA, hKey, offset value,0,7,offset buf, eax
call RegCloseKey, hKey
ret
SetPageFile endp
Of course, you will need to restart for the changes to take effect (regardless of whether you change the registry or use the control panel applet)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment