Need help with a misbehaving script

Discuss and share scripts and script files...
Post Reply
MBaas
Posts: 582
Joined: 15 Feb 2016 21:08

Need help with a misbehaving script

Post by MBaas »

I have a problem with this script. It is supposed to show a menu with various selections and execute the chosen one. Generally works fine, but I had a challenge with a command that needed to be run as admin. I found the tool GSudo which supports that and so I've built run arguments to launch appropriately. This was tested with "Try Script" and I also copied the result (as shown by the text command) and executed it with run - works fine.
However, when running the script, all that it does (after showing the command) is to open an explorer window for "This PC"...

Code: Select all

       $menu = <<<MENU
&DB;
       &Maria DB CLI;"""C:\Program Files\gsudo\2.0.9\gsudo.exe"" -n --keepShell ""C:\Program Files\MariaDB 10.5\bin\mysql"" -u root  --default-character-set=utf8";c:\data\icons\database.ico
MENU;
         $sel = popupnested($menu);
         end $sel == "";
         text $sel;
         run $sel;
______________________________________________
Happy user ;-)

highend
Posts: 13339
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Need help with a misbehaving script

Post by highend »

Code: Select all

&Maria DB CLI;run """C:\Program Files\gsudo\2.0.9\gsudo.exe"" -n --keepShell ""C:\Program Files\MariaDB 10.5\bin\mysql"" -u root  --default-character-set=utf8";c:\data\icons\database.ico
Instead of run use load $sel, , "s";
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 582
Joined: 15 Feb 2016 21:08

Re: Need help with a misbehaving script

Post by MBaas »

Ah, that works - thanks very much! :tup:
______________________________________________
Happy user ;-)

Post Reply