- Messages
- 2
- Country

I am using an adaptation of the Rikoooo VBscript with Advanced Installer, similar to the scripts above except it returns the APPDIR to advanced installer so I know where to put the files.
Within a couple days of release though I had a few instances of the installer not finding the proper location??? Is there yet another location we need to search? Always it was people with the Steam version, not sure if they did something crazy and the usercfg.opt is getting written to a 3rd location I'm not aware of? As a result I had to make a manual install option that let them put the product where they want.
I suspect it is caused by addon ,managers or some such. At any rate do you guys see a problem with this script?
'-----------------------------------------------------------------
'This script used to read the UserCfg.opt filename
'Match "InstalledPackagesPath" string and extract the path value
'-----------------------------------------------------------------
Dim Count
Dim strline
'Variable declaration
filename = Session.Property("MS_STORE_VER")
instpath = "InstalledPackagesPath"
Const ForReading = 1
Count = 0
'Open the file
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(filename, ForReading)
'Read the file line by line
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
If Instr(strline, instpath) then 'Match the install path string
contents = Replace(strline, instpath, "") 'Remove the InstalledPackagesPath from main string
contents = replace(contents, chr(34), "") 'Remove double quote value
contents = trim(contents) 'Trim the space
end if
Loop
Session.Property("APPDIR") = contents 'Output path back to Advanced installer
objFile.Close
Edit: I run the same script on steam version.
Within a couple days of release though I had a few instances of the installer not finding the proper location??? Is there yet another location we need to search? Always it was people with the Steam version, not sure if they did something crazy and the usercfg.opt is getting written to a 3rd location I'm not aware of? As a result I had to make a manual install option that let them put the product where they want.
I suspect it is caused by addon ,managers or some such. At any rate do you guys see a problem with this script?
'-----------------------------------------------------------------
'This script used to read the UserCfg.opt filename
'Match "InstalledPackagesPath" string and extract the path value
'-----------------------------------------------------------------
Dim Count
Dim strline
'Variable declaration
filename = Session.Property("MS_STORE_VER")
instpath = "InstalledPackagesPath"
Const ForReading = 1
Count = 0
'Open the file
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(filename, ForReading)
'Read the file line by line
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
If Instr(strline, instpath) then 'Match the install path string
contents = Replace(strline, instpath, "") 'Remove the InstalledPackagesPath from main string
contents = replace(contents, chr(34), "") 'Remove double quote value
contents = trim(contents) 'Trim the space
end if
Loop
Session.Property("APPDIR") = contents 'Output path back to Advanced installer
objFile.Close
Edit: I run the same script on steam version.
Last edited:

