Need a help to make a registry access

Multimedia Builder

Need a help to make a registry access

Postby philc » Wed Nov 23, 2016 2:05 pm

Sorry for bad english, i make a project when click in 1 button change de registry...


On click in button 1 change the registry to:

[HKEY_LOCAL_MACHINE\SOFTWARE\Intel\GMM]
"DedicatedSegmentSize"=dword:00000128


On click in 2 change to 256.

I try to use smallplugin to do that but not working.

someone cant help?
philc
 
Posts: 5
Joined: Wed Nov 23, 2016 1:56 pm

Re: Need a help to make a registry access

Postby Nigg » Wed Nov 23, 2016 9:48 pm

You can execute reg.exe. For example:

reg add "HKLM\SOFTWARE\Intel\GMM" /v DedicatedSegmentSize /t REG_DWORD /d 256
Nigg
 
Posts: 25
Joined: Thu Apr 14, 2011 2:10 pm

Re: Need a help to make a registry access

Postby philc » Thu Nov 24, 2016 3:24 am

Not working this command...
i try to run in admin mode and not working too
philc
 
Posts: 5
Joined: Wed Nov 23, 2016 1:56 pm

Re: Need a help to make a registry access

Postby philc » Thu Nov 24, 2016 4:38 am

Link of my project.

http://www90.zippyshare.com/v/4rCHvDm5/file.html

Well, i think to use this command need a admin privileges.

On my batch script working starting directly, but if i put the mmb to call this script he enter a infinity loop.

Batch script

@echo off

:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

"%temp%\getadmin.vbs"
exit /B

:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
reg add "HKLM\SOFTWARE\Intel\GMM" /v DedicatedSegmentSize /t REG_DWORD /d 296 /f
:--------------------------------------

<YOUR BATCH SCRIPT HERE>

Another thing the correct vaule to make a 128 is 296...

I put a editbox to return registry setting and not work too..

Someone help me please :)
philc
 
Posts: 5
Joined: Wed Nov 23, 2016 1:56 pm

Re: Need a help to make a registry access

Postby Nigg » Thu Nov 24, 2016 6:15 am

Code: Select all
Run("reg.exe","add "HKLM\SOFTWARE\Intel\GMM" /v DedicatedSegmentSize /t REG_DWORD /d xxx")


Your syntax is incorrect. You have to escape the chars and call a seperated string as a parameter:

Code: Select all
params$ = 'HIDE ' + 'add "HKLM\SOFTWARE\Intel\GMM" /v DedicatedSegmentSize /t REG_DWORD /d xxx'
***
Run("reg.exe","params$")


Another variant, cause I don't know whats happening with the " ":
Code: Select all
params$ = 'HIDE ' + 'add ' + CHR(180) + 'HKLM\SOFTWARE\Intel\GMM' + CHR(180) + ' /v DedicatedSegmentSize /t REG_DWORD /d xxx'


As a bonus, the reg.exe console-window doesn't appear. But it should trigger UAC itself without any detection. (not tried it myself, this is just demo code)

Btw: There a different ways adding registry entries like dword with reg.exe. As an alternative, you can add .reg files into the project and "import" them with regedit /s <SrcDir>\regfile.reg
Nigg
 
Posts: 25
Joined: Thu Apr 14, 2011 2:10 pm

Re: Need a help to make a registry access

Postby philc » Thu Nov 24, 2016 8:26 am

Thank's for help...

Another question, how to show the registry value in editbox1
philc
 
Posts: 5
Joined: Wed Nov 23, 2016 1:56 pm

Re: Need a help to make a registry access

Postby philc » Thu Nov 24, 2016 8:35 am

o try using regedit.exe

Run("regedit","/s <Embededd>\vram512.reg")

not working

Edit

params$ = 'add' + CHR(180) + ',<Embedded>\vram512.reg'
Run("regedit.exe","params$")

appears need a admin privilegies....
philc
 
Posts: 5
Joined: Wed Nov 23, 2016 1:56 pm

Re: Need a help to make a registry access

Postby Nigg » Mon Dec 19, 2016 12:49 pm

On my PC, Windows 10 asks for admin previlegies, but I've you have an issue with calling regedit /s, you can embed an optional batch-file and call it with parameters.

Within the batch, you can use different ways to elevate: https://www.raymond.cc/blog/trigger-uac ... e-utility/

I would prefer this cause VBS is often disabled.
Nigg
 
Posts: 25
Joined: Thu Apr 14, 2011 2:10 pm


Return to MMB

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest