PDA

View Full Version : Computername inside property table



RLaGrange
02-07-2002, 07:45 AM
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

pantoine
02-09-2002, 12:38 PM
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
"\\\\" + "<whatever ComputerName is equal to>"

djsdjs
02-28-2002, 10:18 PM
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.

Ian Baxter
03-25-2002, 07:02 PM
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;