This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OneDrive.exe as a Windows Service | |
================================= | |
Flemming Steffensen, 2017, 2021 | |
For our automatic build setup, we needed to fetch some files off a Sharepoint Library. | |
Sharepoint allows (if configured so) Lists and Libraries to be synchronized to a local folder by using the OneDrive application. | |
However, the OneDrive application is started when a user logs in, and in an automated build setup, this never happens. | |
The solusion were to disable the normal auto-start feature of OneDrive, and then install it as a service, and making sure the | |
service start as the computer starts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import servicemanager | |
import socket | |
import sys | |
import win32event | |
import win32service | |
import win32serviceutil | |
class TestService(win32serviceutil.ServiceFramework): | |
_svc_name_ = "TestService" #Service Name (exe) | |
_svc_display_name_ = "Test Service" #Service Name which will display in the Winfows Services Window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Dappa\AuthTests; | |
use Illuminate\Support\ServiceProvider; | |
/** | |
* Auth test service provider | |
*/ | |
class AuthTestsServiceProvider extends ServiceProvider |
OlderNewer