PDA

View Full Version : Conditional target to install files, based on the OS



NewsArchive
12-20-2008, 02:38 AM
In continue of the other thread "COMMON_DOCUMENTS - What did I get wrong
on these?"

What I have seen in the script is that I can install a file based on the
condition "OS".

I then could auto-decide during install, where to place the data, either
COMMON_DOCUMENRS or under my exe-folder\DATA. This would be fine!

But if I have to serve different OSs then I would have to include my TPS n
times, one for each possible target scenario?

The INSTALL.EXE would bloat a bit then....

Can I assign the InstallDir-variable at runtime, at program startup? That
would be cool!

Maybe its possible already? If so, where to look for? I did not find it by
now










--
Grüße / Regards
Wolfgang Orth

http://www.odata.de



Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/

NewsArchive
12-20-2008, 02:39 AM
> In continue of the other thread "COMMON_DOCUMENTS - What did I get wrong
> on these?"
>
> What I have seen in the script is that I can install a file based on the
> condition "OS".
>
> I then could auto-decide during install, where to place the data, either
> COMMON_DOCUMENRS or under my exe-folder\DATA. This would be fine!
>
> But if I have to serve different OSs then I would have to include my TPS n
> times, one for each possible target scenario?
>
> The INSTALL.EXE would bloat a bit then....
>
> Can I assign the InstallDir-variable at runtime, at program startup? That
> would be cool!
>
> Maybe its possible already? If so, where to look for? I did not find it by
> now

You are using SetupBuilder. Of course, it is already possible ;-)

Instead of:

Install File "c:\test\file.tps" to "%_SB_INSTALLDIR%\file.tps" (Always
Install)

use:

Install File "c:\test\file.tps" to "%MY_DAT_FOLDER%\file.tps" (Always
Install)

You can set the %MY_DAT_FOLDER% variable to whatever you want at runtime.

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-20-2008, 02:39 AM
Another suggestion.
I have an app that installs to different locations depending on whether the
OS is Vista or earlier.
So on my app's Help menu, one item is "show data file locations" which just
opens a window displaying where the program's data is (and a few other
informative things).

That way, if a user has a problem I can ask him to open that window and read
me the information so I know where to start looking.

Jane