Can I use a special folder as part of a value in creating an INI File?
Can I use a "Common Documents" as part of a value in creating an INI File?
I want it to expand to "C:\Users\Public\Documents" in windows 7 and the
other for Vista...
Do I need to "write it" separately from the regular INI file creating
process?
...
Paul Macfarlane
Re: Can I use a special folder as part of a value in creating an INI File?
Paul,
> Can I use a "Common Documents" as part of a value in creating an INI File?
>
> I want it to expand to "C:\Users\Public\Documents" in windows 7 and the
> other for Vista...
>
> Do I need to "write it" separately from the regular INI file creating
> process?
The INI format supported in the "Edit INI..." Contents field is:
[section]
keyname=value
So you can do this:
[section]
keyname=%_CSIDL_COMMON_DOCUMENTS%
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder is Windows 7 installation -- "point. click. ship"
-- Official Comodo Code Signing and SSL Certificate Partner
Re: Can I use a special folder as part of a value in creating an INI File?
I assume that means I can do:
[section]
keyname=%_CSIDL_COMMON_DOCUMENTS%\MyAppdata\
Thanks !
Paul Macfarlane
Re: Can I use a special folder as part of a value in creating an INI File?
Hi Paul,
> I assume that means I can do:
>
> [section]
> keyname=%_CSIDL_COMMON_DOCUMENTS%\MyAppdata\
Yes, no problem!
Friedrich
Re: Can I use a special folder as part of a value in creating an INI File?
Friedrich,
As a followup....
The INI file is only done for Vista/Win7, but I do not want to modify it
if it already exists on the users system.
The problem is it says "Always Install" and there is not option to only
install if it doesn't exist.
I thought about just installing a INI I create as a regular file, but
then I can't expand the Common_Documents....
Thoughts?
Thanks,
Paul
Re: Can I use a special folder as part of a value in creating an INI File?
Paul,
> As a followup....
>
> The INI file is only done for Vista/Win7, but I do not want to modify
> it if it already exists on the users system.
> The problem is it says "Always Install" and there is not option to only
> install if it doesn't exist.
>
> I thought about just installing a INI I create as a regular file, but then
> I can't expand the Common_Documents....
>
> Thoughts?
"Always Install" refers to the "Feature". It is not related to whether the
file exists or not.
Just add a "If File/Folder exists..." statement around your INI command and
you are done.
Does this help?
Friedrich
Re: Can I use a special folder as part of a value in creating an INI File?
Paul,
Did you consider having your program create the ini file instead of having
the SB installer do it? You can put logic in your program's init section to
check if the file exists, and set the path for the ini file. You already
need to set the ini file path in your app anyway so that it points to the
right location.
--
Regards,
Abe Jimenez
Clarion 7.1.7118 EE
Windows 7 Pro 64 Bit
Re: Can I use a special folder as part of a value in creating an INI File?
The issue would be execution level. I don't want to have the normal
execution elevated. Only during install....
Paul Macfarlane
Re: Can I use a special folder as part of a value in creating an INI File?
You don't need to be elevated to create an ini file in common documents
Abe Jimenez
1 Attachment(s)
Re: Can I use a special folder as part of a value in creating an INI File?
BTW, it would like this (see attached screenshot).
Friedrich