HomeHardware Independent Imaging SolutionPrinter Friendly Version

Hardware Independent Imaging Solution

This Knowledge Book contains information about common errors and problems encountered using HIIS for Altiris Deployment Solution 6.x.

1. Installation/Uninstallation

2. Analyzing

2.1. Enabling or Changing Custom Name Parsing (for model names)

The attached script will enable the disabled by default custom name parsing rule to remove 'service tag' items from the end of the model names in the Compatibility classes, and compress the existing compatibility classes to a single entry for the filter settings, and copy all previous associations to any of the classes to the 'target' class.

It also converts model associations to the custom name parsed entries.

For additional customization, change the Custom name parsing function at the top as needed.

use eXpress
GO
ALTER FUNCTION [dbo].[HIIS_CustomNameParsing]
(
	@fullprodname varchar(256)
)
RETURNS varchar(256)
AS
BEGIN
declare @retval as varchar(256)
set @retval = @fullprodname

select @retval = ltrim(rtrim(left(@fullprodname,
	case 
	when
	charindex('(',@fullprodname) = 0 then len(@fullprodname)
	else charindex('(',@fullprodname) -1 END
	)))

return @retval
END

GO
insert into HIIS_Association_Strings
(stringval,profid)
(
select stringval, profid from
(
select dbo.HIIS_CustomNameParsing(Model) as stringval, hrc.ProfID, ROW_NUMBER() over (partition by dbo.HIIS_CustomNameParsing(hrc.Model), hrc.profid order by ReferenceClassID) rn from HIIS_ReferenceClass hrc 
where Model <> dbo.HIIS_CustomNameParsing(Model)
) a where rn = 1
and not exists (
select * from HIIS_Association_Strings has where has.profid = a.ProfID and lower(has.stringval) = lower(a.stringval)
)
)

update hfa set AssociationId = mapping.target from
HIIS_Folders_Associations hfa join
(
select 
  hass.id as sourceid, hast.id as target
from 
	HIIS_ReferenceClass hrc 
	join HIIS_Association_Strings hass 
		on hrc.ProfID = hass.profid and 
		lower(hrc.Model) = lower(hass.stringval)
	join HIIS_Association_Strings hast
		on hrc.ProfID = hast.profid and
		lower(dbo.HIIS_CustomNameParsing(hrc.Model)) = lower(hast.stringval)
where hrc.Model <> dbo.HIIS_CustomNameParsing(hrc.Model)
) mapping on mapping.sourceid = hfa.AssociationId
where hfa.Associationtype = 500

update hfa set AssociationId = mapping.target from
HIIS_Dropins_Associations hfa join
(
select 
  hass.id as sourceid, hast.id as target
from 
	HIIS_ReferenceClass hrc 
	join HIIS_Association_Strings hass 
		on hrc.ProfID = hass.profid and 
		lower(hrc.Model) = lower(hass.stringval)
	join HIIS_Association_Strings hast
		on hrc.ProfID = hast.profid and
		lower(dbo.HIIS_CustomNameParsing(hrc.Model)) = lower(hast.stringval)
where hrc.Model <> dbo.HIIS_CustomNameParsing(hrc.Model)
) mapping on mapping.sourceid = hfa.AssociationId
where hfa.Associationtype = 500

