I have created a File to Search called MY_FILE and it is able to find the path of the file I specified. Now I want to set the Application Folder path to the Parent folder of the file found. I created script called Search.vbs and used this code:
Code: Select all
Function GetParentFolder()
filePath = Session.Property("MY_FILE")
Set objFS = CreateObject("Scripting.FileSystemObject")
If (objFS.FileExists(filePath)) Then
Session.Property("PARENT_FOLDER") = AppendTrailingBackslash(objFS.GetParentFolderName(filePath))
End If
End Function
Function AppendTrailingBackslash(folderPath)
If Right(folderPath, 1) <> "\" Then
AppendTrailingBackslash = folderPath & "\"
Else
AppendTrailingBackslash = folderPath
End If
End FunctionThe Function is called GetParentFolder
Execution time is set to Immediately
On the install parameters Properties I added a Property Called PARENT_FOLDER with a value of MY_FILE. I am stuck when I run the install I get the error "Could not access network location MY_FILE."
Please Help.
FOLLOW US
Get the latest news in Application Packaging