GithubHelp home page GithubHelp logo

mythreyak / spotlight-images Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 36 KB

A simple Windows Service to save new Spotlight images from Microsoft

License: GNU General Public License v3.0

C# 100.00%
windows-spotlight-wallpapers windows-spotlight windows-service

spotlight-images's Introduction

Spotlight-Images

A simple Windows Service to save new Spotlight images from Microsoft.

Requirements

  • Windows 10 1809 (Might work on older versions)
  • The latest Visual Studio with the .NET Desktop Development workload installed.

Install

  1. Modify the output directory location (in the SpotlightImages.cs file), else the service will fail to start.
  2. Build the project with Ctrl + Shift + B or use the Build menu
  3. From the Start menu, select the Visual Studio directory, then select Developer Command Prompt for VS <version>.
  4. Use the installutil tool to install the service
  5. The binary is located in bin/Release directory
  6. Run InstallUtil /u "Spotlight Images" from the command prompt with the project's executable as a parameter:
C:\...\Community> where installutil
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe

We modify the above path to use the 64-bit version of the installutil (Framework -> Framework64)

C:\...\Community> cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
C:\...\v4.0.30319> installutil "full/path/to/project/bin/Release/Spotlight Images.exe"

After install, the service runs in the background and auto-starts on system start-up Automatic (Delayed Start), to prevent resource usage at logon).

Uninstall

Still using the 64-bit installutil, do

C:\...\v4.0.30319> installutil \u "full/path/to/project/bin/Release/Spotlight Images.exe"

Follow instructions in the above link to remove this and only this service. More details on service installation/uninstallation can be found here.

Additional Info

This process runs under the LocalSystem privileged user which (as of now) seems to be the only way give the service the right permissions to access the directory where the images are stored.

TODO:
  • Add an installer to allow easy install/uninstall
  • Allow user to specify save directory during install
  • Find a way to run the service as a less privileged user

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Copyright © 2019 Mythreya K

spotlight-images's People

Contributors

mythreyak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.