Steam

Steam

Yeterli oy yok
Making Non-Steam Games Show Up In Your Friends List
nicnacnic tarafından
Fixing Non-Steam games so they show up correctly in your friends tab. And making desktop shortcuts work too!
   
Ödül
Favorilere Ekle
Favorilere Eklendi
Favorilerden Çıkar
Introduction
Some games, especially the ones with launchers, don't work correctly when adding them as a non-steam game. Most of the time, when launching those games through Steam, the friends tab won't correctly show what game you're playing. And sometimes, the desktop shortcuts you create with Steam don't even work. This script changes all of that, it allows you to easily add non-steam games to Steam, and whenever you launch your game through Steam it correctly shows what game you're playing. And your desktop shortcuts work too!

For this guide, we'll be using Minecraft as an example, but any non-steam game should work.
Game Types
Depending on the type of game, there are two ways you can add them to Steam. Some games let you launch them through their executable, located in the game files. But some games only let you launch them through their launcher, which is annoying. Both types of games will work.

To determine if your games requires that you use the launcher, go into the game files and dig around for a file ending in .exe. Open that file, and if it gives you an error message telling you to use the launcher instead of opening the game, this means that it's a launcher-only game.
The Script
The script that we're going to be using was written by myself a while back. You can download it here[github.com]. Extract the files with WinZip or 7-Zip to your desktop.
Configuring The Script
The first thing we need to do is to configure the script, and give it the location of our game and the name of our process. The reason for this is because the script will launch the game for us, and it will run in the background until it detects that we closed the game, then it will just quit the script. There is no impact on performance when using this script, so don't worry!

Navigate to your game or launcher install location. If you don't know where this is, you can look it up. Usually, this is located somewhere in C:\Program Files (x86)\. Since Minecraft requires the use of a launcher, we're going to be navigating to the launcher location.

Find the .exe file that opens your game or launcher. There might be multiple .exe files, so open each one until you find the one that opens your game or launcher.
Once you found it, make a note of it.

With your game open, open the Task Manager by right-clicking on your taskbar, and selecting Task Manager in the menu that shows up. If needed, expand the Task Manager by clicking the arrow on the bottom left.


Find your game in the list, then right click on it and select Go To Details. Make a note of the process name highlighted in blue. In our case, the process name is javaw.exe. When you're done, you can close the Task Manager.














Go back to the folder with the .exe file, shift right-click on it and select Copy As Path. Then, go back to the folder where you downloaded the script. Right click on Launcher, and select Edit.













Next to SET GameExecutable=, paste the text that you just copied. This can be the game executable or the launcher. Make sure to remove the quotes after you pasted the text.
If one of the paths has a space in in, for example C:\Program Filex (x86)\..., place that part of the path in quotes like this: C:\"Program Files (x86)"\.... If you're unsure, look at the examples. In our case, the path will look like this: C:\"Program Files (x86)"\"Minecraft Launcher"\MinecraftLauncher.exe.

Next to SET GameProcess=, type in the process name that you noted earlier. in our case, that will be javaw.exe. Make sure to save the file, then close it.


At this point, it's probably a good idea to test the script. Double-click on the script to open it, make sure it launches either your game or your game's launcher. Wait about a minute, then close your game. The CMD window should close right after you quit your game. If something does not work correctly, edit the script again and check that the paths and the process names are correct.
Setting It Up In Steam
Now that you know the script works, now it's time to get it working with Steam. The way we're going to do this is to add the script as a non-steam game. Therefore, when the script is open, Steam will show you playing that game in your friends tab. Normally, this wouldn't work, as when you add a game a launcher will open and immediately close, so Steam thinks you closed the game. But this script will stay open the whole time, and show that you're playing the game in the friends tab!

In the Library tab in your Steam Client, click on Add A Game on the bottom left, then select Add A Non-Steam Game...




Now, you need select a program to add as a non-steam game. Any program will do, as it will only be temporary. In this example, I'm using Discord. When you're done, click on Add Selected Programs at the bottom.











Now that you added a program to Steam, find it in your library, right click it and select Properties.









Go back to the folder where you downloaded the script. If you want, this is a great time to move the script to a more permanent location like your documents folder, or your game files to keep it out of the way. When you're done with that, shift right-click on the Launcher on select Copy As Path.
Back to the Properties window, this is where you can change the name of your game. In our case we're changing it to Minecraft. In the Target field, delete all the text, and paste the text you just copied. You can ignore the Start In field.
If you want to change the icon, go down to the Changing The Icons section below for some specifications.
When you're done, click on Close.


Now it's time to test the script again. Launch the game through Steam and make sure it opens your game correctly. If it's a launcher, hit the play button when the script opens your launcher.
Once your game opens, make sure the Steam Overlay is working if you have it on. Check your Friends tab and make sure everything looks good. If everything was done correctly, Steam should show that you're in-game, and will show the name of the game that you changed earlier. Wait about a minute, then close the game. Steam should now say that you're not in the game. If this is not the case, go over the steps in this section and make sure all the file paths are correct.
                                        
