Topic: K-Lite Mega codec Pack 9.9.0  (Read 2545 times)

K-Lite Mega codec Pack 9.9.0
« on: May 10, 2013, 02:21:05 PM »

carloscape

  • Jr. Chef
  • **
  • Date Registered: Apr 2013
  • Posts: 56
I'm working on a script for K-lite Mega codec pack, and have run into the following lines after RegCPE:

RegWrite,HKLM,0x1,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32,CodeBase,"file:///C:/Program Files/K-Lite Codec Pack/Icaros/IcarosPropertyHandler.DLL"
RegWrite,HKLM,0x1,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32\2.2.1.0,CodeBase,"file:///C:/Program Files/K-Lite Codec Pack/Icaros/IcarosPropertyHandler.DLL"

How would those translate well on the PE? Particularly this part: file:///C:/Program Files/K-Lite Codec Pack/Icaros/IcarosPropertyHandler.DLL"
I have considered simply saying  %PE_Programs%/%ProgramFolder%/Icaros/IcarosPropertyHandler.DLL but not sure if that would work, particularly since pe_programs would have a \ in the way.

Re: K-Lite Mega codec Pack 9.9.0
« Reply #1 on: May 10, 2013, 03:06:08 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Hi carloscape,

Try with something like this, it should do the trick

Code: [Select]
set,%w%,%TempFolder%\Klite.script
If,ExistFile,%w%,FileDelete,%w%
FileCreateBlank,%w%
TXTAddLine,%w%,[RegKlite],Append
TXTAddLine,%w%,"Set,#$pKliteValue#$p,file:///%PE_Programs%/%ProgramFolder%/Icaros/IcarosPropertyHandler.DLL",Append
TXTReplace,%w%,\,/
TXTAddLine,%w%,"RegWrite,HKLM,0x1,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32,CodeBase,#$pKliteValue#$p",Append
TXTAddLine,%w%,"RegWrite,HKLM,0x1,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32\2.2.1.0,CodeBase,#$pKliteValue#$p",Append
Run,%w%,RegKlite


Edit: a little cleaner

:cheers:
« Last Edit: May 10, 2013, 03:15:38 PM by ChrisR »

Re: K-Lite Mega codec Pack 9.9.0
« Reply #2 on: May 10, 2013, 03:42:51 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Another way:

With %ProgramFolder%=K-Lite Codec Pack
particularly since pe_programs would have a \ in the way.
--> hence not having \ in the way  :wink:

==
StrFormat,Replace,%PE_Programs%,\,/,%t%
RegWrite,HKLM,0x2,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32,CodeBase,"file:///%t%/%ProgramFolder%/Icaros/IcarosPropertyHandler.DLL"
RegWrite,HKLM,0x2,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32\2.2.1.0,CodeBase,"file:///%t%/%ProgramFolder%/Icaros/IcarosPropertyHandler.DLL"






OR ( Maybe better fits, up to how plugin designed.......)

%ProgramFolder%=K-Lite Codec Pack
%SubFolderIcaros%=Icaros

StrFormat,Replace,%PE_Programs%,\,/,%t%
RegWrite,HKLM,0x2,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32,CodeBase,"file:///%t%/%ProgramFolder%/%SubFolderIcaros%/IcarosPropertyHandler.DLL"
RegWrite,HKLM,0x2,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32\2.2.1.0,CodeBase,"file:///%t%/%ProgramFolder%/%SubFolderIcaros%/IcarosPropertyHandler.DLL"


General Tip: don't forget 0x1 --> 0x2 tranformation when using %PE_Programs%  :wink:
« Last Edit: May 10, 2013, 03:53:11 PM by Lancelot »

Re: K-Lite Mega codec Pack 9.9.0
« Reply #3 on: May 10, 2013, 03:46:21 PM »

carloscape

  • Jr. Chef
  • **
  • Date Registered: Apr 2013
  • Posts: 56
My Question was in regards that %PE_PROGRAMS% would point to either y:\programs or x:\program files, when the line should be y:/programs or x:/program files.

Re: K-Lite Mega codec Pack 9.9.0
« Reply #4 on: May 10, 2013, 03:55:18 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
My Question was in regards that %PE_PROGRAMS% would point to either y:\programs or x:\program files, when the line should be y:/programs or x:/program files.
or X:\Program Filex or %SystemDrive%\Program Files or ....

ups, I fixed my previous post (ChrisR's was correct at first place ;) ), which now I hope point what you ask :turtle:

Re: K-Lite Mega codec Pack 9.9.0
« Reply #5 on: May 10, 2013, 06:14:08 PM »

carloscape

  • Jr. Chef
  • **
  • Date Registered: Apr 2013
  • Posts: 56
I'll try this one:

Another way:

With %ProgramFolder%=K-Lite Codec Pack

==
StrFormat,Replace,%PE_Programs%,\,/,%t%
RegWrite,HKLM,0x2,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32,CodeBase,"file:///%t%/%ProgramFolder%/Icaros/IcarosPropertyHandler.DLL"
RegWrite,HKLM,0x2,Tmp_Software\Classes\CLSID\{0C08E2BB-D10B-4CC9-B1B3-701F5BE9D6EC}\InprocServer32\2.2.1.0,CodeBase,"file:///%t%/%ProgramFolder%/Icaros/IcarosPropertyHandler.DLL"


 

Powered by EzPortal