Install to required folder depending on OS version

For all your non-technical questions.
Guest

Install to required folder depending on OS version

Postby Guest » Mon Oct 17, 2005 11:10 am

Hi

I am currently evaluating InstallAware, and one feature I need to use is not apparent. This may be because I have not been able to read all supplied help so I am sorry if this is a dumb question.

I have a set of files; I need to install them to different folders depending on OS version. E.g. On windows 98 I need install into drive:\\<winsysdir>\\ and on Windows 2000 or above, the same file needs to be installed into drive:\\<winsysdir>\\DriversIs this possible – and can you show an example on how to achieve this? Outcome of this post will effect whether I buy a copy :-)

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Mon Oct 17, 2005 1:39 pm

This is actually a very good question, and don't hesitate to post any and all questions you may have, no matter how stupid they may seem, or whether or not you intend to purchase :)

You need to use some scripting to achieve this effect. First, capture the OS information into a variable using the Get System Information command. Then, based on the value of this variable, you can define a new variable for the target folder using the Set Variable command. For instance:

Code: Select all

if TestVar is True then
  Set Variable TARGETFOLDER to $WINSYSDIR$
else
  Set Variable TARGETFOLDER to $WINSYSDIR$\\Drivers
end


The above is pseudo-code, but you get the idea :D

Finally, using Install Files, just specify the target folder using this newly defined variable, say Install Files to $TARGETFOLDER$.

Guest

Postby Guest » Mon Oct 17, 2005 2:41 pm

Thank you for your quick reply. Sorry if I sounded like I was threatening over where or not I would buy; I just did not want to waste your time!

Your reply part answers my question; I had sort of guessed that I would need to script the install; however I am still missing one important part.

The interface is not intuitive on how to load the required files and how to recover them. Any help please?

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Mon Oct 17, 2005 4:07 pm

What do you mean by "load the required files and recover them" exactly? Please be specific on where you are stuck so we can help you better :)

Guest

Postby Guest » Mon Oct 17, 2005 4:33 pm

Ok,

The software needs to know where to pick up the source files from to be able to package them into the installer. How 'put them into the installer' when the destination folder is not known, and how do I extract them.

As I have already said, the interface is not intuitive on how to do this, it seems to be geared round 'source from here 'destination here'

Hoppe this is clearer for you :-)

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Mon Oct 17, 2005 4:39 pm

OK, so what you want to do is use the Install Files command;

Source Files Field: Click Browse and visually locate the file(s) to install; you may use wildcards

Target Folder Field: Usually something like $TARGETDIR$, in our example it will be $WINSYSDIR$ or $WINSYSDIR$\\drivers

Hope that helps! You basically want to have two Install Files commands for the files you want to install.

Guest

Postby Guest » Tue Oct 18, 2005 6:14 am

Ok,

Thank-you very much for your help. Got there in the end!

It would be nice if you could add files via the Visual GUI, i.e. right click Target Folder and then choose an option 'Create new traget folder', give it a variable name and then you can load files. This would make the whole process one step eaiser!

Thanks once again, and just pruchasing studio version :-)

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Tue Oct 18, 2005 7:16 am

Yes, that's true. The thing you can do in the visual view is selecting files (multiple ones if you wish) after having added them; and then updating their target folder in a single pass by right-clicking and choosing Edit.


Return to “Non-Technical”

Who is online

Users browsing this forum: No registered users and 67 guests