<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>SyMenu - General discussion &amp; questions - Start minimized Thunderbird - Messages</title>
<link>https://www.ugmfree.it/forum/messages.aspx?TopicID=950</link>
<description>SyMenu - General discussion &amp; questions - Start minimized Thunderbird - Messages</description>
<language>en-us</language>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<pubDate>Wed, 01 Oct 2025 23:12:40 GMT</pubDate>
<lastBuildDate>Wed, 01 Oct 2025 23:12:40 GMT</lastBuildDate>
<item>
<link>https://www.ugmfree.it/forum/messages.aspx?TopicID=950</link>
<title>Message from Space</title>
<description><![CDATA[Ok, I have solved it differently<br/><br/>I have installed the extension 'minimize_on_startup' and works perfectly<br/><a href="https://github.com/aAndrzej-dev/Minimize-on-startup" target="_blank" rel="nofollow">https://github.com/aAndrzej-dev/Minimize-on-startup</a>]]></description>
<pubDate>Wed, 01 Oct 2025 23:12:40 GMT</pubDate>
</item>
<item>
<link>https://www.ugmfree.it/forum/messages.aspx?TopicID=950</link>
<title>Message from Space</title>
<description><![CDATA[Ok. thank you<br/><br/>I see the solutions very complicated for me, I will choose to install the program, without being portable and I solve it.<br/><br/>Regards]]></description>
<pubDate>Wed, 01 Oct 2025 15:58:10 GMT</pubDate>
</item>
<item>
<link>https://www.ugmfree.it/forum/messages.aspx?TopicID=950</link>
<title>Message from Gianluca</title>
<description><![CDATA[Hi Space!<br/>It's simply impossible. <br/>SyMenu has an option to start a program maximized or minimized, but PAF programs use a launcher (the portabilizer), and SyMenu can't do anything beyond asking the launcher to start in a specific state. Unfortunately, apart from the splash screen, the launcher doesn't have a window and doesn't pass the request about window state to the actual program, so there's no solution.<br/><br/>Well, actually, there are two possible solutions... but be warned, they're not exactly simple.<br/><br/><br/>1) Ask John <img src="images/smilies/smile.gif" border=0 alt="smile" /> <img src="images/smilies/smile.gif" border=0 alt="smile" /> <img src="images/smilies/smile.gif" border=0 alt="smile" /><br/>This is a limitation of the PAF launcher. <br/>Ideally, you should be able to run it with a command-line argument to tell it to launch the real app minimized... but I fear they haven't considered this. <br/>Try checking the documentation here to be sure: <a href="https://portableapps.com/manuals/PortableApps.comLauncher/ref/launcher.ini/launch.html" target="_blank" rel="nofollow">https://portableapps.com/manuals/PortableApps.comLauncher/ref/launcher.ini/launch.html</a> <br/>Anyway, ask John, he's always super kind and might implement the feature in no time.<br/><br/>2) Hack it<br/>Strangely enough, I had a similar need with Firefox. <br/>I wanted Firefox to open maximized and move to my primary monitor (I use two). So I created a customizable PowerShell script, which I’ve attached below. <br/>In SyMenu, you just need to create a SyProgram where the Path is  "powershell.exe" and the Arguments are: -File [full path to the PS  script] -processName [name of your program]<br/>You can run it after launching Thunderbird, or use it to launch Thunderbird and minimize it directly. <br/><br/><br/>Of course, feel free to modify the script however you like and maybe share it here once it's done. <br/>You could even make it non-generic by hardcoding the process name, but I kept it generic so it can be reused for other programs. <br/>Or you could add a parameter to specify whether the program should be maximized or minimized. <br/>Just my two cents for further improvements.<br/><br/><br/><code><br/># --------------------------------------------------------------------------------------------------------------<br/># Created by    : Gianluca Negrelli<br/># Copyright     : 2025.03.27<br/># --------------------------------------------------------------------------------------------------------------<br/># Maximizes the window of a process and moves it to the primary monitor, which in my<br/># case is the one on the right.<br/># The process name is passed without extension as an argument. E.g. firefox.<br/># The script is used by SyMenu in the autoexec after launching certain programs.<br/># --------------------------------------------------------------------------------------------------------------<br/><br/>#$processName = $args[0]<br/># Get the process name from the command line if provided (e.g. -processName firefox).<br/>param (<br/>    [string]$processName<br/>)<br/># For debugging<br/># $processName = "firefox"<br/><br/># Definition of Win32 functions as a custom type.<br/>$signature = @"<br/>    using System;<br/>    using System.Runtime.InteropServices;<br/>    public class Win32 {<br/>        [DllImport("user32.dll", SetLastError = true)]<br/>        public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);<br/><br/>        [DllImport("user32.dll", SetLastError = true)]<br/>        public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);<br/><br/>        [DllImport("user32.dll")]<br/>        public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);<br/><br/>        [DllImport("user32.dll")]<br/>        public static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);<br/><br/>        public const int SW_MAXIMIZE = 3;<br/>        public const int SW_MINIMIZE = 6;<br/>        public const int SW_RESTORE = 9;<br/>        public const uint SWP_NOZORDER = 0x0004;<br/>        public const uint SWP_NOACTIVATE = 0x0010;<br/>        public const uint SWP_SHOWWINDOW = 0x0040;<br/><br/>        [StructLayout(LayoutKind.Sequential)]<br/>        public struct RECT {<br/>            public int Left;<br/>            public int Top;<br/>            public int Right;<br/>            public int Bottom;<br/>        }<br/><br/>        [StructLayout(LayoutKind.Sequential)]<br/>        public struct WINDOWPLACEMENT<br/>        {<br/>            public int length;<br/>            public int flags;<br/>            public int showCmd;<br/>            public POINT ptMinPosition;<br/>            public POINT ptMaxPosition;<br/>            public RECT rcNormalPosition;<br/>        }<br/><br/>        [StructLayout(LayoutKind.Sequential)]<br/>        public struct POINT {<br/>            public int x;<br/>            public int y;<br/>        }<br/>    }<br/>"@ <br/><br/># Load the Windows Forms assembly and the custom Win32 type.<br/>Add-Type -AssemblyName System.Windows.Forms<br/>Add-Type -TypeDefinition $signature<br/><br/>if (-not $processName ){<br/>    Write-Host "Missing process name to search for (e.g. firefox)"<br/>    return<br/>}<br/><br/># Query the system to check if more than one screen is present.<br/>$screens = [System.Windows.Forms.Screen]::AllScreens<br/><br/># Delay allows programs to start before performing window operations.<br/>Write-Host "Waiting 5 seconds to allow $processName to activate..."<br/>Start-Sleep -Seconds 5<br/><br/># Get all processes matching the provided $processName that have a window ($_.MainWindowHandle -ne 0).<br/>$windows = Get-Process -Name $processName | Where-Object { $_.MainWindowHandle -ne 0 }<br/>    <br/>foreach($window in $windows)<br/>{<br/>    # Get the window handle<br/>    $mainWindowHandle = $window.MainWindowHandle<br/><br/>    # Check if the window is already on the primary screen.<br/>    $screen = [System.Windows.Forms.Screen]::FromHandle($mainWindowHandle)<br/>    Write-Output "The window '$($window.ProcessName)' is on screen: $($screen.DeviceName)"<br/><br/>    if ($screens.Count -ne 1 -and $screen.DeviceName -eq "\\.\DISPLAY2")<br/>    {<br/>        # More than one screen is present and it's not on monitor 2, so repositioning is needed.<br/><br/>        # If maximized, restore first because taskbar differences between screens affect sizing.<br/>        $placement = New-Object Win32+WINDOWPLACEMENT<br/>        $placement.length = [System.Runtime.InteropServices.Marshal]::SizeOf($placement) <br/>        if ([Win32]::GetWindowPlacement($mainWindowHandle, [ref]$placement)) {<br/>            if ($placement.showCmd -eq [Win32]::SW_MAXIMIZE)<br/>            {<br/>                # Window is maximized, needs to be restored.<br/>                [Win32]::ShowWindow($mainWindowHandle, [Win32]::SW_RESTORE)<br/>            }<br/>        }<br/><br/>        # Get the current rectangle of the restored window to replicate size and position on the primary screen.<br/>        $rect = New-Object Win32+RECT<br/>        [Win32]::GetWindowRect($mainWindowHandle, [ref]$rect)<br/><br/>        # Calculate current width and height of the window.<br/>        $width = $rect.Right - $rect.Left<br/>        $height = $rect.Bottom - $rect.Top<br/><br/>        # Calculate window position on the left monitor, assuming secondary is mapped at x = -1920<br/>        $left = $rect.Left + 1920<br/>        $top = $rect.Top<br/><br/>        # Move the window to the primary monitor.<br/>        $windowPosFlags = [Win32]::SWP_NOZORDER -bor [Win32]::SWP_NOACTIVATE -bor [Win32]::SWP_SHOWWINDOW<br/>        [Win32]::SetWindowPos($mainWindowHandle, [IntPtr]::Zero, $left, $top, $width, $height, $windowPosFlags)<br/>    }<br/><br/>    # Maximize the window<br/>    [Win32]::ShowWindow($mainWindowHandle, [Win32]::SW_MAXIMIZE)<br/>        <br/>}<br/></code>]]></description>
<pubDate>Wed, 01 Oct 2025 11:51:56 GMT</pubDate>
</item>
<item>
<link>https://www.ugmfree.it/forum/messages.aspx?TopicID=950</link>
<title>Message from Space</title>
<description><![CDATA[Hi,<br/>Is there any way to start minimized Thunderbird?<br/>When using .paf platform, it does not leave]]></description>
<pubDate>Wed, 01 Oct 2025 10:35:19 GMT</pubDate>
</item>
</channel>
</rss>
