Determine if the application was launched through autorun.inf or doubleclick in Explorer?

I have a win32 api application located on a usb virtual cd. Is it possible to determine if it was launched by windows executing autorun.inf or by the user by double-clicking the cd icon in Explorer?

Thank...

+3
source share
3 answers

There is no direct way to detect that the application was launched from autorun.inf. the autorun file launches the application as if it were launched by the user.

autorun.inf, . argv GetCommandLine().

+2

, -, , autorun.inf?

[autorun] 
open=yourapp.exe /viainf
+1

Afaik, - Windows, .

, , , .

+1

Source: https://habr.com/ru/post/1774938/


All Articles