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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -24,7 +24,7 @@
|
||||
"RelativeDocumentMoniker": "ma_uninstaller.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_uninstaller\\ma_uninstaller.cpp",
|
||||
"RelativeToolTip": "ma_uninstaller.cpp",
|
||||
"ViewState": "AQIAAI0AAAAAAAAAAAAAALYAAAAhAAAA",
|
||||
"ViewState": "AQIAAI0AAAAAAAAAAAAAALcAAAAUAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2023-12-23T09:04:19.505Z",
|
||||
"EditorCaption": ""
|
||||
|
||||
@@ -181,6 +181,7 @@ int main()
|
||||
else {
|
||||
printf("Stopping cyberhex");
|
||||
system("taskkill /F /IM cyberhex.exe");
|
||||
Sleep(1000);
|
||||
printf("Removing directorys\n");
|
||||
printf("Removing directory for application\n");
|
||||
error = remove_dir(L"C:\\Program Files\\Cyberhex");
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,12 @@ FROM php:apache
|
||||
RUN docker-php-ext-install mysqli
|
||||
RUN a2enmod ssl
|
||||
RUN service apache2 restart
|
||||
RUN mkdir /var/www/html/install/
|
||||
RUN mkdir /var/www/html/install/database_srv
|
||||
COPY ./cyberhex-code /var/www/html
|
||||
RUN mkdir -p /var/www/html/install/
|
||||
RUN mkdir -p /var/www/html/database_srv
|
||||
RUN mkdir -p /var/www/html/export
|
||||
RUN mkdir -p /var/www/html/import
|
||||
RUN chown -R www-data:www-data /var/www/html/export/
|
||||
RUN chown -R www-data:www-data /var/www/html/import/
|
||||
RUN chown -R www-data:www-data /var/www/html/install/
|
||||
RUN chown -R www-data:www-data /var/www/html/database_srv/
|
||||
RUN chown -R www-data:www-data /var/www/html/database_srv/
|
||||
Reference in New Issue
Block a user