[main] Title=Retrieve Project Info Description=This script checks the source CD and writes information about the OS and service pack inside the ProjectInfo.ini file Selected=True Level=1 Locked=True Author=Peter Schlang Version=012 Contact=http://Bootland.pt.vu Date=2007-Mar-26 Credits=d4vr0s for his post http://www.911cd.net/forums//index.php?s=bca6d20a0d49c0497db9f9ab7dfe5633&showtopic=15138&st=0&p=97354&#entry97354 Upload=2007-Jun-05 13:28:05 Download_Level=0 [Variables] %Title%= %TimeStamp%= %DateStamp%= %OSType%= %OSSubType%= %OSServicePack%= %myTemp%= %cmd%= %spCab%= %drCab%= %spCabFile%= %drCabFile%= %driverIndex%=DRVINDEX.INF %allFiles%=%ProjectTemp%\all.txt %sglFiles%=%ProjectTemp%\sgl.txt %myLang%= [Delete-Iso] If,ExistFile,"%ISODir%\%ISO%.iso",FileDelete,"%ISODir%\%ISO%.iso" If,ExistFile,"%ISOfile%",FileDelete,"%ISOfile%" [Process] Echo,"Processing ProjectInfo File ..." If,NotExistDir,"%ProjectTemp%",DirMake,"%ProjectTemp%" Run,%ScriptFile%,Create-Info If,ExistFile,"%SourceDir%\CDROM_NT.5",Set,"%OSType%","W2000" If,ExistFile,"%SourceDir%\WIN51IP",Set,"%OSType%","XP" If,ExistFile,"%SourceDir%\WIN51IC",Set,"%OSType%","XP" If,ExistFile,"%SourceDir%\WIN51IL",Set,"%OSType%","W2003" If,ExistFile,"%SourceDir%\WIN51ID",Set,"%OSType%","W2003" If,ExistFile,"%SourceDir%\WIN51IA",Set,"%OSType%","W2003" If,ExistFile,"%SourceDir%\WIN51IS",Set,"%OSType%","W2003" If,ExistFile,"%SourceDir%\WIN51IB",Set,"%OSType%","W2003" Echo,"Retrieving Source info ..." Run,%ScriptFile%,retrieveOS If,"%OSType%",notequal,"",Echo,"Source#$sdetected:#$s%OSType%#$s%OSSubType%#$s%OSServicePack%" IniWrite,"%ProjectInfo%","Created","WinBuilderVersion",%Version% IniRead,"%ProjectInfo%","Project","RamISORootName","%ISO%" IniWrite,"%ProjectInfo%","OS","OldOS",None If,%pCheckBox2%,Equal,True,Run,%ScriptFile%,Delete-Iso If,ExistFile,"%PreISOScript%",FileDelete,"%PreISOScript%" If,ExistFile,"%PostISOScript%",FileDelete,"%PostISOScript%" IniWrite,"%ProjectInfo%","RamDrive","DriveLetter","%RAMDriveLetter%" IniWrite,"%ProjectInfo%","RamDrive","Settings","%SettingsDrive%" IniWrite,"%ProjectInfo%","Project","HoJoPELevel",%HoJoPELevel% Run,%ScriptLog%,Process-log [Create-Info] If,ExistFile,%ProjectInfo%,FileDelete,"%ProjectInfo%" FileCreateBlank,"%ProjectInfo%" TXTAddLine,%ProjectInfo%,"[Project]","Append" ShellExecute,Hide,"cmd.exe", "/c for /D %l in (#$q%ProjectDir%#$q) do echo ProjectName=%~nl >> #$q%ProjectInfo%#$q" ShellExecute,Hide,"cmd.exe", "/c for /f #$qtokens=*#$q %l in ("%IsoFile%") do echo ISORootName=%~nl >> #$q%ProjectInfo%#$q" ShellExecute,Hide,"cmd.exe", "/c for /f #$qtokens=*#$q %l in ("%IsoFile%") do echo RamISORootName=%~nl_RAM >> #$q%ProjectInfo%#$q" TXTAddLine,%ProjectInfo%,"","Append" TXTAddLine,%ProjectInfo%,"[Created]","Append" ShellExecute,Hide,"cmd.exe", "/c for /f #$qtokens=*#$q %l in ('Date /T') do echo Date=%l >> #$q%ProjectInfo%#$q" ShellExecute,Hide,"cmd.exe", "/c for /f #$qtokens=*#$q %l in ('Time /T') do echo Time=%l >> #$q%ProjectInfo%#$q" ShellExecute,Hide,"cmd.exe", "/c for /f #$qtokens=*#$q %l in ('Ver') do echo HostOS=%l >> #$q%ProjectInfo%#$q" IniWrite,"%ProjectInfo%","Project","BootISO","" TXTAddLine,%ProjectInfo%,"","Append" TXTAddLine,%ProjectInfo%,"[Scripts]","Append" [retrieveOS] If,ExistFile,"%SourceDir%\CDROM_IA.5",Set,"%OSSubType%","Advanced Server" If,ExistFile,"%SourceDir%\CDROM_IP.5",Set,"%OSSubType%","Professional" If,ExistFile,"%SourceDir%\CDROM_IS.5",Set,"%OSSubType%","Server" If,ExistFile,"%SourceDir%\WIN51IP",Set,"%OSSubType%","Pro" If,ExistFile,"%SourceDir%\WIN51IC",Set,"%OSSubType%","Home" If,ExistFile,"%SourceDir%\WIN51IL",Set,"%OSSubType%","Small Business" If,ExistFile,"%SourceDir%\WIN51ID",Set,"%OSSubType%","Data Center" If,ExistFile,"%SourceDir%\WIN51IA",Set,"%OSSubType%","Enterprise" If,ExistFile,"%SourceDir%\WIN51IS",Set,"%OSSubType%","Standard" If,ExistFile,"%SourceDir%\WIN51IB",Set,"%OSSubType%","Web" IniWrite,"%ProjectInfo%","OS","Type",%OSType% IniWrite,"%ProjectInfo%","OS","OldOS",%OSType% IniWrite,"%ProjectInfo%","OS","SubType",%OSSubType% If,ExistFile,%allFiles%,FileDelete,%allFiles% If,ExistFile,%sglFiles%,FileDelete,%sglFiles% IniRead,"%SourceDir%\I386\%driverIndex%","Version","CabFiles","%myTemp%" FileCreateBlank,%allFiles% TXTAddLine,%allFiles%,"%myTemp%","Append" FileCreateBlank,%sglFiles% TXTAddLine,%sglFiles%,"[CabLinks]","Append" Set,"%cmd%","/c for /f #$qtokens=1-2 delims=#$c#$q %a in ('Type #$q%allFiles%#$q') do echo link1=%a >> #$q%sglFiles%#$q&echo link2=%b >> #$q%sglFiles%#$q" ShellExecute,Hide,"cmd.exe","%cmd%" IniRead,"%sglFiles%","CabLinks","link1","%spCab%" IniRead,"%sglFiles%","CabLinks","link2","%drCab%" If,%drCab%,NotEqual,"",If,%spCab%,NotEqual,"",IniRead,"%SourceDir%\I386\%driverIndex%","Cabs","%spCab%","%spCabFile%" If,%drCab%,Equal,"",If,%spCab%,NotEqual,"",IniRead,"%SourceDir%\I386\%driverIndex%","Cabs","%spCab%","%drCabFile%" If,%drCab%,NotEqual,"",IniRead,"%SourceDir%\I386\%driverIndex%","Cabs","%drCab%","%drCabFile%" Set,%OSServicePack%,%spCab% If,%OSServicePack%,Equal,"",Set,%OSServicePack%,NO_SP RegRead,"HKEY_USERS",".DEFAULT\Control Panel\International","Locale","%myLang%" IniWrite,"%ProjectInfo%","Created","Locale",%myLang% IniRead,"%SourceDir%\I386\txtsetup.sif","nls","DefaultLayout",%myLang% IniWrite,"%ProjectInfo%","OS","ServicePack",%OSServicePack% IniWrite,"%ProjectInfo%","OS","DefaultLocale",%myLang% IniWrite,"%ProjectInfo%","Cabs","SP_CAB","%spCabFile%" IniWrite,"%ProjectInfo%","Cabs","DR_CAB","%drCabFile%" //FileDelete,%allFiles% //FileDelete,%sglFiles% [Interface] pTextLabel1="Define additional Tasks for this script:",1,1,15,25,315,18,10,Bold pCheckBox2="Delete ISOs",1,3,51,55,87,18,True pBevel2=pBevel2,1,12,6,16,465,72 pTextFile1=ProjectInfo.txt,1,6,7,14,464,238 [InterfaceEncoded] ProjectInfo.txt=480,640 [AuthorEncoded] projectInfo.jpg=2Kb,2Kb Logo=projectInfo.jpg [EncodedFile-InterfaceEncoded-ProjectInfo.txt] lines=0 0=eJyNUsFKAzEQPVvoPwwLuci6oN5EhFoVioWWdkVFRNLNtI3NZpYkW92/dxJbPQjFS2aSmfd4bzKnBcwrp5swphUsUYbWYb93VBJo64M0BsIawacWML89XAa5f6cldNQ6aBy9YxXiBdZyixAIqrW0K7zo95h1EBIbWhUhMX2ZOqrQ+1fwDNTEpEqlitE2CjmatTYXPxJFvgOcsJZY7vfOChjZBNFW6a1WrTQ7YT4pqWWXWD3VsWdJzL1B2GC3IOkUGMldATBUBTOOrH50OmCeiem3nRFDRJZnw9YHqlmE58v9Dj1O4CwX48Hz5KEsb59K8X8W9oVoZ+jJtNE983zCMYiu3wMAcikcIHuYPqHieKcNCs0vImVx2OdpLLhF1x36pkryyP0GsFgVsCQHk3kON04zrqjkIgffXH5exRQW3bexGUr1V8pkzkfZNchBTOYiO9Q8lItkf/o2HFxHgG+S8P+AbmZ7kHJ7EE+JV+0jDmlvtqK6llZ5UNjwwmm7Akpr4hG20rTo42/HSaXwBVXM8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