modules/post/windows/gather/enum_unattend.rb
#
# Initialize all 7 possible paths for the answer file
#
Initialize all 7 possible paths for the answer file
Initialize all 7 possible paths for the answer file
def init_paths
		drive = session.fs.file.expand_path("%SystemDrive%")
		files =
			[
				'unattend.xml',
				'autounattend.xml'
			]
		target_paths =
			[
				"#{drive}\\",
				"#{drive}\\Windows\\System32\\sysprep\\",
				"#{drive}\\Windows\\panther\\",
				"#{drive}\\Windows\\Panther\Unattend\\",
				"#{drive}\\Windows\\System32\\"
			]
		paths = []
		target_paths.each do |p|
			files.each do |f|
				paths << "#{p}#{f}"
			end
		end
		reg_path = get_registry_unattend_path
		paths << reg_path if not reg_path.empty?
		return paths
	end
def init_paths drive = session . fs . file . expand_path ( "%SystemDrive%" ) files = [ 'unattend.xml' , 'autounattend.xml' ] target_paths = [ "#{drive}\\" , "#{drive}\\Windows\\System32\\sysprep\\" , "#{drive}\\Windows\\panther\\" , "#{drive}\\Windows\\Panther\Unattend\\" , "#{drive}\\Windows\\System32\\" ] paths = [ ] target_paths . each do | p | files . each do | f | paths << "#{p}#{f}" end end reg_path = get_registry_unattend_path paths << reg_path if not reg_path . empty? return paths end
Initialize all 7 possible paths for the answer file
Initialize all 7 possible paths for the answer file
# If there is one for registry, we add it to the list too