Thread: Registry plugin
View Single Post
Old 18th August 2005, 14:16   #8
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
Short question cause urgent

can i find all entries "defaulticon" with it ?
And can i export them ?

###
well that works, but i have empty entries

code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.nsc\DefaultIcon]
@=''


it has to be
code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.nsc\DefaultIcon]
@="dxmasf.dll,-502"


not all are empty
code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Scripting Host\Script Extensions\.JS\DefaultIcon]
@='%SystemRoot%\System32\wscript.exe,3'


PHP Code:
Name "DefaultIcon"
OutFile "DefaultIcon.exe"

Section 
SectionEnd

Function .onInit
  IfFileExists 
"DefaultIcon.reg" 0 noreg
    Delete DefaultIcon
.reg
  noreg
:

  
FileOpen $R1 "DefaultIcon.reg" w
  FileWrite $R1 
"REGEDIT4"
  
FileWriteByte $R1 "13"
  
FileWriteByte $R1 "10"
  
FileWriteByte $R1 "13"
  
FileWriteByte $R1 "10"

  
registry::Open /NOUNLOAD "HKEY_LOCAL_MACHINE" "/K=1 /V=1 /S=1 /B=1 /N='DefaultIcon'" .r0
  StrCmp 
$-1 end

  loop
:
    
registry::Find /NOUNLOAD .r1 .r2 .r3 .r4
    IfErrors end
    StrCmp 
$"" end
    StrCmp 
$"" end
    
;StrCmp $"" loop
    
;StrCmp $"" loop

    FileWrite $R1 
"[HKEY_LOCAL_MACHINE\$1\$2]"
    
FileWriteByte $R1 "13"
    
FileWriteByte $R1 "10"
    
FileWrite $R1 "@='$3'"
    
FileWriteByte $R1 "13"
    
FileWriteByte $R1 "10"
    
FileWriteByte $R1 "13"
    
FileWriteByte $R1 "10"

  
Goto loop

  end
:
  
registry::Close

FileClose $R1
FunctionEnd 

Greets, Brummelchen

Last edited by Brummelchen; 18th August 2005 at 14:50.
Brummelchen is offline   Reply With Quote