update hfa set AssociationId = mapping.target from
HIIS_App_Associations hfa join
(
select 
  hass.id as sourceid, hast.id as target
from 
	HIIS_ReferenceClass hrc 
	join HIIS_Association_Strings hass 
		on hrc.ProfID = hass.profid and 
		lower(hrc.Model) = lower(hass.stringval)
	join HIIS_Association_Strings hast
		on hrc.ProfID = hast.profid and
		lower(dbo.HIIS_CustomNameParsing(hrc.Model)) = lower(hast.stringval)
where hrc.Model <> dbo.HIIS_CustomNameParsing(hrc.Model)
) mapping on mapping.sourceid = hfa.AssociationId
where hfa.Associationtype = 500
GO
CREATE TABLE #cte
(
[source] int,
[target] int
) 
insert into #cte
(source,target)
(
select distinct a.ID as source ,b.ID as target from 
(select hrc.NumbeofProcessors, model, dbo.HIIS_CustomNameParsing(model) parsedName, deviceLists.devices,hrc.ReferenceClassID,hrc.ProfID, ID from HIIS_ReferenceClass hrc join 
(select rc.ReferenceClassID,rc.ProfID, (select name + '|'+ manuf + '|'+ description +';' from dbo.HIIS_Get_filteredDefListDN(rc.ReferenceClassID, rc.ProfID) order by name,manuf,description for xml path('')) devices from HIIS_ReferenceClass rc) deviceLists
on deviceLists.ReferenceClassID = hrc.ReferenceClassID  and deviceLists.ProfID = hrc.ProfID
where dbo.HIIS_CustomNameParsing(ReferenceClassName) <> ReferenceClassName
) a
join 
(select hrc.NumbeofProcessors, model, deviceLists.devices,hrc.ReferenceClassID,hrc.ProfID, ID from HIIS_ReferenceClass hrc join 
(select rc.ReferenceClassID,rc.ProfID, (select name + '|'+ manuf + '|'+ description +';' from dbo.HIIS_Get_filteredDefListDN(rc.ReferenceClassID, rc.ProfID) order by name,manuf,description for xml path('')) devices from HIIS_ReferenceClass rc) deviceLists
on deviceLists.ReferenceClassID = hrc.ReferenceClassID  and deviceLists.ProfID = hrc.ProfID
) b on a.parsedName = b.Model and a.devices = b.devices and a.ProfID = b.ProfID and a.NumbeofProcessors = b.NumbeofProcessors and a.ID <> b.ID
)
--change source associations to target associations for collected drivers
Update hfa
set AssociationId = target
from
HIIS_Folders_Associations hfa join #cte on hfa.AssociationId = #cte.source and (hfa.AssociationId = 50 or hfa.AssociationId = 51 or hfa.AssociationId = 60 or hfa.AssociationId = 61)

--change source to target app associations
Update hfa
set AssociationId = target
from
HIIS_App_Associations hfa join #cte on hfa.AssociationId = #cte.source and hfa.AssociationId = 1


--change source to target dropin associations
Update hfa
set AssociationId = target
from
HIIS_Dropins_Associations hfa join #cte on hfa.AssociationId = #cte.source and hfa.AssociationId = 1


delete HIIS_ReferenceClass from HIIS_ReferenceClass join #cte on #cte.source = ID

Create table #cte2
(
sourceid int,
targetid int
)
insert into #cte2
(sourceid,targetid)
(
select distinct a.ID as sourceid, b.ID as targetid from
(
select hrc.NumbeofProcessors, model, dbo.HIIS_CustomNameParsing(model) parsedName, deviceLists.devices,hrc.ReferenceClassID,hrc.ProfID, ID from HIIS_ReferenceClass hrc join 
(select rc.ReferenceClassID,rc.ProfID, (select name + '|'+ manuf + '|'+ description +';' from dbo.HIIS_Get_filteredDefListDN(rc.ReferenceClassID, rc.ProfID) order by name,manuf,description for xml path('')) devices from HIIS_ReferenceClass rc) deviceLists
on deviceLists.ReferenceClassID = hrc.ReferenceClassID  and deviceLists.ProfID = hrc.ProfID
where dbo.HIIS_CustomNameParsing(ReferenceClassName) <> ReferenceClassName
) a join 
(
select * from 
(select *, ROW_NUMBER() over (partition by parsedName,devices,ProfID,NumbeofProcessors order by ID) rn from 
(select hrc.NumbeofProcessors, model, dbo.HIIS_CustomNameParsing(model) parsedName, deviceLists.devices,hrc.ReferenceClassID,hrc.ProfID, ID from HIIS_ReferenceClass hrc join 
(select rc.ReferenceClassID,rc.ProfID, (select name + '|'+ manuf + '|'+ description +';' from dbo.HIIS_Get_filteredDefListDN(rc.ReferenceClassID, rc.ProfID) order by name,manuf,description for xml path('')) devices from HIIS_ReferenceClass rc) deviceLists
on deviceLists.ReferenceClassID = hrc.ReferenceClassID  and deviceLists.ProfID = hrc.ProfID
where dbo.HIIS_CustomNameParsing(ReferenceClassName) <> ReferenceClassName) x) y where rn = 1
) b on a.parsedName = b.parsedName and a.devices = b.devices and a.ProfID = b.ProfID and a.NumbeofProcessors = b.NumbeofProcessors and a.ID <> b.ID
)

