(imported topic written by mcalvi91)
We are using a process to collect user data from a system prior to reimaging the system. When we run the task below, most of the time the process runs without issue. Every once in a while, something does not extract correctly and the process fails. We use the unzip utility we found in another fixlet somewhere to do the unzipping because we need the files in a certain location. Anyone have any insight on how to make this succeed in every instance vs fail every once in a while?
// pull down migrate script
continue if {(size of it = 7599732 AND sha1 of it = “9600ff6614efcc7e00da228961275143f9d1c39d”) of file “reimagezip.tmp” of folder “__Download”}
extract reimagezip.tmp
//Download UnZip Applicaton
download http://as-bigfix-loc.arvest.com:52311/Uploads/c881e91607dc8ac472ac692bc6b9dd0357b0d15a/bigCC.tmp
continue if {(size of it = 77984 and sha1 of it = “c881e91607dc8ac472ac692bc6b9dd0357b0d15a”) of file “bigCC.tmp” of folder “__Download”}
//Extract the command Line Unzip Utility (bigCC.tmp) extract bigCC.tmp
extract bigCC.tmp
dos rmdir /Q /S “C:\reimage”
dos copy “__download\unzip-5.52.exe” “C:\temp\unzip-5.52.exe”
dos copy “__download\reimage.zip” “C:\reimage.zip”
wait “c:\temp\unzip-5.52.exe” -o “c:\reimage.zip” -d “C:\reimage”
delete __appendfile
delete autologin.reg
appendfile REGEDIT4
appendfile
appendfile
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
appendfile “AutoAdminLogon”=“1”
appendfile “DefaultPassword”= “password”
appendfile “DefaultUserName”= “username”
appendfile “DefaultDomainName”= “domain”
appendfile
appendfile
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
appendfile “migratedata”=“c:\reimage\premigrate.cmd”
appendfile
appendfile
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system
appendfile “LegalNoticeText”=""
appendfile “LegalNoticeCaption”=""
move __appendfile autologin.reg
waithidden regedit /s “autologin.reg”
Mike