diff options
Diffstat (limited to 'remote/modules')
| -rwxr-xr-x | remote/modules/run-virt/compile | 5 | ||||
| -rwxr-xr-x | remote/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe | bin | 15360 -> 15360 bytes | |||
| -rw-r--r-- | remote/modules/run-virt/winres.c | 13 |
3 files changed, 13 insertions, 5 deletions
diff --git a/remote/modules/run-virt/compile b/remote/modules/run-virt/compile new file mode 100755 index 00000000..4db15686 --- /dev/null +++ b/remote/modules/run-virt/compile @@ -0,0 +1,5 @@ +#!/bin/sh + +rm -- winres.exe +i686-w64-mingw32-gcc -std=c99 -Os -Wl,--subsystem,windows -o winres.exe winres.c -lole32 -luuid -lgdi32 #-lws2_32 +strip winres.exe && echo "Successfully created winres.exe" diff --git a/remote/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe b/remote/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe Binary files differindex a1616798..114a0dc0 100755 --- a/remote/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe +++ b/remote/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe diff --git a/remote/modules/run-virt/winres.c b/remote/modules/run-virt/winres.c index a9037b61..c9065c03 100644 --- a/remote/modules/run-virt/winres.c +++ b/remote/modules/run-virt/winres.c @@ -51,15 +51,18 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine // Mute sound by default if (retVer && version.dwMajorVersion >= 6) muteSound(); + // Disable screen saver as it might give the false impression that the session is securely locked + SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0); + // Disable standby and idle-mode (this is a VM!) + if (version.dwMajorVersion >= 6) { // Vista+ + SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED | ES_AWAYMODE_REQUIRED); + } else { // XP/2003 + SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED); + } // Shutdown button label if (retVer && version.dwMajorVersion == 6 && version.dwMinorVersion == 1) { // Only on Windows 7 char buffer[100]; - ret = setShutdownText(); - if (ret != 0) { - snprintf(buffer, 100, "Returned %d", ret); - MessageBoxA(0, buffer, "Set caption", 0); - } // Repeatedly set caption UINT_PTR tRet = SetTimer(NULL, 0, 5000, (TIMERPROC)&resetShutdown); if (tRet == 0) { |
