Where are Photo Screensaver settings saved?
Hi,

I need to programatically change settings for the Photo Screensaver. The registry keys used in Windows Vista no longer apply in Windows 7. I tried using a folder with an uncommon folder name to point the Photo Screensaver to so that it would be easier to find in the registry. When I do a registry search, the folder name cannot be found. Maybe this is kept in a settings file somewhere instead of the registry?

We use a custom photo deck for our screensaver and it hasn't worked well to put it in the Pictures folder. You'll end up displaying personal photos along with the custom photos. I have been making a folder in Program Files and pointing the screensaver there.

The settings I would like to be able to change are:
Use pictures from: (you browse to the folder that contains your photos)
Slide show speed: (change the transition speed of the photos)
Shuffle pictures: (I would like to be able to check this box so the photos display randomly)

If anyone knows where to find these settings, it would be greatly appreciated if you could share the location of these settings.

Thanks,

Rob
February 8th, 2010 11:22pm

Here:
HKEY_CURRENT_USER\Software\Microsoft\Windows Photo Viewer\Slideshow\Screensaver

In three different values namely EncryptedPIDL, Speed & Shuffle.

The folder path is stored in an encrypted form such as below:

FAAfUOBP0CDqOmkQotgIACswMJ0ZAC9EOlwAAAAAAAAAAAAAAAAAAAAAAAAAUAAx
AAAAAABIPOZmEABCYWNrdXAAADoACAAEAO++OzzobEg85mYqAAAAliIAAAAABAAA
AAAAAAAAAAAAAAAAAEIAYQBjAGsAdQBwAAAAFgBGADEAAAAAAEc8R1EQAEltZwA0
AAgABADvvjs8YzVHPEdRKgAAAKQiAAAAAAIAAAAAAAAAAAAAAAAAAABJAG0AZwAA
ABIAAAA=
Free Windows Admin Tool Kit Click here and download it now
February 9th, 2010 5:37am


Also note that there are a few other settings located as follows. These are the same as Vista:

HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE.EXE
HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive
HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaverIsSecure
HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveTimeout

I also noticed that HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE.EXE does not get overwritten when this value is preset in the default user registry hive. When logging in as a user for the first time, this single value is not being set for some reason but every other setting is applied. I have to manually select Photos as my screensaver even though it is set correctly in the default user registry hive. After doing that, the Photos screensaver is already pointed to the path of my custom folder containing our photos thanks to Ramesh.

Vista worked just fine using this same method. Not sure why Microsoft needed to change this operability. It was fine the way it was. Now it looks like the user profile screensaver is forced to None by default.

Is there another way to set the user's screensaver to any type of your choosing without having to do it manually?
  • Edited by robwm1 Tuesday, February 09, 2010 5:46 PM added additional info
February 9th, 2010 5:31pm

Hi robwm1,

Perhaps you can create a BAT file or script that'll write the SCRNSAVE.EXE upon first user logon (RunOnce).
Free Windows Admin Tool Kit Click here and download it now
February 10th, 2010 3:36am

Hi,
We have a similar need, but in our case, we will need to update the registry keys via our C# program (running in "kiosk mode" on the PC). My question concerns the EncryptedPIDL value: if we attempt to set it via C#, will it "automagically" get encrypted (can't imagine that it would). If not, what is the proper way to encrypt the folder path before storing it? What is the screensaver expecting to see in that value?

Thanks,
Ron
March 10th, 2010 4:37pm


  ronclarkwa,

  I would recommend setting that value using Windows 7 and then export the registry key. From there you should be able to use a command from C# that can run REG IMPORT as a DOS command to import your custom key. I don't know much about C# but I know I can run REG IMPORT using vbscript. I would expect there is a way to do it through C# as well.

  Hope that helps.

  Rob
Free Windows Admin Tool Kit Click here and download it now
March 10th, 2010 10:31pm

