You are here

PAL, variables

4 posts / 0 new
Last post
Devildevilscle
Offline
Last seen: 12 years 2 months ago
Joined: 2010-11-08 13:18
PAL, variables

Is there a way get a specific path from the registry?
For example, the app writes its settings at the registry.

HKCU\Software\AppName\defpath=REG_SZ:c:\Mydocuments

When the app runs, it creates a path that saves files it creates.

I want to move those files at the App's folder(AppName\App), but the path is very irregular.And the only way to have it is thru the registry.

And, aside from those found at the manual, are other variables that may be used?

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 3 months ago
Joined: 2007-04-15 21:08
INI file

It's often easiest to deal with the .reg file (%PAL:DataDir%\settings\filename.reg) as an INI file; you can, for example, have:

[Activate]
Registry=true

[RegistryKeys]
squiggle=HKCU\Software\AppName

[FileWrite1]
File=%PAL:DataDir%\settings\squilggle.reg
Type=INI
Section=HKEY_CURRENT_USER\Software\AppName
Key='"defpath"'
Value=REG_SZ:"%PAL:AppDir%"

(Not certain off-hand of the precise Value format, but you can figure that out.)

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Devildevilscle
Offline
Last seen: 12 years 2 months ago
Joined: 2010-11-08 13:18
Ok

Well, thx. It works well. Can i ask more? What is that section named [service] for? What does it do?

-:O =

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 3 months ago
Joined: 2007-04-15 21:08
Nothing

At present, services are out; there was a basic implementation in ANSI, but since going to Unicode that's no good. I've got a proper implementation of services/drivers on the roadmap for approximately 2.3 at present.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Log in or register to post comments