Hi,
You can detect the file by using a
search. After you have the path of the file, you can obtain the path of it's folder by using a
custom action.
Here is a sample VBScript that does this for a search named "MY_SEARCH":
Code: Select all
Dim path
path=Session.property("MY_SEARCH")
smallPath=Left(path,InStrRev(path,"\")-1)
smallPath=Left(path,InStrRev(smallpath,"\"))
Session.property("MY_SEARCH")=smallPath
This custom action can be scheduled under the "InstallExecuteSequence" -> "AppSearch" standard action. You can see this standard action by using the "Show Standard Action" button on the toolbar in the "Custom Actions" page. Also, the "Function Name" field of the above custom action must be empty in order to run the script.
Regards,
Cosmin