I've tried this many different ways using Reg Add exporting it from Regedit and no matter what I try the path never gets set.  Even with the same path on two different machines the value is different.  Is there any API I can call to set this properly. The value for EncryptedPIDL is different between the two machine and importing this between the machines doesn't change the path at all.

 

Machine 1

[HKEY_CURRENT_USER\Software\Microsoft\Windows Photo Viewer\Slideshow\Screensaver]
"Speed"=dword:00000001
"Shuffle"=dword:00000001
"EncryptedPIDL"="FAAfUOBP0CDqOmkQotgIACswMJ0ZAC9DOlwAAAAAAAAAAAAAAAAAAAAAAAAAUgAx

AAAAAADdPGCXEABXaW5kb3dzADwACAAEAO++7jqFGt08YJcqAAAAWAcAAAAAAQAA

AAAAAAAAAAAAAAAAAFcAaQBuAGQAbwB3AHMAAAAWAFwAMQAAAAAA3TxclxAAU1RE

UElDfjEAAEQACAAEAO++3Txcl908XJcqAAAA80MAAAAACgAAAAAAAAAAAAAAAAAA

AFMAdABkAFAAaQBjAHQAdQByAGUAcwAAABgAAAA=

"

Machine 2

[HKEY_CURRENT_USER\Software\Microsoft\Windows Photo Viewer\Slideshow\Screensaver]
"Speed"=dword:00000001
"Shuffle"=dword:00000001
"EncryptedPIDL"="FAAfUOBP0CDqOmkQotgIACswMJ0ZAC9DOlwAAAAAAAAAAAAAAAAAAAAAAAAAUgAx

AAAAAADdPCCYEABXaW5kb3dzADwACAAEAO++7jqFGt08IJgqAAAAbAIAAAAAAQAA

AAAAAAAAAAAAAAAAAFcAaQBuAGQAbwB3AHMAAAAWAFwAMQAAAAAA3TwbmBAAU1RE

UElDfjEAAEQACAAEAO++3TwbmN08G5gqAAAAWjICAAAACgAAAAAAAAAAAAAAAAAA

AFMAdABkAFAAaQBjAHQAdQByAGUAcwAAABgAAAA=

"

June 29th, 2010 7:04pm

