[Main]
Title=WIMMaster v14.12.2007
Author=martinr, MichaelZ
Level=3
Version=012
Description=Requires WAIK to be present when using DVD as source
Locked=false
Contact=
Date=08.02.2008
Selected=False
Download_Level=2

[Variables]
%ProgramEXE%=WIMMaster.exe
%ProgramFolder%=WIMMaster
%ProgramTitle%=WIMMaster

[Process]
Echo,Processing %ProgramTitle%...
run,%ScriptFile%,CopySystemFiles
RunFromRam,%pCheckBox1%
Unpack,Folder,WIMMaster.7z,True
Add_Shortcut,StartMenu,Disk Tools
If,%pCheckBox2%,Equal,True,Add_Shortcut,Desktop
run,%ScriptFile%,Setting

[CopySystemFiles]
If,ExistFile,"%SourceDir%\sources\boot.wim",run,%ScriptFile%,CopySystemFilesUsingCDasSource
If,NotExistFile,"%SourceDir%\sources\boot.wim",run,%ScriptFile%,CopySystemFilesUsingWAIKasSource

[CopySystemFilesUsingCDasSource]
# has WAIK been specified in Base\01-preconfig even though using DVD as source?
ReadENV
If,NotExistFile,"%WAIKDir%\Tools\x86\wimgapi.dll",Exit,"Error! WIMMaster script can not be processed - Not supported using DVD as source and WAIK not present."
If,ExistFile,"%WAIKDir%\Tools\x86\wimgapi.dll",Set,"%SysFilesDir%","%WAIKDir%"
Run,%ScriptFile%,CopySystemFilesDoIt

[CopySystemFilesUsingWAIKasSource]
ReadENV
Set,"%SysFilesDir%","%SDIR%"
Run,%ScriptFile%,CopySystemFilesDoIt

[CopySystemFilesDoIt]
FileCopy,"%SysFilesDir%\Tools\x86\wimfltr.sys","%TargetDir%\Windows\System32\drivers"
FileCopy,"%SysFilesDir%\Tools\x86\wimgapi.dll","%TargetDir%\Windows\System32"

[Setting]
Echo,Processing registry...
RegHiveLoad,Tmp_setupreg_hiv,%RegSystem%
RegWrite,"HKLM",0x4,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","Type","2"
RegWrite,"HKLM",0x4,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","Start","2"
RegWrite,"HKLM",0x4,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","ErrorControl","1"
RegWrite,"HKLM",0x4,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","Tag","2"
RegWrite,"HKLM",0x2,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","ImagePath","system32\drivers\wimfltr.sys"
RegWrite,"HKLM",0x1,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","DisplayName","WimFltr"
RegWrite,"HKLM",0x1,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","Group","FSFilter Compression"
RegWrite,"HKLM",0x7,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","DependOnService","FltMgr"
RegWrite,"HKLM",0x1,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","Description","Windows Image Mini-Filter Driver"
RegWrite,"HKLM",0x4,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr","DebugFlags","1"
RegWrite,"HKLM",0x1,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr\Instances","DefaultInstance","WimFltr Instance"
RegWrite,"HKLM",0x1,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr\Instances\WimFltr Instance","Altitude","170500"
RegWrite,"HKLM",0x4,"Tmp_setupreg_hiv\ControlSet001\Services\WimFltr\Instances\WimFltr Instance","Flags","0"
RegHiveUnLoad,Tmp_setupreg_hiv

[Interface]
pCheckBox1="Run from ram (boot.wim)",1,3,10,40,200,18,True
pCheckBox2="Add shortcut to desktop",1,3,9,66,200,18,False

[EncodedFolders]
Folder

[Folder]
WIMMaster.7z=31Kb,41Kb

[EncodedFile-Folder-WIMMaster.7z]
lines=10
[encoded data, 42627 characters]

