Please upgrade your browser for the best possible experience.

Chrome Firefox Internet Explorer
×

Steam Overlay - Working on win7

STAR WARS: The Old Republic > English > General Discussion
Steam Overlay - Working on win7

renegadelink's Avatar


renegadelink
12.28.2011 , 12:06 AM | #1
UPDATE

The mods deleted my other thread with my better solution.
But I've posted in the customer service forum explaining why steam overlay doesn't work, and how to fix it.
http://www.swtor.com/community/showthread.php?t=191776

I've also posted on steam forums. Hopefully either valve or bioware will fix the problem.
http://forums.steampowered.com/forum....php?t=2487980

People need to reply in those threads or no dev will ever notice.

--------------------------------------------------------------------------------------------------------

UPDATE

I got a better solution here:
http://www.swtor.com/community/showthread.php?t=104668


--------------------------------------------------------------------------------------------------------

I have gotten the steam overlay to work on my computer. I don't have another computer to test it on, so this first attempt I am giving out may or may not work.

This also runs the swtor client in non-admin mode which is a nice security perk.

Here are the steps:

Step 1 (script):
copy paste this script into a plain text editor (ex. notepad) and save it as "steamswtor.vbs" in the same directory as your swtor launcher (ex. "C:\Program Files (x86)\Electronic Arts\BioWare\Star Wars - The Old Republic"):

Code:
' if nothing was passed in, we are starting from scratch, so start the launcher
If WScript.Arguments.length = 0 Then
	swtorHome = WScript.ScriptFullName
	swtorHome = Left(swtorHome, InStr(swtorHome, WScript.ScriptName)-1)
	
	'run the launcher
	Set objShell = WScript.CreateObject("Shell.Application")
	objShell.ShellExecute "launcher.exe", "", swtorHome
	
	' create the file that the elevated script will copy swtor's path and commandline to
	set fso = CreateObject("Scripting.FileSystemObject")
	set tempfolder = fso.GetSpecialFolder(2)
	tempname = tempfolder & "\" & "swtorsteam.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", 1

	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
	
	swtorExecutablePath = swtorHome + "swtor\retailclient"
	set tempfile = fso.OpenTextFile(tempname)
	swtorCommandLine = tempfile.ReadLine
	tempfile.close()
	
	Set objShell = CreateObject("Shell.Application")
	objShell.ShellExecute "swtor.exe", swtorCommandLine, swtorExecutablePath

	fso.DeleteFile tempname
	WScript.Quit
Else
	' we are elevated now	
	WScript.Echo "Waiting for launcher to start swtor..."
	
	'Get Windows Manager object 
	Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")

	' check every second for swtor.exe that was launched by swtor's launcher
	While True
	
		'Get info on processes named "swtor.exe"
		Set swtorInstanceList = objWMIService.ExecQuery _ 
		("Select * from Win32_Process Where Name =""swtor.exe""")
		
		for Each swtorInstance in swtorInstanceList
			cmdline = swtorInstance.CommandLine
	
			'look for something only our swtor will have in it's commandline arguments
			If InStr(cmdline, "username") > 0 Then
				'we found the swtor.exe we care about
				swtorInstance.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
			End If
		Next	
		
		WScript.Sleep 1000
	Wend
End If

Step 2 (steam):

- Open up steam and go to the menu option "Games" and click "Add a non-steam game to my library"
- Add "Star Wars the Old Republic" or browse to swtor's "launcher.exe" and add that.
- Now right-click the newly added game in steam's library, and click properties.

- Change the properties to match these:
> (Optional) Choose Icon: Browse to swtor's "launcher.exe" and select it
> (Optional) Name: Star Wars - The Old Republic
> (Required) Target: "C:\Windows\System32\cscript.exe" "PUT FULLPATH TO steamswtor.vbs"
> here's a full example (the quotes are important):
Target: "C:\Windows\System32\cscript.exe" "C:\Program Files (x86)\Electronic Arts\BioWare\Star Wars - The Old Republic\steamswtor.vbs"
> (Required) Start In(the quotes are important): "C:\Windows\System32"
That's it.

Using vbscript has made doing this simple task annoying but I didn't want to write this so people would have to compile source code, or for me to give out an exe for people to run.

Hopefully this works for people. If not, I'll try something else. I know it is possible to get steam overlay working with swtor though which is good.

Enjoy.

Zeeth's Avatar


Zeeth
12.28.2011 , 01:08 AM | #2
Nice, I get an error saying "launcher has stopped working" but it works, nice programing.

"Heretics crave the cleansing fire of absolution. They need not fear, for we shall deliver"

Morberis's Avatar


Morberis
12.28.2011 , 01:18 AM | #3
Doesn`t work for me.

Does the title in steam require the quotation marks as well?

Lonkley's Avatar


Lonkley
12.28.2011 , 01:23 AM | #4
Placeholder to track thread.

Serpenttt's Avatar


Serpenttt
12.28.2011 , 01:23 AM | #5
Thanks for this, been trying to get it to work just making basic batch files but with no success. Will try it out after work in hopes that it works.
Serpentine, many many alts. Ebon Hawk.

Garton's Avatar


Garton
12.28.2011 , 01:25 AM | #6
Works for me on win 7 64bit.

I had my steam in xp sp3 compatibility mode since another game with a launcher required it in order to work. However it did not work in that mode, after switching off compatibility mode it works perfectly.

Many thanks for this.

ATF_Azuran's Avatar


ATF_Azuran
12.28.2011 , 03:02 AM | #7
Be sure to CHECK YOUR PATH!

My installation directory has EA instead of Electronic Arts so i had to adjust the steam shortcut accordingly

Works just fine for me!

Also make sure if you're using 32 bit windows to take out the (x86) part too in the path. Lesson- CHECK THE PATH

Movodor's Avatar


Movodor
12.28.2011 , 05:20 AM | #8
Thanks so much! Working for me!

thraxxousai's Avatar


thraxxousai
12.28.2011 , 05:55 AM | #9
K this isnt working...so much so that I destroyed my install Reinstalling into EA...following the steps as reccomended and nothing happens....steam wont even open the launcher...it simply closes back down.
I count him braver who conquers his desires then him who conquers his enemies; for the hardest victory is the victory over self.~~Aristotle

TWIN_SUNZ's Avatar


TWIN_SUNZ
12.28.2011 , 06:37 AM | #10
Quote: Originally Posted by thraxxousai View Post
nothing happens....steam wont even open the launcher...it simply closes back down.
This happens for me also..