I, too have been looking for how to generate an EncryptedPIDL to import (since it's unique per workstation). So, any help would be appreciated.

It would be nice to be able to set this via GPO as well...

Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2010 6:20pm

I would like to personally thank Microsoft fo making this so difficult.  It seems they want to drive everyone to Apple.

 

Between encrypting path names in the registry and the fiasco that IS the Office 2007/2010 deployment, I think Linux is looking like the place to be.

July 28th, 2010 10:49pm

I, too have been looking for how to generate an EncryptedPIDL to import (since it's unique per workstation). So, any help would be appreciated.

It would be nice to be able to set this via GPO as well...


Hi, folks:

That string is encoded in Base64, without headers. There is a Windows API that encrypt binary arrays (the PIDL) to Base64, CryptBinaryToString. The dwFlags parameter should be set to CRYPT_STRING_BASE64.

Our problem is the inverse, given a Base64 string (the encoded PIDL), get the decoded PIDL. There's an API for that, too!, CryptStringToBinary. The dwFlags parameter should also be set to CRYPT_STRING_BASE64.

I think it is not hard to write a small program that uses those API's (and some more to get a "readable" path from the PIDL); ask in the MSDN forums to get directions if you get stuck.

Hope this

Free Windows Admin Tool Kit Click here and download it now
July 29th, 2010 5:54pm

I like the trasitional effects and none of the screensaver programs in Vista or Windows 7 worked like the program on XP.  And options suck in all the Vista and Windows 7 built in screensaver programs.  I looked for two years and tried webshots, but it seem to stick on the same group of pictures over and over again, plus I think there might be "spy ware"  ???? 

I found Endless Slideshow Screensaver and it is a free desktop screensaver for Windows.  I downloaded the program, I scaned it for virus and spyware and it was clear.  It works nice.  I'm happy and I love seeing all my pictures like in the XP days!!  I hope you will enjoy it too.

 

http://www.exisoftware.com/slideshow-screensaver/
December 5th, 2010 8:06pm

Well seeing as the Vista exe is the same name and uses a clear text registry key, why not just overwrite the Win7 exe with the vista exe and use the clear text reg key?

Windows Vista
  • If the SCRNSAVE.EXE registry value is "C:\Windows\system32\PhotoScreensaver.scr," locate the FolderPath registry value in the following path: HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Photo Gallery\Slideshow\Screensaver
Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2011 8:18am

Apparantly, the bright people at MS hardcoded the registry key named “encryptedpidl”  - that points to the location of the pictures - with the user name used when creating a user profile (as opposed to a variable that takes the current user name when applying a mandatory profile).  As a result, when using mandatory user profiles from the server, the user will get an error message relating to the fact that the screen saver is looking for pictures in the picture folder of a non-existant user folder.  This had worked just fine in Windows XP.  (And don’t even get me started on other user profile things that we system admins rely on but MS broke in Win7…)

 

And just for fun, they also encoded the registry key, because, as we know, the location of the screen saver picture files is classified information and nobody should be messing with it.

 

Anyway, through some freak stroke of luck, I managed to resolve this issue in an acceptable way.  Through various experimentation, I managed to get the registry key “encryptedpidl” to contain the encrypted value of

%USERNAME%\DOCUMENTS\PICTURES1.  So although I had read in this thread that the value of this registry key is different from computer to computer, somehow when this value is part of the registry when creating the user profile then it will work correctly for each user who gets that mandatory profile, as it did in WinXP.

 

I had made this additonal folder called Pictures1 and placed the screen saver pictures I wanted there.  Ideally it should point to the Pictures folder and not Pictures1, but once I got it working with Pictures1 I decided to quit while I was ahead.  Besides, since I am using mandatory profiles on student computers, I am not concerned with students saving their own pictures there from session to session.

 

Here is the registry entry:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows Photo Viewer\Slideshow\Screensaver]

EncryptedPIDL"="FAAfREcaA1lyP6dEicVVlf5rMO4gAAAAGgDuu/4jAAAQANCa0/2PI69GrbRshUgD

accAAFgAMQAAAAAAXD1WhhAAUElDVFVSfjEAAEAACAAEAO++XD1Qhlw9VoYqAAAA

y4kBAAAAIAAAAAAAAAAAAAAAAAAAAFAAaQBjAHQAdQByAGUAcwAxAAAAGAAAAA==

"

 

Note that for some strange reason, I cannot just click and import this .reg file.  I needed to edit the EncryptedPIDL value in Regedit, and copy and paste the data into it one line at a time.

Hope this helps somebody.

 

-Michael

 

 

March 9th, 2011 11:57am

Has anyone found a better answer for this?  I'm using Windows 7 x64 and the paths mentioned don't even exist in the locations mentioned so I've tried creating them through GPO/Registry and using a network path that was encrypted on a system it's working on.  I would really like to make this a system policy too if possible, but I doubt that.

Thank you,
Dennis

Free Windows Admin Tool Kit Click here and download it now
May 24th, 2012 12:43pm

Ok got the screensaver working... I had to capture the EncryptedPIDL from a user account under the SID export that and then create the path above using GPO/Registry.  Now when I log in on any system it is set for my user account and anyone that falls under my GPO that is linked to the user account OU.  Now to tackle the Theme since it works with new users but I need to push it to current users as wel..

May 24th, 2012 5:31pm

Here is the registry entry:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows Photo Viewer\Slideshow\Screensaver]
EncryptedPIDL"="FAAfREcaA1lyP6dEicVVlf5rMO4gAAAAGgDuu/4jAAAQANCa0/2PI69GrbRshUgD
accAAFgAMQAAAAAAXD1WhhAAUElDVFVSfjEAAEAACAAEAO++XD1Qhlw9VoYqAAAA
y4kBAAAAIAAAAAAAAAAAAAAAAAAAAFAAaQBjAHQAdQByAGUAcwAxAAAAGAAAAA

