|
List Info
Thread: PDK PerlMSI - WriteRegistry
|
|
| PDK PerlMSI - WriteRegistry |
  Australia |
2007-04-10 06:44:37 |
|
Hi,
I am converting an old installation script from InnoSetup
to PerlMSI and have almost completed the script however I would like to add
some keys to Registry.
I am trying to add keys to hold the applications
configuration data which works with the old setup.exe but am having trouble
getting it to work with PerlMSI.
I would like create a series of keys and subkeys like so:
HKLM/SOFTWARE/MyCompany/MyApp
Serial 1234
Version 2.0
User
Bill
Company ClientX
Default 10 lines
And have been trying to use the undocumented WriteRegistry
method as follows:
$installer->WriteRegistry(
<ComponentFile>, 'HKEY_LOCAL_MACHINE', [{
KeyName
=> "SOFTWARE/MyCompany/MyApp",
DefVal
=> "",
Values
=>[
{
Name => 'Serial',
Value => '1234',
}
{
Name => 'Version',
Value => '2.0',
}
],
},
]);
Not sure if I have the syntax correct for adding the keys
or if I am not adding a data value first, but my biggest problem is the
<ComponentFile> value. I am not sure what it is asking for here and
despite trying to input several values, I always end up with the same error:
File ‘blah’ not found in File Table at
c:devetc.pl line 123
I’m not sure what value it requires, and the few
links that point to MSDN references now appear to be outdated and cannot be
retrieved.
I have done a fairly exhaustive search and can find no
examples of its usage.
Anyone used this method before or can anyone explain how
to correctly use the method.
Cheers
Chris
|
| RE: PDK PerlMSI - WriteRegistry |

|
2007-04-11 19:02:28 |
|
Hi Chris,
I have not used WriteRegistry() myself (most of the time I just
call AddData() to explicitly add stuff to the various tables directly), but
from looking at the source I would think that the <ComponentFile>
argument should just be the name of an executable file in your
application. It is only being used to set the Component_ column in the Registry
table, which is only relevant when you have multiple components, and only want
the registry settings being set when you install a specific component.
In the ScriptGenerator generated installer I would expect to use
a filename like this:
PRIMARY_FOLDER . “/bin/myapp.exe”
Cheers,
-Jan
Hi,
I
am converting an old installation script from InnoSetup to PerlMSI and have
almost completed the script however I would like to add some keys to Registry.
I
am trying to add keys to hold the applications configuration data which works
with the old setup.exe but am having trouble getting it to work with PerlMSI.
I
would like create a series of keys and subkeys like so:
HKLM/SOFTWARE/MyCompany/MyApp
Serial 1234
Version 2.0
User
Bill
Company ClientX
Default 10 lines
And
have been trying to use the undocumented WriteRegistry method as follows:
$installer->WriteRegistry(
<ComponentFile>, 'HKEY_LOCAL_MACHINE', [{
KeyName
=> "SOFTWARE/MyCompany/MyApp",
DefVal
=> "",
Values
=>[
{
Name => 'Serial',
Value => '1234',
}
{
Name => 'Version',
Value => '2.0',
}
],
},
]);
Not
sure if I have the syntax correct for adding the keys or if I am not adding a
data value first, but my biggest problem is the <ComponentFile> value. I
am not sure what it is asking for here and despite trying to input several
values, I always end up with the same error:
File
R16;blahR17; not found in File Table at c:devetc.pl line 123
I’m
not sure what value it requires, and the few links that point to MSDN
references now appear to be outdated and cannot be retrieved.
I
have done a fairly exhaustive search and can find no examples of its usage.
Anyone
used this method before or can anyone explain how to correctly use the method.
Cheers
Chris
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|