Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

Krux1015

Uploaded by

Krux1015

Virus scan

Safe to use

Tags for this mod

About this mod

SkyrimSE process keeps closing on you when you try to launch the game? Use this.

Requirements
Permissions and credits
Vers 2.0.0 Changes:
Fixed an issue where an environment variable was being used causing the multiprocess detection method to fail.
With that working, script will fire 3 skse executables which speeds up the launch.
More verbose output.

-----

tl;dr (at the top cuz im so nice - but scroll beyond this first image at least):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.bat file launches .ps1 file. .ps1 file re-runs script extender (skse64) until 1 is running and/or closes extra processes so only 1 is running.
Works in Vortex like so:

^100% definitely check 'Run in shell'. Point to the .bat file. Both files in launcher folder.
If no vortex = do not copy .bat file to desktop, instead make SHORTCUT to bat file on desktop
no run-as-admin needed but it's a ps1 script so you may need to permit it to run depending on what security software you have.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of tl;dr

Loose scripts used to launch SkyrimSE using skse64_loader.exe for people who's SkyrimSE process keeps closing on them before the game launches.
The script runs the skse64_loader.exe and checks for the process to be running after x number of seconds (5 by default) and if the process is still there, it knows the game will open a physical window - taking the guesswork away from you, the player.

It keeps executing the process if the check fails (no skyrimse process after skse64_loader.exe execution)

It also checks for multiple instances of the process and closes all but the first one.

The end result of the script is basically that 1 SkyrimSE.exe is in your running processes so even if you manually launched skse 50 times, you can run this script and it will kill 49 of the processes.

----------------
The skse-loader.bat and skse-loader.ps1 both belong in the execution folder where skyrimse.exe and skse64_loader.exe reside.
I recommend making a shortcut to the .bat file on your desktop or wherever you prefer to launch the game from. Don't copy the bat file, just make a shortcut - the .bat looks in the current path for the skse-loader.ps1 so it will fail if you run it from another location if it's not a shortcut. The .bat is only responsible for launching the .ps1 file and can be used by Vortex
----------------
The skse-loader.ps1 is the meat of it - right-click the .ps1 file and click Edit and plain as day.. the number of seconds is adjustable right at the top. The whole script is well commented for your fine-tuning but really only the wait seconds might need adjusting depending on you/your computer/your hard drive/the number of mods you use - any of these things could impact how long the process might sit around until it closes on you. 5 Seconds is just what works for me.
----------------


I'm well aware that I can set an execution policy inside the ps1 script but here's the thing:
1) it really would only affect some initial prompts at launch of script
2) it would only affect the first time launch of the script
3) vortex doesn't require running as admin, nor does skse, so I'm maintaining continuity with these things.

Personally, my security software prompts for a bunch of things when ANY powershell script gets run, that's pretty normal. It's not doing anything to your computer, the script is obviously open source here so you can vet it yourself.