• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Software powershell: copy the content of multiple versions of a file with a kind of multiple-choice menu (1 Viewer)

My use-case: powershell-menu to choose 1 out of multiple MQ2Autologin.ini before starting EQ

Many times ago I got MQ2Autologin to run with my setup (IS-Boxer) creating a MQ2Autologin.ini using a guide I found somewhere here. In the meantime, there are better ways to create different settings of teams to be started with MQ2Autologin.
I tried it but have been too lazy to get it running, so I created different versions of my MQ2Autologin.ini and since I copy the content of the "right" mq2autologinXXXX.ini into mq2autologin.ini before launching EQ.
As in the last weeks somehow the problems to reach "char-select" from an already logged-in char, in order to swap i.e. from my "main"-toons to my "bazaar"-toons increased, I wanted to have it done automatic.
There are different possibillities to create a "batch"-file in order to get this task done without the risk to fail and maybe copy the content in the "wrong" direction. My choise was to create a powershell-script.


Copy the following source into a file like "LogBaz.ps1". Attn: the right extension for a powershell source-file is ".ps1".
source:
$default = New-Object System.Management.Automation.Host.ChoiceDescription '&0-default', 'Launch default Crew'
$over = New-Object System.Management.Automation.Host.ChoiceDescription '&1-over', 'Launch over Crew'
$bazaar = New-Object System.Management.Automation.Host.ChoiceDescription '&2-bazaar', 'Launch bazaar Crew'

$options = [System.Management.Automation.Host.ChoiceDescription[]]($default, $over, $bazaar)

$title = 'Crewselector'
$message = 'What should be your todays crew?'
$result = $host.ui.PromptForChoice($title, $message, $options, 0)

switch ($result)
{
0 { Copy-Item "D:\EQ\MQNext\config\mq2autologinDefault.ini" -Destination "D:\EQ\MQNext\config\mq2autologin.ini" }
1 { Copy-Item "D:\EQ\MQNext\config\mq2autologinOver.ini" -Destination "D:\EQ\MQNext\config\mq2autologin.ini" }
2 { Copy-Item "D:\EQ\MQNext\config\mq2autologinBazaar.ini" -Destination "D:\EQ\MQNext\config\mq2autologin.ini" }
}

[Environment]::Exit(0)
Attn: the processing part is the block: "switch" here you need to modify the filenames you are using.


if you right-click this file and choose "Run with powershell" you should see the following result:
1670924627029.png
now you can either direkt click <enter> or else choose the option you like by typing the number and <enter>


in order to create a hot-button onto your desktop use the following syntax for your Link:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -ExecutionPolicy Bypass -File D:\EQ\PS\LogBaz.ps1
Where "D:\EQ\PS\LogBaz.ps1" is the name and path of the source-file you created.
which creates a launch-button on your desktop like the following:
1670924779235.png

Result: you can double-click your "Hot-Button" in order to copy the right version of your "source"-ini into the "target"-ini.
 
Last edited:
Interesting. I have written a ton of PS scripts, but never had a use case for MQ as I never use ISBoxer. I tried once, ran into some issues with permissions, etc, and just created multiple profiles within MQ for various group setups. Good job though making it work for you!
 
Software powershell: copy the content of multiple versions of a file with a kind of multiple-choice menu

Users who are viewing this thread

Back
Top