Does anyone know a way to have Steam run FFXI (even as a non-steam app) and use the windower too? It always seems to cut off that I'm playing it due to the fact that windower launches POL, and POL launches FFXI.
Old, but I was thinking about this and I think I know a way through a VBScript.
Code
Launcher = "Launcher File Path"
Client = "Client File Path"
' if nothing was passed in, we are starting from scratch, so start the launcher
If WScript.Arguments.length = 0 Then
Home = WScript.ScriptFullName
Home = Left(Home, InStr(Home, WScript.ScriptName)-1)
'run the launcher
Set objShell = WScript.CreateObject("Shell.Application")
objShell.ShellExecute Launcher, "", Home
' create the file that the elevated script will copy executables's path and commandline to
set fso = CreateObject("Scripting.FileSystemObject")
set tempfolder = fso.GetSpecialFolder(2)
tempname = tempfolder & "\" & "steam.tmp"
set tempfile = fso.CreateTextFile(tempname)
tempfile.close()
'run this script but signal that it needs to elevate by giving it the tempfile name as an argument
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "cscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " " & tempname, "", "runas", 2
WScript.Echo "Waiting for other script to finish..."
' check every second if the temporary file has been updated with the commandline info
Do While True
'check the filesize of the tempfile
set tempfile = fso.GetFile(tempname)
If tempfile.Size > 0 Then Exit Do
WScript.Sleep 1000
Loop
ExecutablePath = Home
set tempfile = fso.OpenTextFile(tempname)
CommandLine = tempfile.ReadLine
tempfile.close()
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute Client, CommandLine, ExecutablePath
fso.DeleteFile tempname
WScript.Quit
Else
' we are elevated now
WScript.Echo "Waiting for launcher to start client..."
'Get Windows Manager object
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
' check every second for client that was launched by launcher
While True
'Get info on processes named Client
Set InstanceList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = '" & Client & "'")
for Each Instance in InstanceList
cmdline = Instance.CommandLine
'we found the client we care about
Instance.Terminate()
'remove the exe path and name from the cmdline
position = InStr(1, cmdline, """ ") + 1
cleanCmdLine = Right(cmdline, Len(cmdline) - position)
tempname = WScript.Arguments(0)
set fso = CreateObject("Scripting.FileSystemObject")
set tempfile = fso.OpenTextFile(tempname, 2)
tempfile.WriteLine(cleanCmdLine)
tempfile.close()
WScript.Quit
Next
WScript.Sleep 1000
Wend
End If
You'll need two things, the file path for your windower launcher, and the file path for POL.exe.
random image I found that showed both the windower launcher.exe and POL.exe
Hold shift and right click, then click "Copy as path", then replace "Launcher File Path" (with quotes, make sure you don't have double quotes). Do this for both Launcher.exe and POL.exe. I don't play XI anymore and I have neither of these programs so I can't double check this, but I've tested this script with a few different launcher games.
If you are having any issues figuring out the path for the launcher or the client,
Process Explorer is your best friend.
So now that you've edited lines 1 and 2, you can then save it as a .vbs script. You can name it whatever you want, like steamoverlay.vbs or something you like, just remember what you name it.
Now, open steam and click "+ ADD A GAME", then click Add Non-Steam Game. Set the Icon to Windower, POL, or whatever you prefer by clicking Choose Icon and navigating to what icon you want. Then name it FFXI, for the target you'll want "C:\Windows\System32\cscript.exe" "file path of steamoverlay.vbs"
for example: "C:\Program Files (x86)\PlayOnline\steamoverlay.vbs"
again, to copy the file path just hold shift and right click the script you made and click "Copy as path".
For start in you can just put "C:\Windows\System32\"
So again, just to make this clear.
1. Set Icon
2. Name it
3. Set Target, for example:
"C:\Windows\System32\cscript.exe" "C:\Program Files (x86)\PlayOnline\steamoverlay.vbs"
4. Set Start In as:
"C:\Windows\System32\"
Then click close, and launch it through steam. You'll get a command window then Windower
SHOULD open up, then just log in like normal, and when POL.exe opens you should get the toaster popup that steam overlay is active.
This is just me guessing really, so... yea.
====
To have the console window start minimized change the target to (for example):
"C:\Windows\System32\cmd.exe" /c start /min cscript.exe "C:\Program Files (x86)\PlayOnline\steamoverlay.vbs"