You are here

Registry Help

6 posts / 0 new
Last post
pross
pross's picture
Offline
Last seen: 16 years 9 months ago
Joined: 2007-03-20 05:54
Registry Help

I'm trying to do my first attempt at creating a portable app and I am having difficulty in understanding what and where to do with registy information. below is the registry changes as noted when using RegShot. Do I put these in an external file (ie:portable.reg) or do they go within the ApplicationPortableTemplate.nsi (and if so where and how are they formated - example using below would be nice :-)). Finally, it sounds like I don't want absolute paths as shown in the registry entries below - what should I change them to?

HKLM\SOFTWARE\Agilent\VEE Pro\6.0\BaseDir: "C:\Program Files\Agilent\VEE Pro 6.0"
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\MaintVersion: "01"
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\InstallSource: "D:"
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\UserName: "Self"
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\Company: "Self"
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\SerialNumber: "ABC123456"
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\UserDir: "C:\Documents and Settings\UserName\My Documents\VEE Programs"

Regards,
Paul

SmithTech
SmithTech's picture
Offline
Last seen: 2 years 8 months ago
Developer
Joined: 2006-11-24 18:06
You would put the reg keys

You would put the reg keys in the portable apps template.
Look for the Define constants section, the !define REGKEYS line, example below.
For readability you can put the REGKEYS on seperate line by putting a \ after the ||

; **************************************************************************
; * Define constants 
; **************************************************************************
;!define REGKEYS "" ; insert regkeys to use separated by "||", comment out, when not used
; original above, modified below.
!define REGKEYS "HKLM\SOFTWARE\Agilent\VEE Pro\6.0\BaseDir: "C:\Program Files\Agilent\VEE Pro 6.0"||\
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\MaintVersion: "01"||\
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\InstallSource: "D:"||\
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\UserName: "Self"||\
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\Company: "Self"||\
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\SerialNumber: "ABC123456"||\
HKLM\SOFTWARE\Agilent\VEE Pro\6.0\UserDir: "C:\Documents and Settings\UserName\My Documents\VEE Programs"" 

As for the drive letter, I don't believe the template will handle changing the drive letter.
Maybe someone here can explain how to write new values to the REG.

For those who have fought for it, freedom has a flavor the protected will never know.

"Because they stand on a wall and say, 'Nothing is going to hurt you tonight. Not on my watch.'" (A Few Good Men)
Coincidence is God's way of remaining anonymous.(Albert Einstein)

pross
pross's picture
Offline
Last seen: 16 years 9 months ago
Joined: 2007-03-20 05:54
RE:Registry Help

If I input as formated above I get the following error message on the line !define REGKEYS "HKLM\SOFTWARE\Agilent................

Usage: !define ([/date|/utcdate] symbol [value]) | (/math symbol val1 OP val2)
    OP=(+ - * / %)
Error in script "E:\PortableApps\VEEPortable\Other\VEEPortableSources\VEEPortable2.nsi" on line 36 -- aborting creation process
ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
From the initial post, try

From the initial post, try putting all the reg keys on the same line

ex)

[reg key 1] || [reg key 2] || ... || [reg key n]

The developer formerly known as ZGitRDun8705

pross
pross's picture
Offline
Last seen: 16 years 9 months ago
Joined: 2007-03-20 05:54
Same Problem

Even after putting on same line, I get the same error.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 11 months ago
Developer
Joined: 2006-12-06 18:07
Try just deleting the main

Try just deleting the main key since all subkeys are removed as well

like this:
!define REGKEYS "HKLM\SOFTWARE\Agilent\VEE Pro\6.0\"

or:
!define REGKEYS "HKLM\SOFTWARE\Agilent\VEE Pro\"

The developer formerly known as ZGitRDun8705

Log in or register to post comments