+static VOID
+ExecuteAutoRunFile (VOID)
+{
+ TCHAR autorun[MAX_PATH];
+ DWORD len = MAX_PATH;
+ HKEY hkey;
+
+ if( RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+ _T("SOFTWARE\\Microsoft\\Command Processor"),
+ 0,
+ KEY_READ,
+ &hkey ) == ERROR_SUCCESS)
+ {
+ if(RegQueryValueEx(hkey,
+ _T("AutoRun"),
+ 0,
+ 0,
+ (LPBYTE)autorun,
+ &len) == ERROR_SUCCESS)
+ {
+ ParseCommandLine (autorun);
+ }
+ }
+
+ RegCloseKey(hkey);
+}
+