update hfa 
set AssociationId = targetid
from
HIIS_Folders_Associations hfa join #cte2 on hfa.AssociationId = #cte2.sourceid and (hfa.Associationtype = 50 or hfa.Associationtype = 51 or hfa.Associationtype = 60 or hfa.Associationtype = 61)
GO


update hfa 
set AssociationId = targetid
from
HIIS_App_Associations hfa join #cte2 on hfa.AssociationId = #cte2.sourceid and (hfa.Associationtype = 1)
GO


update hfa 
set AssociationId = targetid
from
HIIS_Dropins_Associations hfa join #cte2 on hfa.AssociationId = #cte2.sourceid and (hfa.Associationtype = 1)

delete HIIS_ReferenceClass from HIIS_ReferenceClass join #cte2 on #cte2.sourceid = ID


delete HIIS_Folders_Associations from HIIS_Folders_Associations hfa join
(
select * from
(
select *, ROW_NUMBER() over (partition by FolderId,AssociationId,Associationtype order by id) rn from HIIS_Folders_Associations 
) a  where a.rn >1
) b on b.Id = hfa.Id

delete HIIS_App_Associations from HIIS_App_Associations hfa join
(
select * from
(
select *, ROW_NUMBER() over (partition by AppId,AssociationId,Associationtype order by id) rn from HIIS_App_Associations 
) a  where a.rn >1
) b on b.Id = hfa.Id

delete HIIS_Dropins_Associations from HIIS_Dropins_Associations hfa join
(
select * from
(
select *, ROW_NUMBER() over (partition by dropinid,AssociationId,Associationtype order by id) rn from HIIS_Dropins_Associations 
) a  where a.rn >1
) b on b.Id = hfa.Id
delete HIIS_Folders_Associations from HIIS_Folders_Associations hfa join
(
select *, ROW_NUMBER() over(Partition by FolderId,AssociationId order by Associationtype) rn from HIIS_Folders_Associations where Associationtype = 50 or Associationtype = 51 or Associationtype = 60 or Associationtype = 61

) a on a.Id = hfa.Id
 where rn > 1
Go


Update HIIS_ReferenceClass
set 
ReferenceClassName = LEFT(ReferenceClassName,LEN(ReferenceClassName) - Len(Model)) + dbo.HIIS_CustomNameParsing(Model),
Model = dbo.HIIS_CustomNameParsing(Model)


delete [HIIS_ReferenceClassGrp]
FROM [HIIS_ReferenceClassGrp] hrcg left outer join HIIS_ReferenceClass hrc on hrc.ProfID = hrcg.ProfID and hrc.ReferenceClassID = hrcg.ReferenceClassUID
where hrc.ReferenceClassID is null

delete [HIIS_ReferenceClassDef]
FROM [HIIS_ReferenceClassDef] hrcd left outer join HIIS_ReferenceClass hrc on hrc.ProfID = hrcd.ProfID and hrc.ReferenceClassID = hrcd.RefID
where hrc.ReferenceClassID is null

GO
drop table #cte
drop table #cte2

3. Driver Collection

4. Driver Management

5. Image Creation

6. Image Deployment

6.1. Windows 7 Deployment

Windows 7 Deployment will fail if:

The injected files are copied to the wrong partition.

Make sure to change the references from prod:\...\unattend.xml to D:\...\unattend if deploying a multi partition image.

The targetpath for deploying drivers is not set to the correct partition, and the boot partition is full.

Set the target paths for the injection script loaders, and script generators properly. See the user guide (Advanced Script Path Configuration section) for more information on configuring scripts.

The image is not properly sysprepped.

Deploying an image which has not been sysprepped is very likely to fail. Also, the audit mode needs to be used. Unless you use audit mode the system will not be sealed in a way which is conducive to recognizing and properly handling new hardware types.

The unattend.xml has invalid entries.

The unattend.xml has a specific schema is must match.

%PROD_LIC% may not tokenize in a properly formatted key that works with Windows 7. If this happens, use the VLK or remove the entry completely.

7. Maintenance

8. Common Errors

8.1. Error "4" On Deployment