This entry will export and import into the registry. When the key is exported, the EncryptedPIDL is fragmented - that is why it will not seem to import. Open the exported registry file in notepad and disable word wrap. Combine all the EncryptedPIDL lines so it is one huge run-on line of code. Save the .reg file and import!

Tested and works! You can now set network locations for slideshow screensavers, export the registry settings and use gpo, startup scripts, config manager etc... to set the registry keys on multiple Win 7 client machines in your corporate environment.



Free Windows Admin Tool Kit Click here and download it now
June 12th, 2012 3:32pm

you can use this code 

cls


#That string is encoded in Base64, without headers. There is a Windows API that encrypt binary arrays (the PIDL) to Base64, CryptBinaryToString. The dwFlags parameter should be set to CRYPT_STRING_BASE64.
#Our problem is the inverse, given a Base64 string (the encoded PIDL), get the decoded PIDL. There's an API for that, too!, CryptStringToBinary. The dwFlags parameter should also be set to CRYPT_STRING_BASE64.
#I think it is not hard to write a small program that uses those API's (and some more to get a "readable" path from the PIDL); ask in the MSDN forums to get directions if you get stuck.

#http://www.ms-windows.info/Help/windows-photo-screensaver-settings-19334.aspx

#http://msdn.microsoft.com/en-us/library/aa379887(v=vs.85).aspx
#BOOL WINAPI CryptBinaryToString(
#  _In_       const BYTE *pbBinary,
#  _In_       DWORD cbBinary,
#  _In_       DWORD dwFlags,
#  _Out_opt_  LPTSTR pszString,
#  _Inout_    DWORD *pcchString
#);
#http://msdn.microsoft.com/en-us/library/aa380285(v=vs.85).aspx
#BOOL WINAPI CryptStringToBinary(
#  _In_     LPCTSTR pszString,
#  _In_     DWORD cchString,
#  _In_     DWORD dwFlags,
#  _In_     BYTE *pbBinary,
#  _Inout_  DWORD *pcbBinary,
#  _Out_    DWORD *pdwSkip,
#  _Out_    DWORD *pdwFlags
#);






add-type  @"

using System;
using System.Text;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;

public static class PIDLUtils
{
        // funciones
        [DllImport("shell32.dll")]
        public static extern Int32 SHGetDesktopFolder(out IShellFolder ppshf);

        [DllImport("shell32.dll")]
        public static extern bool SHGetPathFromIDList(IntPtr pidl, StringBuilder pszPath);

        [DllImport("crypt32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        private static extern bool CryptBinaryToString(IntPtr pcbBinary, int cbBinary, uint dwFlags, StringBuilder pszString, ref int pcchString);

        [DllImport("crypt32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        private static extern bool CryptStringToBinary(string pszString, int cchString, uint dwFlags, IntPtr pbBinary, ref int pcbBinary, ref int pdwSkip, ref int pdwFlags);

        // interfaces
        [ComImport]
        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        [Guid("000214E6-0000-0000-C000-000000000046")]
        public interface IShellFolder
        {
            Int32 ParseDisplayName(IntPtr hwnd, IntPtr pbc, String pszDisplayName, UInt32 pchEaten, out IntPtr ppidl, UInt32 pdwAttributes);
            Int32 EnumObjects(IntPtr hwnd, ESHCONTF grfFlags, out IntPtr ppenumIDList);
            Int32 BindToObject(IntPtr pidl, IntPtr pbc, [In]ref Guid riid, out IntPtr ppv);
            Int32 BindToStorage(IntPtr pidl, IntPtr pbc, [In]ref Guid riid, out IntPtr ppv);
            Int32 CompareIDs(Int32 lParam, IntPtr pidl1, IntPtr pidl2);
            Int32 CreateViewObject(IntPtr hwndOwner, [In] ref Guid riid, out IntPtr ppv);
            Int32 GetAttributesOf(UInt32 cidl, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)]IntPtr[] apidl, ref ESFGAO rgfInOut);
            Int32 GetUIObjectOf(IntPtr hwndOwner, UInt32 cidl, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)]IntPtr[] apidl, [In] ref Guid riid, UInt32 rgfReserved, out IntPtr ppv);
            Int32 GetDisplayNameOf(IntPtr pidl, ESHGDN uFlags, out ESTRRET pName);
            Int32 SetNameOf(IntPtr hwnd, IntPtr pidl, String pszName, ESHCONTF uFlags, out IntPtr ppidlOut);
        }

