Skip to main content

Good morning!

 

I am attempting to use the worklet to set a login screen for Windows but was wondering if anyone had successfully changed the image source from a URL to an image uploaded into the worklet. If they have, could you please share the syntax used to replace this line?

 

# define the path to download the background image
$ImageURL = 'https://www.automox.com/static/images/default-og-image.png'

Hi @JWillms !

The Worklet will support any static URL that point to an image that is of a PNG, JPG, JPEG, BMP, TIF or GIF file extension.

 

You’ll just need to update the $ImageURL variable with your image’s source URL between the single quotes.

For example,
 

$ImageURL = 'https://png.pngtree.com/thumb_back/fh260/background/20230516/pngtree-mountain-wallpaper-hd-wallpapers-image_2575213.jpg'

 

 

When the Worklet’s remediation code runs, this will set the login background as my sourced mountain image:


 


*Note, that a log out or restart action would be required to see the changes made on the device.

 

Hope this helps! Let me know if you have any further questions.

 


Thanks for the reply! Do you know if there is a way to not use an image URL and an image file that is uploaded into the worklet and maybe copy and store it locally?


Hi @JWillms ,

 

The Worklet in its current form doesn’t support setting the Login Screen Background from an image file attached to the Payload.

 

Never fear! I made some enhancements to the Remediation code to support this for you!  You can find the new remediation code here in my Github repo.

If you want to see what changes were made to the script, essentially the previous download from a URL sections were replaced with what you see on lines 99 to 114.

 

Copy the new script and replace all of the existing remediation code with it. There is nothing to change in the evaluation code.

 

You’ll then want to upload your image file to the Worklet’s Payload.  In my example, I am using this forest wallpaper I found here.

Again, only PNG, JPG, JPEG, BMP, TIF or GIF file extensions are supported here.
 

 

You’ll then want to update line 56 in the remediation code with the exact file name you uploaded to the Payload.

Example,

$imagePayload = 'forest_wallpaper.jpg'

 

After making these changes, you can then run the Worklet manually or wait for its next scheduled remediation.

 

You should then see the results in your Activity Log:

 

After a logon or restart action, the new login background will be set:

 

 

Hope you find this valuable. Have a great day!


Sweet! This is exactly what I was looking for. Let give me this a shot. Appreciate the quick replies and assistance.


Closing the loop. Your changes worked perfectly. Thanks so much again. Have a great rest of the week.


Excellent!  You’re very welcome. You as well! 😎


Reply