Error 4 on deployment, when caused by the Create External Batch File indicates the /groupsof parameter was passed and invalid value, or not specified.

This can happen if you're using a job created by an old version of HIIS.

8.2. "Error 5" on Collect

"Error 5 installing package Collect.exe"
One of the more common error is this Error 5. Error 5 is a file permission error, caused when trying to delete or create files that HIIS doesn't have permissions to do. This may be due to several factors: the driver files on the client are not accessible, the share folder (\HIIS\Collect\Library\<Profile>\) is not writable from the client as it attempts to copy up the drivers, or the temporary folders were unable to be deleted from the client.

Solution:
To resolve, you need to verify that the hiistemp, or the domain account you specified has adequate permisions to run collect. Then, make sure this account can copy to the express share from the client.
Also, verify that the account used (domain or local security) is still in the administrator's group on the server.

Other solutions for Error 5:
-This can also sometimes be caused by a firewall, temporarily disable it and see if collect will run.
-If the computer name in HIIS is different from the computer name in the Deployment Console, then you may get an error 5. Simply delete the computer from the Deployment Console and "Refresh Classes" in HIIS.
-Make sure the Altiris Agent is connecting to the correct ip for the DS.

Versions Affected:
All versions of HIIS

8.3. Error 11 on Collect/Uniproc

Cause by an old version of the HIIS_Insert_FolderAssociations_General procedure using a like comparator rather than an = comparator. This error occurs when doing a comparison on a value with a control character in the driver name, for example HP Webcam [2.0 MP]. The square brackets are control characters for the Like comparator.

 

The solution:

Code:

ALTER PROCEDURE [dbo].[HIIS_Insert_FolderAssociations_General]
(
	@folderid int,
	@compid int,
	@provider varchar(8000),
	@platform varchar(8000),
	@devicename varchar(8000)	
)
AS
	declare @providerid int
	declare @platformid int
	declare @devicenameid int
	declare @lincount int
	declare @count int
	select @count = count([AssociationId]) from [HIIS_Folders_ProviderNames]
		where lower(@provider) LIKE lower([ProviderName])

	if @count = 0
	BEGIN
		insert into [HIIS_Folders_ProviderNames] ([ProviderName]) Values (@provider)
	END
	select @providerid = [AssociationId] from [HIIS_Folders_ProviderNames]
		where lower(@provider) = lower([ProviderName])

	select @count = count([AssociationId]) from [HIIS_Folders_Platforms]
		where lower(@platform) = lower([Platform])

	if @count = 0
	BEGIN
		insert into [HIIS_Folders_Platforms] ([Platform]) Values (@platform)
	END
	select @platformid = [AssociationId] from [HIIS_Folders_Platforms]
		where lower(@platform) = lower([Platform])
		
	select @count = count([AssociationId]) from [HIIS_Folders_DeviceNames]
		where lower(@devicename) = lower([DeviceName])

	if @count = 0
	BEGIN
		insert into [HIIS_Folders_DeviceNames] ([DeviceName]) Values (@devicename)
	END
	select @devicenameid = [AssociationId] from [HIIS_Folders_DeviceNames]
		where lower(@devicename) = lower([DeviceName])

-----Checking if updated
Select @lincount = count(*)  from HIIS_Folders_Associations where 
		@folderid = FolderId AND 
		@devicenameid = AssociationId AND 
		1 = Associationtype
if @lincount = 0
BEGIN
	update HIIS_Folders set lastupdated = getdate() where
		[FolderId] = @folderid
END
------------------------------------
	insert into [HIIS_Folders_Associations]
		(
			[FolderId],
			[AssociationId],
			[Associationtype]
		)
		select a, b, c from (Select count(*) as linecount, @folderid a, @devicenameid b, 1 c from HIIS_Folders_Associations where 
					@folderid = FolderId AND 
					@devicenameid = AssociationId AND 
					1 = Associationtype) x
			where x.linecount = 0

-----Checking if updated
Select @lincount = count(*)  from HIIS_Folders_Associations where 
		@folderid = FolderId AND 
		@platformid = AssociationId AND 
		2 = Associationtype
if @lincount = 0
BEGIN
	update HIIS_Folders set lastupdated = getdate() where
		[FolderId] = @folderid
