Set Windows 10 background slideshow script in Powershell

I have set with every installation of Windows 10 with my profile a slideshow to change picture from a folder every X minutes. However recently I noticed that this resets from time to time and goes to one picture / slideshow over only some of the pictures that Windows has decided to keep in it’s cloud cache.

Thinking it should be easy I looked around for solutions but found out it is not that trivial (doh it is after all Microsoft 🙂 ). Finally seem to have something workable in Powershell below which you can add to startup (%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup) e.g. by using a batch file that runs the poweshell script:

@rem save as a *.cmd file (add shortcut to it in startup)
@echo off
powershell .\set-slideshow.ps1
# to use this, need to create a good slideshow setup from a folder then copy the files from $dest to $source
$source = "$env:userprofile\somefolder"
$dest = "$env:appdata\Microsoft\Windows\Themes"
Add-Type @"
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32;
using System.Threading;
namespace Wallpaper {

   public class Setter {
      public const int SetDesktopWallpaper = 20;
      public const int UpdateIniFile = 0x01;
      public const int SendWinIniChange = 0x02;

      [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
      private static extern int SystemParametersInfo (int uAction, int uParam, string lpvPara, int fuWinIni);

      public static void SetWallpaper (string path) {
         SystemParametersInfo(SetDesktopWallpaper, 0, path, UpdateIniFile | SendWinIniChange);

      public static void SetSlideshow (string path) {
         RegistryKey keyz = Registry.CurrentUser.OpenSubKey("Control Panel\\Personalization\\Desktop Slideshow", true);
		 //enable shuffle
		 keyz.SetValue(@"LastTickHigh", 0);
 		 keyz.SetValue(@"LastTickLow", 0);
		 //set to 10 minutes shuffle slideshow
		 keyz.SetValue(@"Interval", 600000);
		 keyz.SetValue(@"Shuffle", 1);
         keyz = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true);
         //"Fit" style
         keyz.SetValue(@"WallpaperStyle", "10");
         keyz.SetValue(@"TileWallpaper", "0");
         SystemParametersInfo(SetDesktopWallpaper, 0, path, UpdateIniFile | SendWinIniChange);

Copy-item -Path "$source\*" -Destination $dest -Force
# don't know how and why but setting it to empty string makes shuffle working (nonexist.jpg attempt does not although it does set to a color background)
#Stop-process -name explorer

Funeral sound track preferences 2019 update

In 2014 I apparently wrote on what would be a nice sound track for my funeral ceremony. Well, with my German-like liking and tolerance for surprises, the best option is still the one I really noticed in Watchmen, Sound of Silence by the apparently otherwise incompatible Simon & Garfunkel

Though to add one more I heard in Legion and Westworld tv series 🙂

Or the coolest revelation in terms of lyrics (bit dramatic though for my taste)


Another slow solution

Saw this small problem on YouTube, as usual got to the solution but took time + it was not very straight forward like in the video scroll below for it 🙂














































big total square area = (2a)^2 = 4a^2
corner triangles hipotenuse Pythagorean theorem c^2 = a^2 + a^2 -> c=sqrt(2)a

one corner triangle area = big total square / 8 -> a^2 / 2

20 cm^2 = two triangles area = (a^2 / 2) + (x * sqrt(2)a) / 2
-> a^2 + x * sqrt(2)a – 40 = 0 (1)

blue area n
n = big square area minus 20 minus 32 minus 16
n = 4a^2 – 68
n also two triangles area = (a^2 / 2) + (((sqrt(2)a – x) * sqrt(2)a) / 2
2n = 8a^2 – 136 = a^2 + ((sqrt(2)a – x) * sqrt(2)a
7a^2 – 2a^2 + x * sqrt(2)a – 136 = 0
5a^2 + x * sqrt(2)a – 136 = 0 (2)

combining (1) and (2)
5a^2 + x * sqrt(2)a – 136 = a^2 + x * sqrt(2)a – 40

4a^2 = 96
n = 4a^2 – 68
n = 28



Ex-phones 2017 update

Phones I have had previously (3 more added meanwhile since 2014):

(could be that 1 to 3 phones are missing, but are considered to not important since don’t change the overall picture, ericsson -> siemens -> windows mobile -> android (HTC then Samsung) )


My first gaming rig

I saw Linus showing his first gaming rig
and heck he is young (or more likely I am old) 🙂
since the only source of information I could get the specs from, was internet museums 😀

special thanks to my dad who brought this puppy home, without that I would most likely not get into computers and IT at all
the system looked approximately like this, except there was no 3.5″ floppy drive and the monitor was as shown to the right



  • released 1987, retired 1990
  • 12 MHz Intel 80286 CPU
  • came standard with 640KB RAM (who would ever need more, right?)
  • 5.25 inch floppy, 20 MB hard disc, VGA card
  • no mouse

HP D1181A Monochrome Video Graphics Display (14″) (points below from original advertising)

  • plug-compatible with the industry-standard VGA
  • designed for use with the HP Video Graphics Adapter (D1180A)
  • choice of screen colors, including amber, green and soft-white
  • resolutions varying from 320 x 200 to 640 x 480 and can display up to 64 shades of gray
  • ideal for text, graphics and image applications

and hold on for the release price, it was apparently 3595 USD… beat that.
mighty MS DOS operating system, blue screens like Norton or Volkov commander, MS Basic
those were times…

  • one of the first things I did after getting it was to format the hard disk drive by accident
  •     (attempt to clean the disk for more space)
  • and on reboot infamous “no system disk or disk error” 🙂
  • weeks spent not knowing how to revive it, thanks goes to Gatis working in Fortek for giving me a boot floppy
  •     also for introducing me to Fidonet, Sound Blaster and archive of games out of my imagination
  • (he had a system to read/write from VHS tapes, which could store like 2GB of information)
  • (which was freaking incredible for those times)
  • months spent booting from a floppy not knowing how to make the HDD bootable and what autoexec.bat is for
  •     (thanks to this I learned a lot about DOS commands)
  • after, killed the 20MB drive once by dropping it from not very high.
  • again, months booting from a floppy
  • and revived it by dropping it again also accidentally
  • bringing home windows 3.1 (including the swap file :D) on some 40 5″ floppies (thank you Edgar)
  • since there was no installation available
  • unforgettable game titles like
  •     * prince of persia
  •     * diggers
  •     * paratrooper
  • * the incredible machine
  • fighting to free ram by memory managers to run the games 🙂

Android remove PIN lock

I managed to set a wrong PIN code for the android lock screen. Fortunately, it can be removed in some situations. Precondition – must have adb enabled in root mode, and android device manager active.
1. remove *.key from /data/system folder by adb shell
2. reboot, and now lock from android device manager, it will allow and actually set a temporary recovery password for you


Pension plan

If a bank or an insurance company asks me if I have any pension plans, the answer will be yes, outline of the plan below:
(original found here)


Imigranti Latvijā – parodija

Fascinē vairuma (vai skaļāko) latviešu attieksme pret bēgļu jautājumu.
Cik valstī ir nepilsoņu + Krievijas pakalpiņu un cik ilgi jau?
Turpat blakus Krievija kas ir gatava viņus izmantot un pat ne tikai provokācijām.
Bet nē tūlīt nāks mežonīgie pūļi (lai kā arī censtos mēs runājam pašreiz par <0.1% un nākotē <1%) ar islāmistiem - izvarotājiem un slepkavām, un cauri būs. Kauns skatīties kā salīdzina ar to kas notiek Vācijā un citur. Un ekstrēmie politiķi tik berzē rokas, gan Latvijā gan blakus brālīgajā Krievzemē. Brigmanis: Bēgļiem jāstāsta par aukstajām ziemām un zemajiem pabalstiem

tā vien gribas teikt
Dumiķīši paliek dumiķīši

General Latviešu

20071216 – Prāta Banka – Ģirts Niedra edition

Tālajā 2007 piedalījos spēlē, garlaicīga nebija. Lielais paldies Ilonai Gasonei citādi būtu pamatīgi izgāzies 🙂
20071216 – Prāta Banka – Ģirts Niedra edition


naš andris – PSRS lepnā atlieka

dāmas un kungi (necelieties nav vērts)
naša padomju nomenklatūras atrauga

var jau būt ka šo WIKI ierakstījis kāds nelabvēlis (+ punktiņš tad par šito),
bet ja nē teikums kas lieliski raksturo (ne)lietaskoku bērziņu

Andris Bērziņš was born 10 December 1944 in Nītaure, Latvian SSR, Soviet Union.

citi tomēr uzrakstītu ka dzimis Latvijā kuru okupēja USSR bet ko tur liegties nav vērts, kā māku tā maunu…
ļoti ceru ka šo veco izkūkojušo sakārni nomainīs kaut kas intelektuālāks un harizmātiskāks un ne PSRS atlieka, daži piemēri

  • VVF 2