Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements #2

Open
keldnorman opened this issue Jan 17, 2020 · 9 comments
Open

Enhancements #2

keldnorman opened this issue Jan 17, 2020 · 9 comments

Comments

@keldnorman
Copy link

@keldnorman keldnorman commented Jan 17, 2020

sharplocker2

To get the current background image:

Image myimage = new Bitmap(@Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microsoft\\Windows\\Themes\\TranscodedWallpaper"));

and to get the account picture:

RegistryKey AccountPictureReg = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\AccountPicture", true);
string AccountPictureFilename = AccountPictureReg.GetValue("SourceId").ToString();
AccountPictureReg.Close();

string AccountPicture = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microsoft\\Windows\\AccountPictures\\" + AccountPictureFilename);

Console.WriteLine(" Value: " + AccountPicture);
@3top1a

This comment has been minimized.

Copy link

@3top1a 3top1a commented Feb 1, 2020

I made these changes & added username detection in my fork. Waiting for it to get merged.
*I used a different account picture detection, yours doesn't account for the default picture.

@zacinbc

This comment has been minimized.

Copy link

@zacinbc zacinbc commented Feb 1, 2020

is it possible to add a username to the login page like this i only ask because i don't have any experience coding for windows using C#

@Mezuse

This comment has been minimized.

Copy link

@Mezuse Mezuse commented Feb 2, 2020

hey just wondering where you would put this code? ^^^

@jy1263

This comment has been minimized.

Copy link

@jy1263 jy1263 commented Feb 2, 2020

Would also be really cool if there were sign in options and support for multiple accounts to make it seem more believable, in the mean time I might try looking into ways to make this work.

@cftad

This comment has been minimized.

Copy link

@cftad cftad commented Feb 3, 2020

Would also be really cool if there were sign in options and support for multiple accounts to make it seem more believable, in the mean time I might try looking into ways to make this work.

@jy1263 I agree, I'm looking to do just that in a WPF fork (to give more control over the styling).
https://github.com/cftad/SharpLocker

@CL0Pinette

This comment has been minimized.

Copy link

@CL0Pinette CL0Pinette commented Feb 3, 2020

There is one problem. the background image is not always the lockscreen image. I'm gonna try to replace the background image with the lockscreen image.

@jy1263

This comment has been minimized.

Copy link

@jy1263 jy1263 commented Feb 6, 2020

@CL0Pinette been tryna figure that out but idk if thats possible without administrator privileges, because u can't access C:\ProgramData\Microsoft\Windows\SystemData<USER-SID>\ReadOnly\ without it.

@msvamp

This comment has been minimized.

Copy link

@msvamp msvamp commented Feb 7, 2020

@CL0Pinette There is another idea.
A fairly large number of users have the Windows Spotlight feature turned on, which displays Bing-provided images on the lock screen. You can randomly grab one from %LOCALAPPDATA%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets as it doesn't require admin rights. Try to pick one with size > 250 or 300KB (or better, check its resolution or aspect ratio) so as to avoid picking a Start Menu tile image.
Also, I've noticed that Windows uses %WINDIR%\Web\Screen\img103.png as a fallback lock screen image when Spotlight is enabled but no Spotlight images have been downloaded yet, or if Spotlight is unavailable due to some reason.

I've also read that the registry keys OriginalFile_A or Creative\LandscapeAssetPath present in the location HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lock Screen\ contain the filesystem path to the current lock screen image in use, when Windows Spotlight is enabled. I've just enabled Spotlight on my PC and am yet to find out if it's true.

@PineMaster

This comment has been minimized.

Copy link

@PineMaster PineMaster commented Feb 9, 2020

Hello, keldnorman, where can i write that code for profile pin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.