END
------------------------------------

	insert into [HIIS_Folders_Associations]
		(
			[FolderId],
			[AssociationId],
			[Associationtype]
		)
		select a, b, c from (Select count(*) as linecount, @folderid a, @platformid b,2 c from HIIS_Folders_Associations where 
					@folderid = FolderId AND 
					@platformid = AssociationId AND 
					2 = Associationtype) x
			where x.linecount = 0
-----Checking if updated
Select @lincount = count(*)  from HIIS_Folders_Associations where 
		@folderid = FolderId AND 
		@providerid = AssociationId AND 
		4 = Associationtype
if @lincount = 0
BEGIN
	update HIIS_Folders set lastupdated = getdate() where
		[FolderId] = @folderid
END
------------------------------------
	insert into [HIIS_Folders_Associations]
		(
			[FolderId],
			[AssociationId],
			[Associationtype]
		)
		select a, b, c from (Select count(*) as linecount, @folderid a, @providerid b,4 c from HIIS_Folders_Associations where 
					@folderid = FolderId AND 
					@providerid = AssociationId AND 
					4 = Associationtype) x
			where x.linecount = 0

	insert into [HIIS_Folders_Associations]
		(
			[FolderId],
			[AssociationId],
			[Associationtype]
		)
		Select @folderid, [HIIS_ReferenceClass].[ID],50 from [HIIS_ReferenceClassGrp],[HIIS_ReferenceClass]
			where @compid = [HIIS_ReferenceClassGrp].[Computer_id] AND 
				[HIIS_ReferenceClassGrp].[ProfID]=[HIIS_ReferenceClass].[ProfID] AND
				[HIIS_ReferenceClassGrp].[ReferenceClassUID]=[HIIS_ReferenceClass].[ReferenceClassID] AND
				[HIIS_ReferenceClassGrp].[Candidate]=1 AND
				[HIIS_ReferenceClass].[ID] not in 
					(select [AssociationId] from [HIIS_Folders_Associations] 
						where [FolderId]= @folderid AND ([Associationtype]=50 OR [Associationtype]=60))
GO

8.4. Firm error 60

Error description:
     The specified firm drive was not found.

Possible causes:
     The firm drive specifier points to a non-existant drive.

Possible resolutions:
     Run 'Firm drives' to see the available Firm drive mappings.

8.5. "Error 91" on Collect

Error 91 running Collect.exe
This is a authentication problem with Collect.exe generally caused by server credentials.  Often, the credentials are no longer in the administrator group and do not have the rights to write back to the server.  This is sometimes caused by a new or changed security policy as well.

Solution:
Simply verify the account credentials in HIIS and verify that the account is still a member of the Administrator group.  You can also log into the client with this account, and see if the account has access from the client to access the eXpress share on the server.  This will help you figure out where the security may have been changed.

8.6. Error 94 on deployment

Ostensibly, Error 94 is a "File already exists" error.

Practically speaking, this is usually caused by deploying a Windows 7 image (with multiple partitions) onto a system running XP (with fewer partitions) and WinPE doesn't rescan to update the drive mappings after a deployment.

A couple solutions are possible:

Learn the 'firm' drive mappings such as d1p1, d1p2 etc as needed for the deployment.

Set a reboot to automation task after the image deployment. This reloads WinPE and causes the drive mappings to get updated.

We currently recommend adding the reboot task if the issue arises.

8.7. "Error 314159" on Collect

Error 314159 is caused by a failure to copy files to the server. Commonly, this is caused by the account on the server not having write permissions to the eXpress share.

This can be possibly solved by a number of things:

  • The account being used should have admin on the server. Or at least read/write/create/delete on the eXpress share.
  • If using hiistemp, make sure the account doesn't have "User must change password on next login" selected.
  • Make sure the user is in the Administrators group, or that you don't have a group policy removing it from the administrators group.
  • Make sure the account settings in the Client Credentials settings in HIIS match the credentials on the server/domain.
  • If using domain account settings, make sure the client is in the domain.
  • Check if the client can access the server's eXpress share using the ip address, and the server name.

8.8. "Error 1326" on Driver Collect

Error 1326 - Logon failure: unknown user name or bad password
The most common cause of the username/password failures, when using the domain account client credentials. If the client that you try to collect from isn't in the domain, or the trust credentials have gone stale it won't be able to authenticate and run the executable properly.

