Categories
Uncategorized

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.Close();
		 
         keyz = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true);
         //"Fit" style
         keyz.SetValue(@"WallpaperStyle", "10");
         keyz.SetValue(@"TileWallpaper", "0");
		 keyz.Close();
         SystemParametersInfo(SetDesktopWallpaper, 0, path, UpdateIniFile | SendWinIniChange);
		 //Thread.Sleep(20000);
      }
	  
   }
}
"@

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)
#[Wallpaper.Setter]::SetWallpaper("c:\nonexist.jpg")
[Wallpaper.Setter]::SetWallpaper("")
[Wallpaper.Setter]::SetSlideshow("$dest\TranscodedWallpaper")
#Stop-process -name explorer
Categories
Uncategorized

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)

Categories
Uncategorized

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

hp-d1326ahp-d1181a

D1326A HEWLETT-PACKARD-VECTRA

  • 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 🙂
Categories
Uncategorized

Should I follow the white rabbit?

Rabbit2

IMG_20140413_194740

Categories
Uncategorized

Referendums par/pret Zatleru

Pret – no manas puses.
Zatlera rīkojums/runa nr. 2 mani nepārliecināja. Nepārliecināja ka viņam ir plāns kā rīkoties tālāk, ar vai bez Saeimas atlaišanas.
Ir jāsaprot, ka Saeima ir tautas spogulis – un lai mainītos attieksme tur, ir jāmainās mums pašiem.
Kalvīši, Zatleri, Eināri – ir papilnam mums apkārt. Ja nenāks labāki, tas ir bejēdzīgi.
Varam vēlēt cik Saeimas gribam.
Jānāk kādiem kam

  • ir plāns ko darīt
  • grib darīt
  • dara

LV labā

Categories
Uncategorized

Outdoor Games

Nice event – film festival for extreme sports enthusiasts.

Categories
Uncategorized

South-park character

Categories
Uncategorized

Google Reader fullscreen mode

I wrote a rant some time ago of Google Search not using the potential of flat screens. Well this is one step in the right direction 😉 – just add it to search
http://googlereader.blogspot.com/2010/08/fullscreen-and-more.html

Categories
Uncategorized

Melancholic Waltz by Emils Darzins

It is sad to see that in a Google search for “Melancholy Waltz” only one result relates to Emils Darzins and his beautiful waltz – even less for the better matching translation “Melancholic Waltz”

Although Darzins was accused of plagiarism by Jean Sibelius – I would like to hear the work from Sibelius that supports the accusations. Sadly, the information on the internet is poor on this as well.

Categories
Uncategorized

Ryanair electronic equipment policies

Frak you Ryanair.
Going to Riga and back this weekend, I was twice denied to use my HTC Hero in airplane mode to play Sudoku (the flight attendant was aware that it’s in flight mode, he just referred to a policy).

  • if there are working phones not in flight mode in your pockets – no problem
  • if you use a laptop with WIFI activated and/or built in GSM module – no problem
  • if you consume as many alcohol as possible because of the boring flight (that was not me, FYI, but just because had to drive a car afterwards) – no problem

other complaints (this included) nicely compiled, totally agree to all
http://puckstownlane.wordpress.com/2010/03/04/i-want-to-be-proud-of-ryanair-but-they-make-it-impossible/