cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Computername inside property table

CChong
By Level 11 Flexeran
Level 11 Flexeran
Hi All,

Question from a newbie:

I created a nice snapshot from the Adobe postscript driver for Windows and import it into the Author environment to build a MSI package. After Validation of the MSI file, I get the following warning.

ICE48 Warning Directory 'DIRPROPERTY1' appears to be hardcoded in the property table.

It appears to be that the DIRPROPERTY1 is set to the UNC Computername of the workstation I snapshotted. (= ex. \\WSName1 ).

The Adobe driver is using this name as a local print spooler.

Now the question: How can I set this property in variable way (= at install time), so when I deploy this MSI package to another workstation that other workstation computername is used.

Thanx for any tip or hint,
Richard
(3) Replies
CChong
By Level 11 Flexeran
Level 11 Flexeran
Use an installscript custom action.
-Use MsiGetProperty to get the value of the property "ComputerName" (remember, property names are case-sensitive).
-Use MsiSetProperty to set the value of 'DIRPROPERTY1" to
"\\\\" + ""
CChong
By Level 11 Flexeran
Level 11 Flexeran
You can set one property to another in the property table, however, the value of the built-in ComputerName property is not retrieved before the property table is processed.

Without making api calls you can simple create a "Set Property" custom action (type 3) and set DIRPROPERTY1 to "\\[ComputerName]" anywhere before it is used in your script. It should the resolve properly.
CChong
By Level 11 Flexeran
Level 11 Flexeran
I use the following code snippet with a custom action to place the workstation name in an .INI file.

function Workstation_Name(NameResult) LONG sResult;
// Variable declarations
STRING RegTemp;
LONG RegLen;
LONG RegTyp;
// The Code
begin
sResult=0;
RegLen = 0;
RegTyp= REGDB_STRING_EXPAND;
RegTemp=" ";
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
RegDBGetKeyValueEx ("System\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName", "ComputerName", RegTyp, RegTemp, RegLen);
NameResult=RegTemp;
return sResult;
end;