Created
March 28, 2021 02:15
-
-
Save khurata2/794e4aa0e96c0479a72e49777f96c2bd to your computer and use it in GitHub Desktop.
HTA Launcher for Windows 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MSHTA launcher */ | |
#include <windows.h> | |
#include <stdio.h> | |
int main( | |
int argc, | |
char * argv[] | |
) { | |
STARTUPINFO sinf; | |
PROCESS_INFORMATION pinf; | |
BOOL bResult; | |
char com_str[ 1000 ]; | |
if ( argc < 2 ) { | |
return 1; | |
} | |
sprintf( com_str, "C:\\Windows\\System32\\mshta.exe \"%s\"", argv[ 1 ] ); | |
GetStartupinf( &sinf ); | |
bResult = CreateProcess( 0, com_str, 0, 0, FALSE, 0, 0, 0, &sinf, &pinf ); | |
if ( !bResult ) { | |
return 1; | |
} | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment