Loading Src/Main.cpp +13 −13 Original line number Diff line number Diff line Loading @@ -70,6 +70,19 @@ int main(int argc, const char* argv[]) nScriptFilePathLength = static_cast<UINT32>(wcslen(szScriptFilePath)); } // // 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"); } if (bUseUSB) { boolean bUsbScriptExists = false; Loading Loading @@ -104,19 +117,6 @@ 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 +13 −13 Original line number Diff line number Diff line Loading @@ -70,6 +70,19 @@ int main(int argc, const char* argv[]) nScriptFilePathLength = static_cast<UINT32>(wcslen(szScriptFilePath)); } // // 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"); } if (bUseUSB) { boolean bUsbScriptExists = false; Loading Loading @@ -104,19 +117,6 @@ 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