Thanks again for your help.
"Edward Clements" <kli...@compuserve.com> wrote in message
news:3ba6...@news.installshield.com...
> Although you could use something like
> InstallFolder = TARGETDISK ^ "Program Files" ^ "MyProject";
> , you can never be sure that the ProgramFilesFolder is actually called
> "Program Files".
>
> A better way would be to invoke MsiGetProperty() to het the value of
> property "ProgramFilesFolder" and append "MyProject" to the resulting
> string...
>
> Edward Clements
>
> "JH" <JHISN...@yahooNoSpam.com.au> wrote in message
> news:3ba6...@news.installshield.com...
> >
> > How would I use it?
> >
> > I have this now as PROGRAMFILES does not work:
> > STRING InstallFolder;
> > ....
> > InstallFolder = TARGETDISK ^ "\\Program Files\\" ^ "MyProject";
> >
> > This:
> > STRING InstallFolder;
> > ....
> > InstallFolder = TARGETDISK ^ ProgramFilesFolder ^ "MyProject";
> > gives compilation error: MyProj.rul (line 120): Error 1008:
> > 'ProgramFilesFolder' Syntax error. Unexpected token encountered.
> >
> > This:
> > STRING InstallFolder;
> > ....
> > InstallFolder = TARGETDISK ^ [ProgramFilesFolder] ^ "MyProject";
> > gives compilation error: MyProj.rul (line 120): Error 1008: '[' Syntax
> > error. Unexpected token encountered.
> >
> > Am I doing somthing wrong?
> >
> > Thanks
> >
> >
> > "Alexander Rodov" <aro...@earthlink.net> wrote in message
> > news:3ba40a21$1...@news.installshield.com...
> > > Obviously, I'm not the best expert in Express product, but I would
> > recommend
> > > to try the following syntax:
> > >
> > > [ProgramFilesFolder]
> > >
> > > Windows Installer service uses this System Folder Property among about
2
> > > dozen of others to allow installation developers to direct application
> > files
> > > to system locations, which may vary on different end-user's machines.
> And
> > > because InstallShield Express version 3.0 and later uses Windows
> Installer
> > > for actual data deployment, such syntax should work.
> > >
> > > Let me know if that helps,
> > > Alex Rodov
> > >
> > >
> > > "JH" <JH...@yahoo.com.au> wrote in message
> > > news:3ba1...@news.installshield.com...
> > > > Hi,
> > > >
> > > > I am using IS3 on Win2000.
> > > >
> > > > I access the PROGRAMFILES system variable and it is empty. How can I
> get
> > > the
> > > > program files directory.
> > > > Our app will be installed in many countries and I can not rely on a
> hard
> > > > coded "C:\\Program Files"
> > > >
> > > > How can I get the name of the ProgramFiles folder?
> > > >
> > > > Thanks,
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
If you use IS 3: just call
RegDBGetKeyValueEx( HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "ProgramFilesDir", nType,
svWhereProgramFilesFolderIs, nSize);
If you use IS Express 3:
You have every right to ask such question, because documentation doesn't
give you a great deal of explanation here.
InstallShield Script compiler links to MSI API via
#include "iswi.h"
-which suppose to be in the default script generated for every new .rul
file.
MSI API functions are exported in MSI.dll, which is installed on the
end-user's machine if Windows Installer engine is available there.
So if your installation package is running - MSI.dll is there and the API
calls will work.
More details on function syntax can be found in MSI help library (from
InstallShield help menu)
Let me know which product do you use and sorry for confusion,
Alex Rodov
"JH" <JHISN...@yahooNoSpam.com.au> wrote in message
news:3ba7f575$1...@news.installshield.com...
I am happy now and will insert and test your suggestion very very soon
Thanks
"Alexander Rodov" <aro...@earthlink.net> wrote in message
news:3ba8...@news.installshield.com...
RegDBSetDefaultRoot( REGISTRY_BASE_LOCAL );
DBGetKeyValueEx(
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion",
"ProgramFilesDir",
nType,
ProgramFilesFolder,
nSize );
Thanks
"Alexander Rodov" <aro...@earthlink.net> wrote in message news:3ba8...@news.installshield.com...
"JH" <JHISN...@yahooNoSpam.com.au> wrote in message
news:3ba8...@news.installshield.com...
>
> This did the trick:
>
> RegDBSetDefaultRoot( REGISTRY_BASE_LOCAL );
>
>