Solution:
Check the client credentials in HIIS in Options -> Credentials -> Client Credentials.  Make sure the password is correct, and you may want to reset the password of this account.  Also, if you are using a domain account, verify that the client you are collecting from is on the domain.  If you are in an environment where there may be multiple domains and/or the clients you collect from are not on a domain, you may want to consider using temporary local security for the client credentials, which will simply use the AClient to create a local account.

 

8.9. "Error 2332" on Deployment

"Error 2332" on Create External Batch File task

This is caused by an unhandled error, with two possible causes.

If using 1633, regenerate your deploy jobs, as they have the wrong parameters.

In old versions it is caused by a SQL collation mismatch as follows:

The error 2332 is caused by an incompatibility in one of the SQL User Defined Function that HIIS uses, it only affects SQL Server 2005, and only when using certain Database Collations.

Solution:
This issue has been fixed in the codebase, but until the next release you can use the included script script to patch the stored procedure.

ALTER FUNCTION [dbo].[HIIS_FolderList]
(
@compid int,
@profid int,
@intiald int
)
Returns @Result TABLE
(
FolderId int
)
AS
BEGIN
if @intiald = 1
BEGIN
insert into @Result (FolderId)
(
select
[dbo].[HIIS_Get_FolderIDtoUse]([FolderId])
from

[HIIS_Folders_Associations],[HIIS_ReferenceClass],[computer]
where
[AssociationId]=[HIIS_ReferenceClass].[ID] AND
([Associationtype]=50 or [Associationtype]=51)
AND
[HIIS_ReferenceClass].[ProfID]=@profid AND
[computer].[prod_name] =
[HIIS_ReferenceClass].[Model] collate database_default AND
[computer].[computer_id] = @compid
union
select
[dbo].[HIIS_Get_FolderIDtoUse]([FolderId])
From
[HIIS_Folders_Associations]
where
[AssociationId] = @profid AND
[Associationtype] = 1000
union
select
[dbo].[HIIS_Get_FolderIDtoUse]([FolderId])
From
[HIIS_Folders_Associations] FA join
[HIIS_Association_Strings] AStr
on Astr.[id] = FA.[AssociationId]
Join
[computer]
on lower(Astr.[stringval]) like
lower([computer].[prod_name]) collate database_default
where
Astr.[profid] = @profid and
FA.[Associationtype] = 500 and [computer].[computer_id] = @compid

)
END
ELSE
BEGIN
insert into @Result (FolderId)
(
select [dbo].[HIIS_Get_FolderIDtoUse]([FolderId])
from

[HIIS_Folders_Associations],[HIIS_ReferenceClassGrp],[HIIS_ReferenceClass]

where
[AssociationId]=[HIIS_ReferenceClass].[ID]
AND
([Associationtype]=50 or
[Associationtype]=51) AND

[HIIS_ReferenceClass].[ReferenceClassID]=[HIIS_ReferenceClassGrp].[ReferenceClassUID]
AND
[HIIS_ReferenceClass].[ProfID]=@profid AND

[HIIS_ReferenceClassGrp].[Computer_id]=@compid
union
select
[dbo].[HIIS_Get_FolderIDtoUse]([FolderId])
From
[HIIS_Folders_Associations]
where
[AssociationId] = @profid AND
[Associationtype] = 1000
union
select
[dbo].[HIIS_Get_FolderIDtoUse]([FolderId])
From
[HIIS_Folders_Associations] FA join
[HIIS_Association_Strings] AStr
on Astr.[id] = FA.[AssociationId]
Join
[computer]
on lower(Astr.[stringval]) like
lower([computer].[prod_name]) collate database_default
where
Astr.[profid] = @profid and FA.[Associationtype]
= 500 and [computer].[computer_id] = @compid
)
END
return
END

Versions Affected:
HIIS 6.9.0.416 and older, only SQL Server 2005

8.10. Windows 7/Vista no files copied to server

Problem: A collect is run and folders and a driverlist.txt is generated in the class folder, but no drivers are copied to the server.

Possible Cause: DAgent is unable to elevate the execution rights of the Collect.exe when it is being run on the client. This is due to UAC being turned off.

Solution: Turn UAC on.