VirtualBox

Ticket #13243 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Propagate startupinfo to the child process (>= 4.3.14, Windows)

Reported by: mskov Owned by:
Priority: minor Component: other
Version: VirtualBox 4.3.14 Keywords:
Cc: Guest type: other
Host type: Windows

Description

With the hardening changes introduced with 4.3.14 it is not possible anymore to start a VM with the "hidden" window by executing virtualbox.exe --startvm with the SW_HIDE flag set in the STARTUPINFO data structure. It would be nice if this flag (and possibly other information) could be propagated to the child process created in "SUPR3HardenedMain-win.cpp". E.g., a fix like that:

@@ -1288,6 +1288,14 @@

SiEx.StartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); SiEx.StartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);

+ STARTUPINFOA si; + GetStartupInfoA(&si); + if (si.wShowWindow == SW_HIDE && (si.dwFlags & STARTF_USESHOWWINDOW)) + { + SiEx.StartupInfo.wShowWindow = SW_HIDE; + SiEx.StartupInfo.dwFlags = STARTF_USESHOWWINDOW; + } +

/*

  • Set up security descriptors. */

This feature is nice, because it allows to hide the VM startup process from the user and only show the window when the VM is running. Alternatively, one could implement an option "start_minimized" or "start_hidden" controlled by vboxmanage.

Change History

comment:1 Changed 3 years ago by mskov

Sorry for the bad formatting.

     SiEx.StartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
     SiEx.StartupInfo.hStdError  = GetStdHandle(STD_ERROR_HANDLE);
 
+    STARTUPINFOA si;
+    GetStartupInfoA(&si);
+    if (si.wShowWindow == SW_HIDE && (si.dwFlags & STARTF_USESHOWWINDOW))
+    {
+      SiEx.StartupInfo.wShowWindow = SW_HIDE;
+      SiEx.StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
+    }
+
     /*
      * Set up security descriptors.
      */

comment:2 Changed 3 years ago by bird

  • Status changed from new to closed
  • Resolution set to fixed

Thanks for the report. I've addressed the issue, unfortunately it didn't make it in time for 4.3.16. So, I'm afraid you will have to wait for 4.3.18.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use