This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Different default install paths
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 15, 2009
11:22 PM
Different default install paths
Hey guys
how can i have one default install path for xp and another different one for vista?
how can i have one default install path for xp and another different one for vista?
(18) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
01:57 AM
yes its possible.. in install script you have to put the condition. you have to check the OS and then set the INSTALLDIR. here is the pseudo code;
if(version is winXP) then
INSTALLDIR =
else if(version is WinVista) then
INSTALLDIR =
if(version is winXP) then
INSTALLDIR =
else if(version is WinVista) then
INSTALLDIR =
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
03:34 AM
ChandanOmkar wrote:
yes its possible.. in install script you have to put the condition. you have to check the OS and then set the INSTALLDIR. here is the pseudo code;
if(version is winXP) then
INSTALLDIR =
else if(version is WinVista) then
INSTALLDIR =
im very sorry if i sound like a noob but how to i edit that?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
04:33 AM
use the following piece of code :
if(SYSINFO.nOSMajor >= 6) then
INSTALLDIR = ProgramFilesFolder ^ "VISTA"; // for vista
else if (SYSINFO.nOSMajor >= 5) then
INSTALLDIR = ProgramFilesFolder ^ "XP"; // for xp
endif;
I think this would be helpful for you....
if(SYSINFO.nOSMajor >= 6) then
INSTALLDIR = ProgramFilesFolder ^ "VISTA"; // for vista
else if (SYSINFO.nOSMajor >= 5) then
INSTALLDIR = ProgramFilesFolder ^ "XP"; // for xp
endif;
I think this would be helpful for you....
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
04:44 AM
ChandanOmkar wrote:
use the following piece of code :
if(SYSINFO.nOSMajor >= 6) then
INSTALLDIR = ProgramFilesFolder ^ "VISTA"; // for vista
else if (SYSINFO.nOSMajor >= 5) then
INSTALLDIR = ProgramFilesFolder ^ "XP"; // for xp
endif;
I think this would be helpful for you....
thanks for that
its saying
'end' invaliod statement
unexpected end of source file
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
04:48 AM
if(SYSINFO.nOSMajor >= 6) then
INSTALLDIR = ProgramFilesFolder ^ "VISTA"; // for vista
elseif (SYSINFO.nOSMajor >= 5) then
INSTALLDIR = ProgramFilesFolder ^ "XP"; // for xp
endif;
use the above code. There was a space between else and if
Thanks
Chandan
INSTALLDIR = ProgramFilesFolder ^ "VISTA"; // for vista
elseif (SYSINFO.nOSMajor >= 5) then
INSTALLDIR = ProgramFilesFolder ^ "XP"; // for xp
endif;
use the above code. There was a space between else and if
Thanks
Chandan
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
04:55 AM
ChandanOmkar wrote:
use the following piece of code :
if(SYSINFO.nOSMajor >= 6) then
INSTALLDIR = ProgramFilesFolder ^ "VISTA"; // for vista
else if (SYSINFO.nOSMajor >= 5) then
INSTALLDIR = ProgramFilesFolder ^ "XP"; // for xp
endif;
I think this would be helpful for you....
ChandanOmkar wrote:
if(SYSINFO.nOSMajor >= 6) then
INSTALLDIR = ProgramFilesFolder ^ "VISTA"; // for vista
elseif (SYSINFO.nOSMajor >= 5) then
INSTALLDIR = ProgramFilesFolder ^ "XP"; // for xp
endif;
use the above code. There was a space between else and if
Thanks
Chandan
hey thanks for that it got rid of the errors 😄 but now its not doing it, it just doesnt apply that change still goes to c:\program files, any ideas?
Thank you sosomuch
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
05:27 AM
put your path in place of ProgramFilesFolder...
did you try this?
did you try this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
05:48 AM
AskewDread wrote:
thanks for that
its saying
'end' invaliod statement
unexpected end of source file
ah...hang on i will try that i may of tryed the wrong bit
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
05:56 AM
AskewDread wrote:
ah...hang on i will try that i may of tryed the wrong bit
this is the script i nw have its the entire file does it look right to you?
////////////////////////////////////////////////////////////////////////////////
//
// IIIIIII SSSSSS
// II SS InstallShield (R)
// II SSSSSS (c) 1996-2002, InstallShield Software Corporation
// II SS All rights reserved.
// IIIIIII SSSSSS
//
//
// This template script provides the code necessary to build an entry-point
// function to be called in an InstallScript custom action.
//
//
// File Name: Setup.rul
//
// Description: InstallShield script
//
////////////////////////////////////////////////////////////////////////////////
// Include Ifx.h for built-in InstallScript function prototypes, for Windows
// Installer API function prototypes and constants, and to declare code for
// the OnBegin and OnEnd events.
#include "ifx.h"
// The keyword export identifies MyFunction() as an entry-point function.
// The argument it accepts must be a handle to the Installer database.
export prototype MyFunction(HWND);
// To Do: Declare global variables, define constants, and prototype user-
// defined and DLL functions here.
// To Do: Create a custom action for this entry-point function:
// 1. Right-click on "Custom Actions" in the Sequences/Actions view.
// 2. Select "Custom Action Wizard" from the context menu.
// 3. Proceed through the wizard and give the custom action a unique name.
// 4. Select "Run InstallScript code" for the custom action type, and in
// the next panel select "MyFunction" (or the new name of the entry-
// point function) for the source.
// 5. Click Next, accepting the default selections until the wizard
// creates the custom action.
//
// Once you have made a custom action, you must execute it in your setup by
// inserting it into a sequence or making it the result of a dialog's
// control event.
///////////////////////////////////////////////////////////////////////////////
//
// Function: MyFunction
//
// Purpose: This function will be called by the script engine when
// Windows(TM) Installer executes your custom action (see the "To
// Do," above).
//
///////////////////////////////////////////////////////////////////////////////
function MyFunction(hMSI)
// To Do: Declare local variables.
begin
if(SYSINFO.nOSMajor >= 6) then
INSTALLDIR = "c:\users" ^ "Vista"; // for vista
elseif (SYSINFO.nOSMajor >= 5) then
INSTALLDIR = "c:\program files" ^ "XP"; // for xp
endif;
// To Do: Write script that will be executed when MyFunction is called.
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
06:13 AM
use double slash in place of single slash when giving the path name.
e.g.
if(SYSINFO.nOSMajor >= 6) then
CreateDir("c:\\users\\Vista"); // for vista
elseif (SYSINFO.nOSMajor = 5) then
CreateDir("c:\\program files\\XP"); // for xp
endif;
e.g.
if(SYSINFO.nOSMajor >= 6) then
CreateDir("c:\\users\\Vista"); // for vista
elseif (SYSINFO.nOSMajor = 5) then
CreateDir("c:\\program files\\XP"); // for xp
endif;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
06:17 AM
ChandanOmkar wrote:
use double slash in place of single slash when giving the path name.
e.g.
if(SYSINFO.nOSMajor >= 6) then
CreateDir("c:\\users\\Vista"); // for vista
elseif (SYSINFO.nOSMajor = 5) then
CreateDir("c:\\program files\\XP"); // for xp
endif;
how does that know that its changing the install dir?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
06:20 AM
Can you upload your whole project so that i can check....
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
06:23 AM
ChandanOmkar wrote:
use double slash in place of single slash when giving the path name.
e.g.
if(SYSINFO.nOSMajor >= 6) then
CreateDir("c:\\users\\Vista"); // for vista
elseif (SYSINFO.nOSMajor = 5) then
CreateDir("c:\\program files\\XP"); // for xp
endif;
have attached the ism file as i assume thats what you want
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
06:26 AM
I am using installshield 2008 and your project is created with some latest version of IS.. so i cant revert back your project file......:(
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 17, 2009
01:14 AM
AskewDread wrote:
heres a copy saved as 2008 version, dont write to it as it removed a few things but dont think anything important for this
any ideas?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 17, 2009
01:30 AM
I think that putting a browse dialog for destination location is a better solution for this. So that a end user can browse and select the location.
you can pass the default location here as the condition of OS.
you can pass the default location here as the condition of OS.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 17, 2009
01:35 AM
AskewDread wrote:
heres a copy saved as 2008 version, dont write to it as it removed a few things but dont think anything important for this
ChandanOmkar wrote:
I think that putting a browse dialog for destination location is a better solution for this. So that a end user can browse and select the location.
you can pass the default location here as the condition of OS.
at the moment it has a thing where people can choose it themselves but our main complaint from people is that its not at least the 2 defaults