        // enumeraciones
        public enum ESHCONTF
        {
            SHCONTF_FOLDERS = 0x0020,
            SHCONTF_NONFOLDERS = 0x0040,
            SHCONTF_INCLUDEHIDDEN = 0x0080,
            SHCONTF_INIT_ON_FIRST_NEXT = 0x0100,
            SHCONTF_NETPRINTERSRCH = 0x0200,
            SHCONTF_SHAREABLE = 0x0400,
            SHCONTF_STORAGE = 0x0800
        }

        public enum ESFGAO : uint
        {
            SFGAO_CANCOPY = 0x00000001,
            SFGAO_CANMOVE = 0x00000002,
            SFGAO_CANLINK = 0x00000004,
            SFGAO_LINK = 0x00010000,
            SFGAO_SHARE = 0x00020000,
            SFGAO_READONLY = 0x00040000,
            SFGAO_HIDDEN = 0x00080000,
            SFGAO_FOLDER = 0x20000000,
            SFGAO_FILESYSTEM = 0x40000000,
            SFGAO_HASSUBFOLDER = 0x80000000,
        }

        public enum ESHGDN
        {
            SHGDN_NORMAL = 0x0000,
            SHGDN_INFOLDER = 0x0001,
            SHGDN_FOREDITING = 0x1000,
            SHGDN_FORADDRESSBAR = 0x4000,
            SHGDN_FORPARSING = 0x8000,
        }

        public enum ESTRRET : int
        {
            eeRRET_WSTR = 0x0000,
            STRRET_OFFSET = 0x0001,
            STRRET_CSTR = 0x0002
        }

        // constantes
        private const uint CRYPT_STRING_BASE64 = 1;
		
//*****************************************************************************************************************************
//*****************************************************************************************************************************

        // mis funciones

        public static string Encode(string myClearPath)
        {
            IShellFolder folder;
            IntPtr pidl;
            string Pathcodificado;
            Pathcodificado = "ERROR";
            string myPathTextoPlano = myClearPath;
            //string myPathTextoPlano = @"c:\flashtool"; // Regex.Escape(myClearPath);
            

            // este es el folder del escritorio (raz del espacio de nombres del shell)
            if (SHGetDesktopFolder(out folder) == 0)
            {
                // pidl del archivo
                //folder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, @"C:\walter\yo.png", 0, out pidl, 0);
                folder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, myPathTextoPlano, 0, out pidl, 0);

                // parseo el pidl para obtener sus tamao
                int k = 0;
                short cb = 0;
				
			  // ONLY WORKS WITH .NET FRAMEWORK 4	
              //  while ((k = Marshal.ReadInt16(pidl + cb)) > 0)
			  //		
              //  {
              //      cb += (short)k;
              //  }
			  
				IntPtr tempIntPtr = new IntPtr(pidl.ToInt64() + cb);
                while ((k = Marshal.ReadInt16(tempIntPtr)) > 0)
                {
                    cb += (short)k;
                    tempIntPtr = new IntPtr(pidl.ToInt64() + cb);
                }

                cb += 2;

                // encripto el pidl
                StringBuilder sb = new StringBuilder();
                int largo = 0;

                CryptBinaryToString(pidl, cb, CRYPT_STRING_BASE64, null, ref largo);
                sb.Capacity = largo;
                
                if (CryptBinaryToString(pidl, cb, CRYPT_STRING_BASE64, sb, ref largo))
                {
                    //Console.WriteLine(sb.ToString());
                    Pathcodificado = sb.ToString();
                }
                Marshal.FreeCoTaskMem(pidl);
            }
        
