Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

dynamically getting folder location


1 reply to this topic

murali_s

murali_s
  • Members
  • 19 posts

Posted 30 August 2006 - 09:02

Hi,
I have developed a script. I want to dynamically get the location of the folder where the exe is present. For example the exe given to the end-user could be placed in any folder, hence I want the location of that folder. Basically the complete path.

For example UserA could place the exe in C:\Test\ABC. I would like to dynamically when running the exe get "C:\Test\ABC".

Another example, UserB could place the exe in C:\Test\Test\Temp. I would like to dynamically when running the exe get "C:\Test\Test\Temp".

How can this be achieved in InstallScript MSI project.


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 30 August 2006 - 12:35

You can use MSI's AppSearch feature. It is described very well in the SDK. Essentially you specify a file name, version, directory depth, starting directory etc to search for, and if found the path is assigned to the property you specify. Tables involved are AppSearch, Signature, RegLocator, IniLocator, CompLocator and DrLocator - and as you see from the names you can search for different kinds of files, and entries such as registry keys etc...
Regards
-Stein Åsmul