Sorry ahead of time for the thread title. its a pretty niche situation, but something that couldn't find a solution to.
Also VERY likely it is nearly useless for just about anyone else.
Let me give you some background into what I'm wanting to share with you.
I like to run anything I don't want to look at, or on my taskbar to run on a different "desktop". Windows has this built in with a
You can see here, that I keep:
Desktop 1 as my "main go to"
Desktop 2 as a "backup go to" so it is usually empty
Desktop 3 is my "put eqbcs and myseq server, and my voicemeter and anything else i need running but don't want to see"
Now this is great because myseq server and eqbcs2 can be running and doing their thing, but i don't have to SEE them.
a huge desire i've wanted for a while is to be able to click a button / script and then have them open on the desktop I want ONLY if they're not already running.
@Knightly & @kaen01 helped me figure out a powershell script that would do just that using VDesk
I know near nothing about powershell - so there is almost certainly a more simple way to do this, but this might help 1 person (plus is a good way for me to document it in case i lost it somehow). I'm just about certain that I could clean up my 3 VDeskArg variables
This powershell script will open eqbcs2 on my desktop 3 if it is not already running, open myseq server on desktop 3 if it is not already running, and open myseq client on desktop 1 if not already running. the "noswitch" means "don't swap to the desktop".
If i were to run it again, it would only launch any of those items not already running - so i won't end up with duplicates etc.
You would definitely want to update the "E:\VV LIVE\Release\" etc to match your directory/locations
so i have an icon on my desktop for this launch.ps1
or if you want it actually spelled correctly (thanks knightly)
and i can right click it and "Run with PowerShell"
and it does all of the magic goodness
Also VERY likely it is nearly useless for just about anyone else.
Let me give you some background into what I'm wanting to share with you.
I like to run anything I don't want to look at, or on my taskbar to run on a different "desktop". Windows has this built in with a
WindowsKey+Tab
You can see here, that I keep:
Desktop 1 as my "main go to"
Desktop 2 as a "backup go to" so it is usually empty
Desktop 3 is my "put eqbcs and myseq server, and my voicemeter and anything else i need running but don't want to see"
Now this is great because myseq server and eqbcs2 can be running and doing their thing, but i don't have to SEE them.
a huge desire i've wanted for a while is to be able to click a button / script and then have them open on the desktop I want ONLY if they're not already running.
@Knightly & @kaen01 helped me figure out a powershell script that would do just that using VDesk
I know near nothing about powershell - so there is almost certainly a more simple way to do this, but this might help 1 person (plus is a good way for me to document it in case i lost it somehow). I'm just about certain that I could clean up my 3 VDeskArg variables
This powershell script will open eqbcs2 on my desktop 3 if it is not already running, open myseq server on desktop 3 if it is not already running, and open myseq client on desktop 1 if not already running. the "noswitch" means "don't swap to the desktop".
If i were to run it again, it would only launch any of those items not already running - so i won't end up with duplicates etc.
You would definitely want to update the "E:\VV LIVE\Release\" etc to match your directory/locations
Code:
$VDesk = 'D:\Program Files (x86)\VDesk\vdesk.exe'
$VDeskArgEQBC = 'vdesk on:3 noswitch:true run:"E:\RedGuides\Next\mqnext\build\bin\release\EQBCS.exe"'.Split(" ")
$VDeskArgMySEQServer = 'vdesk on:3 noswitch:true run:"E:\RedGuides\MySEQ\server.exe"'.Split(" ")
$VDeskArgMySEQClient = 'vdesk on:1 noswitch:false run:"E:\RedGuides\MySEQ\MySEQ.exe"'.Split(" ")
# get the process
if (Get-Process EQBCS -ErrorAction SilentlyContinue) {
echo "EQBCS is Already Running"
}
else {
& $VDesk $VDeskArgEQBC
}
Remove-Variable sicsprocess
if (Get-Process server -ErrorAction SilentlyContinue) {
echo "MySEQ Server is Already Running"
}
else {
& $VDesk $VDeskArgMySEQServer
}
if (Get-Process MySEQ -ErrorAction SilentlyContinue) {
echo "MySEQ Client is Already Running"
}
else {
& $VDesk $VDeskArgMySEQClient
}
so i have an icon on my desktop for this launch.ps1
or if you want it actually spelled correctly (thanks knightly)
and i can right click it and "Run with PowerShell"
and it does all of the magic goodness
Last edited: