updating some server scripts
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -64,7 +64,8 @@
|
||||
"RelativeToolTip": "download.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAABIAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2023-12-22T19:47:23.597Z"
|
||||
"WhenOpened": "2023-12-22T19:47:23.597Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -74,7 +75,7 @@
|
||||
"RelativeDocumentMoniker": "ma_installer.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\ma_installer.cpp",
|
||||
"RelativeToolTip": "ma_installer.cpp",
|
||||
"ViewState": "AQIAACwAAAAAAAAAAAAuwDwAAAAyAAAA",
|
||||
"ViewState": "AQIAAAoDAAAAAAAAAAAAACcDAAAnAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2023-12-22T18:52:51.74Z",
|
||||
"EditorCaption": ""
|
||||
|
||||
Binary file not shown.
@@ -31,7 +31,7 @@ Tasks to do:
|
||||
|
||||
using namespace std;
|
||||
|
||||
int CreateTask()
|
||||
int create_task()
|
||||
{
|
||||
HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
if (FAILED(hr))
|
||||
@@ -141,6 +141,18 @@ int CreateTask()
|
||||
return 1;
|
||||
}
|
||||
|
||||
hr = pSettings->put_ExecutionTimeLimit(_bstr_t(L"PT0S")); // Set execution time limit to zero seconds
|
||||
pSettings->Release();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot set execution time limit: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pService->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
hr = pSettings->put_DisallowStartIfOnBatteries(VARIANT_FALSE); // Set to allow start on batteries
|
||||
pSettings->Release();
|
||||
if (FAILED(hr))
|
||||
@@ -255,7 +267,6 @@ int CreateTask()
|
||||
|
||||
|
||||
|
||||
|
||||
//check if programm is run as admin
|
||||
bool is_admin() {
|
||||
BOOL fIsRunAsAdmin = FALSE;
|
||||
@@ -780,18 +791,22 @@ int main()
|
||||
}
|
||||
|
||||
|
||||
HRESULT hr = CreateTask();
|
||||
HRESULT hr = create_task();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
std::cerr << "Task creation failed!" << std::endl;
|
||||
error=5;
|
||||
}
|
||||
|
||||
}
|
||||
switch (error) {
|
||||
case 0:
|
||||
printf("Installation successful\n");
|
||||
printf("You have installed Cyberhex, thank you!\n");
|
||||
MessageBox(NULL, L"Installation successful", L"Success", MB_OK);
|
||||
printf("The machine needs to be rebooted to finish the installation\n");
|
||||
if (MessageBox(NULL, L"Installation successful. The machine needs to reboot for the installation to finish. Reboot now?", L"Success",MB_YESNO )==IDYES) {
|
||||
system("shutdown /r /t 0");
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
printf("Failed to create access control list\n");
|
||||
@@ -833,6 +848,10 @@ int main()
|
||||
printf("Failed to download database file\n");
|
||||
MessageBox(NULL, L"Failed to download database file", L"Error", MB_OK);
|
||||
break;
|
||||
case 11:
|
||||
printf("failed to start cyberhex\n");
|
||||
MessageBox(NULL, L"failed to start cyberhex", L"Error", MB_OK);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
ma_installer.cpp
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\ma_installer.cpp(693,15): warning C4101: "fp": Unreferenzierte lokale Variable
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\ma_installer.cpp(704,15): warning C4101: "fp": Unreferenzierte lokale Variable
|
||||
ma_installer.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\x64\Debug\ma_installer.exe
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user