72 'F',
'i',
'l',
'e',
'R',
'e',
'n',
'a',
'm',
'e',
73 'O',
'p',
'e',
'r',
'a',
't',
'i',
'o',
'n',
's',0};
74 static const WCHAR SessionW[] = {
'S',
'y',
's',
't',
'e',
'm',
'\\',
75 'C',
'u',
'r',
'r',
'e',
'n',
't',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'S',
'e',
't',
'\\',
76 'C',
'o',
'n',
't',
'r',
'o',
'l',
'\\',
77 'S',
'e',
's',
's',
'i',
'o',
'n',
' ',
'M',
'a',
'n',
'a',
'g',
'e',
'r',0};
91 printf(
"The key was not found - skipping\n");
96 printf(
"Couldn't open key, error %lu\n",
res);
109 printf(
"Value not present - nothing to rename\n");
116 printf(
"Couldn't query value's length (%lu)\n",
res);
132 printf(
"Couldn't query value after successfully querying before (%lu),\n"
133 "please report to wine-devel@winehq.org\n",
res);
145 printf(
"Improper value format - doesn't end with NULL\n");
155 printf(
"processing next command\n");
160 if (
src[0]==
'\\' &&
src[1]==
'?' &&
src[2]==
'?' &&
src[3]==
'\\')
169 if (
dst[0]==
'\\' &&
dst[1]==
'?' &&
dst[2]==
'?' &&
dst[3]==
'\\')
222 {
'R',
'u',
'n',
'O',
'n',
'c',
'e',0},
223 {
'R',
'u',
'n',
'S',
'e',
'r',
'v',
'i',
'c',
'e',
's',0},
224 {
'R',
'u',
'n',
'S',
'e',
'r',
'v',
'i',
'c',
'e',
's',
'O',
'n',
'c',
'e',0}
227#define INVALID_RUNCMD_RETURN -1
249 memset(&si, 0,
sizeof(si));
265 printf(
"Successfully ran command\n");
292 static const WCHAR WINKEY_NAME[]={
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
293 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
'W',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
294 'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
297 DWORD i, nMaxCmdLine=0, nMaxValue=0;
302 wprintf(
L"processing %s entries under HKLM\n", szKeyName);
304 wprintf(
L"processing %s entries under HKCU\n", szKeyName);
308 printf(
"RegOpenKey failed on Software\\Microsoft\\Windows\\CurrentVersion (%ld)\n",
319 printf(
"Key doesn't exist - nothing to be done\n");
324 printf(
"RegOpenKey failed on run key (%ld)\n",
res);
332 printf(
"Couldn't query key info (%ld)\n",
res);
339 printf(
"No commands to execute.\n");
347 printf(
"Couldn't allocate memory for the commands to be executed\n");
353 if ((szValue=
malloc((++nMaxValue)*
sizeof(*szValue)))==
NULL)
355 printf(
"Couldn't allocate memory for the value names\n");
364 DWORD nValLength=nMaxValue, nDataLength=nMaxCmdLine;
372 printf(
"Couldn't read in value %lu - %ld\n",
i,
res);
382 printf(
"Couldn't delete value - %lu, %ld. Running command anyways.\n",
i,
res);
387 printf(
"Incorrect type of value #%lu (%lu)\n",
i,
type);
397 printf(
"Done processing cmd #%lu\n",
i);
428#define DEFAULT SESSION_START
443 printf(
"Couldn't get the windows directory - error %ld\n",
515 printf(
"Operation done\n");
517 return res ? 0 : 101;
static void startup(void)
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
BOOL WINAPI MoveFileExW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName OPTIONAL, IN DWORD dwFlags)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
#define MOVEFILE_REPLACE_EXISTING
GLuint GLuint GLsizei GLenum type
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static int runCmd(LPWSTR cmdline, LPCWSTR dir, BOOL wait, BOOL minimized)
static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, BOOL bSynchronous)
const WCHAR runkeys_names[][30]
#define INVALID_RUNCMD_RETURN
EXTERN_C HRESULT WINAPI SHCreateSessionKey(REGSAM samDesired, PHKEY phKey)
static const struct op_mask SESSION_START
static const struct op_mask SETUP
static BOOL pendingRename()
#define ERROR_FILE_NOT_FOUND
#define FILE_ATTRIBUTE_DIRECTORY
#define REG_OPENED_EXISTING_KEY
#define REG_OPTION_VOLATILE
structure holding startup flags
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
#define GetWindowsDirectory
DWORD WINAPI GetLastError(void)
#define STARTF_USESHOWWINDOW
#define SetCurrentDirectory
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
int WINAPI GetSystemMetrics(_In_ int)