Adding A Desktop Shortcut
Now that you got the script working with Steam, why not make a desktop shortcut to easily launch your game? Normally, the desktop shortcuts for non-steam games don't always work, but there's a simple workaround that we'll walk through.


In the Steam Client, right click on the game you added, select Manage, and then select Add Desktop Shortcut. The shortcut you added can now be found on the desktop.









Right-click on the shortcut, and select Properties.











In the Properties window, copy the string of numbers following the slash. You may now delete the desktop shortcut you created through Steam.










Go back to the folder where you moved the script. Right-click on Desktop Shortcut, and select Properties.
In the Target field, paste the numbers you copied after -gameidlaunch. In our case it will look like this: -gameidlaunch 15346643465538633728.
If you want to change the icon, go down to the Changing The Icons section below for some specifications.
When you're done, click on Apply then Ok.
You can rename the shortcut to anything you want.






It's time for one final test again. Double click on the shortcut to open it, and make sure it launches your game correctly. If it doesn't work, make sure to redo the steps in this section, and make sure you copied/pasted the numbers correctly.
Adding A Start Menu Shortcut
If you're like me and use Start Menu shortcuts more than the shortcuts on the desktop, then adding the shortcut to the Start Menu is a no brainer! And it's pretty simple too.

Just copy and paste the shortcut you created in the last section into this folder:
C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs.
Obviously, replace <username> with your Windows username. It's that simple!
Closing A Launcher On Game Close
Some games, like ones from Ubisoft, have pesky launchers that stay open on your computer even after you closed your game. I personally don't like that, as having so many launchers can be annoying to manage and take up valuable system resources. Therefore, if you want, you can add a process to close whenever you close your game.

Go back to the Task Manager, scroll down and find your game launcher. Right-click it, select Go To Details, and make a note of the process name. Go back to the script, right-click on it and select Edit.

Next to SET LauncherProcess=, type the process name that you collected earlier.

As an example, I want to close the Battle.NET launcher whenever I close Call of Duty: Modern Warfare. The process name is battle.net.exe, so the script will look like this:
SET LauncherProcess=battle.net.exe

If you're more tech savvy and want to close multiple launchers or other programs at the same time, you can paste the path to a batch file in the SET LauncherProcess= field, although I won't be going in and explaining how to code that batch file. It's not very complicated and there are many great resources online if you're up for the task.

Again, this is optional, the script will still work even if the LauncherProcess field is empty.
Changing The Icons
It's pretty easy to change the icons in both Steam and your desktop shortcuts. Just be aware of the limitations.

For Steam, you must use an .ico, .tga, or .png file, and there is no maximum size limit.
For Windows, you must use a .ico file with a maximum size of 256x256.

You can download icons off the internet, but I recommend using an icon extraction program for cleaner and more consistent icons. I like to use IconExtract[www.nirsoft.net] as it's pretty easy to use.
Troubleshooting And Contact
If you're having problems with the script and can't get it to work, try these suggestions.

Before you do anything, make sure you go over the setup instructions one more time. It's way too easy to mistype a folder location, or forgetting to do a step.

Check your executable location. If the script gives you an error, this means the script can't locate the file. Make sure you have the correct location.

Check to make sure spaces in the file location have quotes around them. Examples can be found above.

If the script is not closing immediately, this is probably because you closed your game too early. There is a 60s delay on the script before it starts checking if the game is closed, to make sure there is adequate time for the game to launch.

If a 60s delay is still too slow, change the 60 in TIMEOUT /t 60 > nul to any other number. Just make sure it's in seconds, for example 2 minutes would be represented as TIMEOUT /t 120 > nul

Don't close the CMD window while the script is running. It will force-quit your game. I have no idea why it does this and I haven't been able to solve it.

If there are any other errors not mentioned here, you have a question, or need help with installing and configuring the script, you can add a comment, open an issue on Github, or message nicnacnic on Steam. There are no guarantees that I will get back to you or that I'll be able to solve problems with the script.
Closing Remarks
Thanks for taking the time to read my guide. If you found it interesting and/or helpful, feel free to give it a thumbs it and share it with your friends.

I would really like to make a video tutorial using this guide, but right now I don't have the time. If someone is up to the task, just post the link in the comments and I'll add your video to the guide.

Hope you enjoy playing your non-steam games like never before!
-nicnacnic
7 Yorum
Pontus 23 Mar @ 12:53 
Overlay is not working
LUL 👑 5 Kas 2024 @ 7:31 
Thanks for this outstanding Guide.:weed:
Easy and it works perfect for me...
Best Regards... :heart:
stra 19 Eki 2023 @ 10:30 
any methods to make it work?
stra 19 Eki 2023 @ 10:30 
valorant wont work.
Niko 12 Şub 2023 @ 12:35 
It won't work on repacked games. cmd prompt opens with no errors and says not to close window, but game doesn't open
Heb1 21 Oca 2023 @ 14:50 
This was very easy to do. Great thread :steamthumbsup:
xiu xiu on that beet 20 Mar 2022 @ 7:33 
this is great stuff, thanks