[Main]
Title=ImDisk Ramdisk for VistaPE
Author=fuwi
Level=3
Version=011
Description=Attention: The Script "Control Panel Item" (in "Addons") must be enabled!
Locked=false
Date=Nov-15-2007
Selected=False
Contact=http://www.ltr-data.se/opencode#ImDisk
Credits=to Olof Lagerkvist, author of ImDisk, http://www.ltr-data.se
Download_Level=2

[Variables]
%ProgramTitle%=ImDisk Virtual Drive Management
%ProgramEXE%=imdisk.cpl
%RamDrvLetter%=B:
%RamDrvSize%=50

[Process]
Echo,Processing ImDisk Ramdisk for VistaPE...
ExtractAllFiles,"%ScriptFile%","Files","%TargetDir%\Windows\System32"
ExtractAllFiles,"%ScriptFile%","Drivers","%TargetDir%\Windows\System32\drivers"
Add_Shortcut,StartMenu,System,%SystemRoot%\System32\%ProgramEXE%,%ProgramTitle%
If,%pRadioButton1%,Equal,true,Set,%RamDrvSize%,"70"
If,%pRadioButton2%,Equal,true,Set,%RamDrvSize%,"60"
If,%pRadioButton3%,Equal,true,Set,%RamDrvSize%,"50"
If,%pRadioButton4%,Equal,true,Set,%RamDrvSize%,"40"
If,%pRadioButton5%,Equal,true,Set,%RamDrvSize%,"30"
If,%pRadioButton6%,Equal,true,Set,%RamDrvSize%,"20"
If,%pRadioButton7%,Equal,true,Set,%RamDrvSize%,"10"
If,%pScrollBox1%,Equal,"B:",Set,%RamDrvLetter%,"B:"
If,%pScrollBox1%,Equal,"O:",Set,%RamDrvLetter%,"O:"
If,%pScrollBox1%,Equal,"P:",Set,%RamDrvLetter%,"P:"
If,%pScrollBox1%,Equal,"Q:",Set,%RamDrvLetter%,"Q:"
If,%pScrollBox1%,Equal,"R:",Set,%RamDrvLetter%,"R:"
# Create the Ramdisk at Boottime:
AddAutoRun,"Install ImDisk Ramdisk","X:\Windows\System32\imdiskrd.exe","%RamDrvSize%",2
RegHiveLoad,WB-System,%RegSystem%
RegWrite,HKLM,0x4,"WB-System\ControlSet001\Enum\Root\LEGACY_IMDISK\0000\Control","*NewlyCreated*","0"
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Enum\Root\LEGACY_IMDISK\0000\Control","ActiveService","ImDisk"
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Enum\Root\LEGACY_IMDISK\0000","Service","ImDisk"
RegWrite,HKLM,0x4,"WB-System\ControlSet001\Enum\Root\LEGACY_IMDISK\0000","Legacy","1"
RegWrite,HKLM,0x4,"WB-System\ControlSet001\Enum\Root\LEGACY_IMDISK\0000","ConfigFlags","0"
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Enum\Root\LEGACY_IMDISK\0000","Class","LegacyDriver"
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Enum\Root\LEGACY_IMDISK\0000","ClassGUID","{8ECC055D-047F-11D1-A537-0000F8753ED1}"
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Enum\Root\LEGACY_IMDISK\0000","DeviceDesc","ImDisk Virtual Disk Driver"
RegWrite,HKLM,0x4,"WB-System\ControlSet001\Enum\Root\LEGACY_IMDISK","NextInstance","1"
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Services\ImDisk\Enum","0","Root\LEGACY_IMDISK\0000"
RegWrite,HKLM,0x4,"WB-System\ControlSet001\Services\ImDisk\Enum","Count","1"
RegWrite,HKLM,0x4,"WB-System\ControlSet001\Services\ImDisk\Enum","NextInstance","1"
RegWrite,HKLM,0x4,"WB-System\ControlSet001\Services\ImDisk","Type","1"
RegWrite,HKLM,0x4,"WB-System\ControlSet001\Services\ImDisk","Start","0"
RegWrite,HKLM,0x4,"WB-System\ControlSet001\Services\ImDisk","ErrorControl","0"
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Services\ImDisk","ImagePath","system32\DRIVERS\imdisk.sys"
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Services\ImDisk","DisplayName","ImDisk Virtual Disk Driver"
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Services\ImDisk","Description","Disk emulation driver"
# Add ramdrv environment variable:
RegWrite,HKLM,0x1,"WB-System\ControlSet001\Control\Session Manager\Environment","RamDrv","%RamDrvLetter%"
RegHiveUnLoad,WB-System

[Interface]
pTextLabel1="Ramdisk Capacity:",1,1,134,10,230,23,8,Bold
pRadioButton1="70% of free RAM",1,11,134,40,110,20,false
pRadioButton2="60% of free RAM",1,11,134,70,110,20,false
pRadioButton3="50% of free RAM",1,11,134,100,110,20,false
pRadioButton4="40% of free RAM",1,11,134,130,110,20,false
pRadioButton5="30% of free RAM",1,11,134,160,110,20,false
pRadioButton6="20% of free RAM",1,11,134,190,110,20,false
pRadioButton7="10% of free RAM",1,11,134,220,110,20,true
pTextLabel2="Drive Letter:",1,1,285,13,230,18,8,Bold
pScrollBox1=B:,1,4,285,40,73,21,B:,O:,P:,Q:,R:
pImage1=Ramdisk.jpg,1,5,9,17,100,100

[InterfaceEncoded]
Ramdisk.jpg=4Kb,6Kb

[EncodedFolders]
Files
Drivers

[Drivers]
imdisk.sys=10Kb,14Kb

[Files]
imdiskrd.exe=233Kb,312Kb
imdisk.exe=14Kb,18Kb
imdisk.cpl=29Kb,39Kb

[EncodedFile-Files-imdiskrd.exe]
lines=78
[encoded data, 319610 characters]

[EncodedFile-Drivers-imdisk.sys]
lines=3
[encoded data, 14787 characters]

[EncodedFile-Files-imdisk.exe]
lines=4
[encoded data, 19449 characters]

[EncodedFile-Files-imdisk.cpl]
lines=9
[encoded data, 40108 characters]

[EncodedFile-InterfaceEncoded-Ramdisk.jpg]
lines=1
[encoded data, 6743 characters]

[EncodedFile-AuthorEncoded-Imdisk.gif]
lines=1
[encoded data, 4948 characters]

[AuthorEncoded]
Imdisk.gif=3Kb,4Kb
Logo=Imdisk.gif

