PDA

View Full Version : Copying files to an existing directory on client machine



John Ko
11-13-2001, 11:47 AM
Can someone please tell me how to put files into an existing directory on the client machine???? I do not know if the directory is on the C or D drive. I have everything else working except for this one thing!

Unfortunately I have to have this done in approx. 3 hours. Any help is greatly appreciated!

Thanks
John

Chandima
11-14-2001, 11:04 AM
One way I can think of would be to write a Custom Action to search for a particular file on the local machine. Once it finds it get the path to it. Then assign this value INSTALLDIR at runtime.

J_Shawver
11-14-2001, 12:43 PM
You could also have Windows Installer find the directory for you, if you're comfortable editing the .msi file. Suppose the name of the directory you're looking for is "MyDir". Add a row to the AppSearch table and the DrLocator table:

AppSearch table
Property : INSTALLDIR
Signature_ : MyDir

DrLocator table
Signature_ : MyDir
Parent : (leave blank)
Path : (leave blank)
Depth : 32767

This should cause the AppSearch action to look for MyDir in all subdirectories of all fixed drives, and if it finds it, assigns the location to INSTALLDIR.

I haven't actually tried this myself. I you try it, please let us know if it works or not.