How to copy files from install media

Got a problem you cannot solve? Try here.
docrice
Posts: 3
Joined: Tue Jul 06, 2010 10:23 pm

How to copy files from install media

Postby docrice » Tue Jul 06, 2010 10:31 pm

I did a quick search here (as well as Google) but didn't find the specific answer I'm looking for.

I'm creating a simple setup.exe which will be put onto non-writable media and distributed. However, this executable will be placed in a directory structure where it must reference a set of files outside of its parent folder (but still on the read-only media) and copy them to the target system. It cannot be bundled into the setup.exe package itself since the contents of that outside folder may change depending on the marketed variation of the product and my .exe will need to accommodate any scenario.

I understand now that the Copy / Move Local File function won't work in MSICode. However, there has to be a way to do this. It just seems like such a basic function.

Creating these installer packages is outside of my area of expertise (I'm a systems / network admin, not a developer) but I've been tasked to do this for some reason. Perhaps I've overlooked something obvious?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: How to copy files from install media

Postby MichaelNesmith » Wed Jul 07, 2010 1:22 am

Why won't Copy / Move Local File work for you? Are you recursing subdirectories?
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

docrice
Posts: 3
Joined: Tue Jul 06, 2010 10:23 pm

Re: How to copy files from install media

Postby docrice » Wed Jul 07, 2010 1:27 am

From what I gathered from the application help, isn't the Copy / Move Local File operation designed to work on objects which already exist on the target system? I'd assume the original install media (CD, flash drive, etc.) be exempt from this definition.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: How to copy files from install media

Postby MichaelNesmith » Wed Jul 07, 2010 3:22 am

Since the media is already mounted, it is included, not exempt :)
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

docrice
Posts: 3
Joined: Tue Jul 06, 2010 10:23 pm

Re: How to copy files from install media

Postby docrice » Thu Jul 08, 2010 1:52 am

Thanks for clarifying that. After figuring out through additional searches that the Apply Change / Apply Install command needs to be set afterward, I finally got it working. However, I ultimately needed to copy files from a relative path (..\some\other\dir) and read on another thread that this is currently not supported in IA9, which is kind of a bummer. In my case, it turned out that for my project it wasn't necessary to perform that operation anyway, so I lucked out.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: How to copy files from install media

Postby MichaelNesmith » Thu Jul 08, 2010 3:42 am

You can always use the path manipulation commands in InstallAware to move up to higher level folders.

That said, the posts on this forum regarding relative paths are all pertaining to compile time paths. Windows Installer may support relative paths in the Copy/Move Local Files command, if it does, InstallAware would be supporting it too.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 86 guests