Jump to content
Sign in to follow this  
NIKENIT

Change user profile pic in win8.

Recommended Posts

NIKENIT

I know how to change userpic in win 7 and older, but in win 8 and win 8_1 standart method does not work

I mean this one:

$hPicPath = DLLStructCreate("wchar[128]")  
    DllStructSetData($hPicPath, 1, @UserProfileDir & "\usertile.jpg")

   $hUserName = DLLStructCreate("wchar[128]")  
      DllStructSetData($hUserName, 1, @LogonDomain&"\"&@UserName)

   $aRet = DllCall(@SystemDir & "\shell32.dll", "long", 262, "ptr", DllStructGetPtr($hUserName), "int", 0, "ptr", DllStructGetPtr($hPicPath))

I know there is some function like [Windows.System.UserProfile.UserInformation]::SetAccountPictureAsync($file) (powershell), but it doesnt work in AutoIt. Can somebody help me? Im very new here.

Edited by NIKENIT

Share this post


Link to post
Share on other sites
careca

Well, in w7 i just copy a file called 'user.bmp' to 'C:ProgramDataMicrosoftUser Account Pictures' and it's done.


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
ViciousXUSMC

I used to do it like careca, change the file itself.

Based on that if it works in Win 8 all the same here is a quote from a Win 8 site.

The default user account picture images are in the hidden system folder below.

C:ProgramDataMicrosoftDefault Account Pictures

The current user account picture (tile image) is stored in the hidden folder below.


C:UsersPublicPublic Account PicturesS-1-5-21.......(GUID for user account)

The recent user account pictures used for your account are stored in the hidden folder below.


C:Users(user-name)AppDataRoamingMicrosoftWindowsAccountPictures

Share this post


Link to post
Share on other sites
NIKENIT

As far as i know, this will change userpic only after PC restart.

Share this post


Link to post
Share on other sites
careca

Isn't that good enough? :ermm:


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
ViciousXUSMC

As far as i know, this will change userpic only after PC restart.

 

Maybe try to kill and restart the Explorer process?  Not sure if that would work but it does for a lot of things that normally require a logoff/restart.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×