Posts

Showing posts from February, 2022

The user's account has expired - Microsoft Windows - Workgroup

Image
This post describes how to resolve the error "The user's account has expired" on a Microsoft Windows Workgroup machine i.e. without Active Directory Users and Computers. Cause This error can occur when the local user account's expiry date is in the past and you try to logon as that user. Resolution You can't use Local Users and Groups to change the user account expiry date. The expiry date can be be changed using either Powershell or VBScript. PowerShell method To get the current expiry date, run the following command in PowerShell, replacing accountname with the account you want to get. Get-LocalUser accountname|SELECT * To set the expiry date to a specified date: Set-LocalUser asmith -AccountExpires (Get-Date).AddDays(12) To set the expiry date to never expire: Set-LocalUser accountname -AccountNeverExpires VBScript method The following VBScript gets the current expiry date: Set objUser = GetObject("WinNT://hostname/accountname") Wscript.Echo objUser.

Embed YouTube video with iFrame without fixed size height and width

Image
In this post, I describe how you can embed a YouTube video in HTML without using a fixed size height and width. Problem The problem with a fixed height and width is that the embedded YouTube video doesn't fit once the screen gets narrower than the fixed width (for example, on a mobile device) and you end up with the sides of the video being cut off and horizontal scrollbars: Resolution Thanks to CSS tricks for this post which has an excellent solution: 1. Create a container (e.g. a div) and put the embed video code from YouTube inside this container: < div class ="video-container">      < iframe src ="https://www.youtube.com/embed/HF7GTGaJdVg"></ iframe > </ div > 2. Specify the CSS for the container and the iFrame inside it: .video-container {     position : relative ;     padding-bottom : 56.63% ;     height : 0 ; }       .video-container iframe {         position

Padding not showing on HTML buttons in emails in Outlook

Image
In this post, I describe a way to put padding on HTML buttons in emails when displayed in Microsoft Outlook. Outlook not showing padding To add a button in HTML to an email, normally you’d just use an a tag with some padding and a background-color, etc: < a href =" https://howardsimpson.blogspot.com " style =" background-color : #4f7c1f ; color : #ffffff ; text-align : center ; text-decoration : none ; padding : 14px 20px 14px 20px ; " > View Blog </ a > Unfortunately, Microsoft Outlook ignores the padding and displays the button without it: Resolution To resolve this issue, you can use a filled rectangle in a table cell to create the padding around the text in the button in Outlook. The filled rectangle only works in Outlook, so it needs to be put in an Outlook conditional comment ( if mso ).  The a tag is included in the table cell but outside the Outlook conditional comment so that the button is shown in other email platforms. Here is the code

Remove unavailable videos are hidden in YouTube playlist

Image
This post describes how you can remove the 'unavailable videos are hidden' message in a YouTube playlist by removing the unavailable videos from the playlist. Cause This issue can occur when you delete videos in a playlist before removing them from that playlist. Resolution To remove unavailable videos that are hidden from your playlist: 1. Go to YouTube Studio , select Playlists then press the pencil button for the playlist with the unavailable videos 2. Press the three dots button then select Show unavailable videos 3. Hover the mouse over the video you want to remove, press the three vertical dots button which appears, then select Remove from... 4. The deleted video is removed from the playlist and, once all deleted videos have been removed, the 'unavailable videos are hidden' message no longer appears. Related Posts - Embed YouTube video with iFrame without fixed height and width - Force subtitles to default to on per YouTube video - Add YouTube playlist link be