Manual installation of the Geos to both the Engine and The Cabview got them to show up.

buzz456 wrote:Manual installation of the Geos to both the Engine and The Cabview got them to show up.
Sagefuncom wrote:I did not modify any GEO files for this add-on.
Function ExtractAP (path, exFile)
'Extract exFile from any .ap file in path
'exfile = relative path to desired file inside the archive, including file name
'path = path to desired .ap file, including file name
Dim oFSO, oFile, command, WshShell, intResult, objFSO, objFile, readOnly
readOnly = 1
ExtractAP = False
Set oFSO = CreateObject("Scripting.FileSystemObject")
If Not oFSO.FolderExists(path) Then
WriteLog " ExtractAP: Folder doesn't exist: " & path
Exit Function
End If
For Each oFile In oFSO.GetFolder(path).Files
If LCase(oFSO.GetExtensionName(oFile.Name)) <> "ap" Then
Exit For
End If
command = "7za.exe x -o" & AddQuotes(path) & " " & AddQuotes (path & "\" & oFile.Name) & " " & AddQuotes (exFile)
Set WshShell = WScript.CreateObject("WScript.Shell")
WriteLog " ExtractAP: Trying " & command
intResult = WshShell.Run (command, 0, TRUE)
If intResult Then
WriteLog " ExtractAP: Error returned: " & intResult
Else
WriteLog " ExtractAP: Seems to have completed successfully "
End If
If CheckFile (path & "\" & exFile, False, False) Then
'Make the file writeable
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(path & "\" & exFile)
If objFile.Attributes AND readOnly Then
objFile.Attributes = objFile.Attributes XOR readOnly
End If
ExtractAP = True
End If
Next
Set WshShell = Nothing
End Function
'Check if file exists
If Not CheckFile (pathfile, True, False) Then
'Try to find the file in .ap archives
If Not ExtractAP (path, file) Then
'No such scenario
WriteLog " ERROR - can't find Scenario.bin, already checked in .ap files."
Exit Function
End If
End If
Chacal wrote:@Sagefuncom: I am in the process of rebuilding my vbs script library. I've added a function for extracting a file from an .ap file, so that you won't have to teach your users to do it manually anymore. It uses the 7za.exe program that you can include with your scripts. It is a lightweight, standalone, command-line version of 7zip. This is the same technique Mike uses for RW-Tools.
At least I can somewhat understand the code. Sounds like that'd be a real useful tool!Chacal wrote:@Sagefuncom: I am in the process of rebuilding my vbs script library. I've added a function for extracting a file from an .ap file, so that you won't have to teach your users to do it manually anymore. It uses the 7za.exe program that you can include with your scripts. It is a lightweight, standalone, command-line version of 7zip. This is the same technique Mike uses for RW-Tools.
Return to Freeware Add-On Releases
Users browsing this forum: No registered users and 10 guests