Jump to content

Help importing reg file, please...


Recommended Posts

I try import reg file trough WPI with {REGEDIT} command, but HKLM values are not imported... how I could import HKLM values silently...?

I use Win 7 Pro x64 with Admin user and UAC disabled...

Reg file:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Power Menu]
"MUIVerb"="Power"
"SubCommands"="lock;logoff;switch;sleep;hibernate;restart;shutdown"
"Icon"="shell32.dll,215"
"Position"="bottom"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power Menu]
"MUIVerb"="Power"
"SubCommands"="lock;logoff;switch;sleep;hibernate;restart;shutdown"
"Icon"="shell32.dll,215"
"Position"="bottom"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\lock]
@="Bloquear"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\lock\command]
@="Rundll32 User32.dll,LockWorkStation"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\logoff]
@="Cerrar Sesión"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\logoff\command]
@="Shutdown -l"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\switch]
@="Cambiar de Usuario"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\switch\command]
@="tsdiscon.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\sleep]
@="Suspender"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\sleep\command]
@="rundll32.exe powrprof.dll,SetSuspendState Sleep"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hibernate]
@="Hibernar"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hibernate\command]
@="Shutdown -h"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\restart]
@="Reiniciar"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\restart\command]
@="Shutdown -r -f -t 00"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\shutdown]
@="Apagar"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\shutdown\command]
@="Shutdown -s -f -t 00"

If I run regedit /s regfile.reg in CMD console, work perfect, bu if I run regfile.cmd (with same command) trough WPI, I have seme result, HKLM values not imported...

I try regfile.reg trough WinRAR sfx also, but result it's same...

Regards... ;-)

Edited by alfreire
Link to comment
Share on other sites


Have you set the complete location path for your registry key using {REGEDIT} command ?

Yes, it's this cmds[pn]=['{REGEDIT} "%wpipath%\\Install\\Tweaks\\PowerMenu.reg"']; HKCR values are imported, but HKLM values not...

Regards... ;-)

Edited by alfreire
Link to comment
Share on other sites

prog[pn]=['Trucos Windows-7 Power Menu'];
uid[pn]=['TRUCOSW72'];
ordr[pn]=[2];
dflt[pn]=['no'];
forc[pn]=['no'];
bit64[pn]=['no'];
cat[pn]=['Sistema'];
configs[pn]=
pfro[pn]=['no'];
cmds[pn]=['{REGEDIT} "%wpipath%\\Install\\Tweaks\\PowerMenu.reg"'];
cond[pn]=['getOSver()=="Win7"'];
desc[pn]=['Power Menú en Mi PC y Escritorio'];
pn++;

I don't know why, but [HKEY_CLASSES_ROOT\Directory\Background\Shell\Power Menu] don't work menu, [HKEY_CLASSES_ROOT\Directory\Background\Shell\Power Menu] yes work...

Link to comment
Share on other sites

I think you mean, like I said before:

Do not work:

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power Menu]

Works:

[HKEY_CLASSES_ROOT\Directory\Background\Shell\Power Menu]

Edited by myselfidem
Link to comment
Share on other sites

I don't know why, but [HKEY_CLASSES_ROOT\Directory\Background\Shell\Power Menu] don't work menu, [HKEY_CLASSES_ROOT\Directory\Background\Shell\Power Menu] yes work...

Take care when you write!

The example I given is correct! Try to use a registry cleaner and you will see no more your commands on the desktop!

Cheers

Edited by myselfidem
Link to comment
Share on other sites

I copy reg from here http://www.askvg.com/add-cascading-menu-for-restart-shut-down-hibernate-and-other-power-shortcuts-in-desktop-context-menu-of-windows-7-and-8/

Also don't work

Windows Registry Editor Version 5.00

;Administrar (sólo para ordenar el menú alfabéticamente, añade un 0 antes del nombre)
[-HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Manage]

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\0Manage]
@=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,\
00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,\
79,00,63,00,6f,00,6d,00,70,00,75,00,74,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,\
00,34,00,30,00,30,00,00,00
"MUIVerb"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
00,6d,00,79,00,63,00,6f,00,6d,00,70,00,75,00,74,00,2e,00,64,00,6c,00,6c,00,\
2c,00,2d,00,34,00,30,00,30,00,00,00
"SuppressionPolicy"=dword:4000003c
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\0Manage\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,43,00,6f,00,\
6d,00,70,00,4d,00,67,00,6d,00,74,00,4c,00,61,00,75,00,6e,00,63,00,68,00,65,\
00,72,00,2e,00,65,00,78,00,65,00,00,00

;Administrador de Dispositivos
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\1DevMgr]
@="Administrador de Dispositivos"
"icon"="control.exe"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\1DevMgr\command]
@="mmc /s devmgmt.msc"

;Administrador de discos
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\2DiskMgmt]
@="Administrador de Discos"
"Icon"="dmdskres.dll"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\2DiskMgmt\command]
@="mmc /s diskmgmt.msc"

;Services
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Services]
@=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,\
68,00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,\
00,32,00,30,00,35,00,39,00,00,00
"SuppressionPolicy"=dword:4000003c
"HasLUAShield"=""
"Icon"=hex(2):66,00,69,00,6c,00,65,00,6d,00,67,00,6d,00,74,00,2e,00,64,00,6c,\
00,6c,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Services\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,\
63,00,2e,00,65,00,78,00,65,00,20,00,2f,00,73,00,20,00,25,00,53,00,79,00,73,\
00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,\
74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,65,00,72,00,76,00,69,00,63,00,65,\
00,73,00,2e,00,6d,00,73,00,63,00,00,00

;Task Manager
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Task Manager]
"Icon"=hex(2):74,00,61,00,73,00,6b,00,6d,00,67,00,72,00,2e,00,65,00,78,00,65,\
00,00,00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Task Manager\command]
@="taskmgr.exe"

;MSConfig
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\MSConfig]
"Icon"=hex(2):6d,00,73,00,63,00,6f,00,6e,00,66,00,69,00,67,00,2e,00,65,00,78,\
00,65,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\MSConfig\command]
@="msconfig.exe"

;Command Prompt
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\CMD]
@="Command Prompt"
"icon"="cmd.exe"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\CMD\command]
@="cmd.exe"

;Regedit
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Regedit]
@="Regedit"
"icon"="regedit.exe"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Regedit\command]
@="regedit.exe"

;Desinstalar Programas
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Add/Remove Programs]
@="Desinstalar Programas"
"Icon"=hex(2):77,00,65,00,78,00,74,00,72,00,61,00,63,00,74,00,2e,00,65,00,78,\
00,65,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Add/Remove Programs\command]
@="control appwiz.cpl"

;Notepad++
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Notepad]
"icon"="C:\\Program Files (x86)\\Notepad++\\notepad++.exe"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Notepad\command]
@="Notepad++.exe"

;Windows Update
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Windows Update]
"Icon"=hex(2):77,00,75,00,63,00,6c,00,74,00,75,00,78,00,2e,00,64,00,6c,00,6c,\
00,00,00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Windows Update\command]
@="wuapp.exe"

;Abrir CMD en el Explorador con el botón derecho
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Abrir CMD aquí"
"Icon"="cmd.exe"

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

post-329917-0-21373700-1340014618_thumb.

Edited by alfreire
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...