            return Pathcodificado;
        }
		
//************************************************************************************************************************************

        public static string Decode (string myEncryptedPath)
        {
            IShellFolder folder;
           // IntPtr pidl;
            string PathDescodificado;
            PathDescodificado = "ERROR";
            string mypathEncriptado = myEncryptedPath; // Regex.Escape(myEncryptedPath);

            // este es el folder del escritorio (raz del espacio de nombres del shell)
            if (SHGetDesktopFolder(out folder) == 0)
            {
              
                // Desencripto 
                int a = 0;
                int b = 0;
                int largo = 0;


                CryptStringToBinary(mypathEncriptado, mypathEncriptado.Length, CRYPT_STRING_BASE64, IntPtr.Zero, ref largo, ref a, ref b);
                // recreo el objeto
                IntPtr pidl2 = Marshal.AllocCoTaskMem(largo);
                //if (CryptStringToBinary(sb.ToString(), sb.Length, CRYPT_STRING_BASE64, pidl2, ref largo, ref a, ref b))
                StringBuilder sb = new StringBuilder();
                if (CryptStringToBinary(mypathEncriptado, mypathEncriptado.Length, CRYPT_STRING_BASE64, pidl2, ref largo, ref a, ref b))
                {
                    // muestro el path proveyendo el pidl reconstrudo
                    //sb.Clear(); Only works with .NET 4
					 sb.Length = 0;
                    sb.Capacity = 261;
                    SHGetPathFromIDList(pidl2, sb);
                    //Console.WriteLine(sb.ToString());
                    PathDescodificado = sb.ToString();
                }

                //
                //Marshal.FreeCoTaskMem(pidl);
                Marshal.FreeCoTaskMem(pidl2);
            }
            return PathDescodificado;

        }       
}

"@


try
{
	$MyPath = "c:\Windows"
	
	$Encrypted = [PIDLUtils]::Encode($MyPath)
	$Encrypted
		
	$notEncrypted = [PIDLUtils]::Decode($Encrypted) 
	$notEncrypted
	
}
catch
{
	$_
	break
}

  • Proposed as answer by SalvaG Thursday, March 14, 2013 12:17 PM
March 14th, 2013 12:15pm

Can solve this problem by inserting the value via command.

reg ADD "HKCU\Software\Microsoft\Windows Photo Viewer\Slideshow\Screensaver" /v "EncryptedPIDL" /t REG_EXPAND_SZ /d " "encrypted value" /f

excuse my English.

I'm from Brazil
Free Windows Admin Tool Kit Click here and download it now
November 27th, 2013 7:42pm

thank you thank you thank you thank you!!!
February 20th, 2014 3:49pm

Hi All,

I believe I've got the easiest solution

Just take c:\WINDOWS\system32\ssmypics.scr from WinXP x32 and distribute it to your Win7, 8 and 8.1 x32 & x64 workstations along with your pictures, maybe even in the same policy.

Then apply one domain policy with screensaver settings to and no need for all these coding and other shamanisms. And you even don't need to apply different WMI filters to filter different OS versions. 

IMHO slideshow from XP with transition effects looks much nicer than the one from Win 7 or 8.

Cheers!

Free Windows Admin Tool Kit Click here and download it now
May 6th, 2014 2:38am

Hello huys. I find this solution, hope it help your guys.
First You copy PhotoScreensaver.scr or ssmypics.scr (from XP/system32) to your Windows 7 system32.
Then right click on that file and choose "Configure". And all the setting in that box will appear and you done.
Test the 2 files screensaver XP and 7.
Sorry, my English bad.
     
June 19th, 2015 3:14am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics