Loading Src/Main.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #define CMD_DESC_USB "xboxunattend.exe -usb" #define CMD_DESC_SCRIPT "xboxunattend.exe -script D:\\DevelopmentFiles\\MyScript.cmd" constexpr wchar_t g_szDefaultBootPath[] = L"D:\\boot"; constexpr wchar_t g_szDefaultLogPath[] = L"D:\\boot\\result.txt"; int main(int argc, const char* argv[]) Loading Loading @@ -103,6 +104,19 @@ int main(int argc, const char* argv[]) return hResult; } // // Create boot directory if we need to // DWORD dwAttributes = GetFileAttributesW(g_szDefaultBootPath); if (dwAttributes == INVALID_FILE_ATTRIBUTES) { BOOL bRes = CreateDirectoryW(g_szDefaultBootPath, NULL); if (bRes != TRUE) { wprintf(L"Failed to create directory: %s\nLast result: %d\n", g_szDefaultBootPath, GetLastError()); return 1; } printf("Created boot directory.\n"); } HSTRING_HEADER hStrHdr2; hResult = WindowsCreateStringReference(szScriptFilePath, nScriptFilePathLength, &hStrHdr2, &hStrScriptPath); if (hResult != S_OK) { Loading Loading
Src/Main.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #define CMD_DESC_USB "xboxunattend.exe -usb" #define CMD_DESC_SCRIPT "xboxunattend.exe -script D:\\DevelopmentFiles\\MyScript.cmd" constexpr wchar_t g_szDefaultBootPath[] = L"D:\\boot"; constexpr wchar_t g_szDefaultLogPath[] = L"D:\\boot\\result.txt"; int main(int argc, const char* argv[]) Loading Loading @@ -103,6 +104,19 @@ int main(int argc, const char* argv[]) return hResult; } // // Create boot directory if we need to // DWORD dwAttributes = GetFileAttributesW(g_szDefaultBootPath); if (dwAttributes == INVALID_FILE_ATTRIBUTES) { BOOL bRes = CreateDirectoryW(g_szDefaultBootPath, NULL); if (bRes != TRUE) { wprintf(L"Failed to create directory: %s\nLast result: %d\n", g_szDefaultBootPath, GetLastError()); return 1; } printf("Created boot directory.\n"); } HSTRING_HEADER hStrHdr2; hResult = WindowsCreateStringReference(szScriptFilePath, nScriptFilePathLength, &hStrHdr2, &hStrScriptPath); if (hResult != S_OK) { Loading