|
List Info
Thread: RE: PDK PerlMSI - WriteRegistry
|
|
| RE: PDK PerlMSI - WriteRegistry |
  Australia |
2007-04-11 19:30:20 |
|
Hi Jan,
Thank you for the response8230; I can
confirm that I am only using registry to store values that could also be stored
in say an .ini file. I have been using the installer to set a serial number in
Registry as a very simple form of copy protection, as the computer users have a
restricted set of privileges.
I don’t need to install specific
components, and was unable to use the method as it won’t allow to not
enter some value.
I can not find any examples or other
methods for writing a key to Registry.
Are you aware of any other method to add
a key to hold a value in Registry.
Regards
Chris
From:
Jan Dubois [mailto:jand activestate.com]
Sent: Thursday, 12 April 2007 8:02
AM
To: 'Chris
Wearn'; pdk listserv.ActiveState.com
Subject: RE: PDK PerlMSI -
WriteRegistry
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 ‘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
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|