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'
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:
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?
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:
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.