Duplicate computers appear within WSUS

Reading Time: < 1 minute

If you find duplicate computers appearing in wsus, you will need to recreate the susclientid on the duplicate computer. This happens when the same computer is cloned with the same name.

To resolve, copy the below code into a bat file and run.

@Echo off
if exist %systemdrive%\SUSClientID.log goto end
net stop wuauserv
net stop bits
reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\WindowsUpdate” /v PingID /f  > %systemdrive%\SUSClientID.log 2>&1
reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\WindowsUpdate” /v AccountDomainSid /f  >> %systemdrive%\SUSClientID.log 2>&1
reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\WindowsUpdate” /v SusClientId /f  >> %systemdrive%\SUSClientID.log 2>&1
net start wuauserv
wuauclt.exe /resetauthorization /detectnow         
:end
exit

Add latest blog posts to homepage

Reading Time: < 1 minute

You have a blog at domain.com/blog and would like for the latest blog posts to appear on domain.com. To be able to perform this action, follow the instructions below:

1) Copy the below script to where you wish the latest post to appear. Remember to amend add path to.
2) Amend numberposts=5 to the number of posts you require to appear on the homepage.
3) The below code will display the post title, linked back to your post. It will also display a short 55 word summary.

<?php
require(‘/add/path/to/wp-blog-header.php’);
?>

<?php
$posts = get_posts(‘numberposts=5&order=ASC&orderby=post_title’);
foreach ($posts as $post) : start_wp(); ?>
<a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to<?php the_title(); ?>”><?php the_title(); ?></a>  
<?php the_excerpt(); ?>
<?php
endforeach;
?>

What if you want to increase the default 55 worded summary?

1) Open formatting.php located within the folder wp-includes
2) Locate the code  $excerpt_length = 55;
3) Amend the number as required

Copy shortcut to desktop using script

Reading Time: < 1 minute

If you wish to copy a shortcut to a desktop using a VB Script, copy the below code to a notepad, amend the path on line 6 and save as a .vbs file. e.g. test.vbs

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = CreateObject(“WScript.Shell”)
Set objProcess = objShell.Environment(“Process”)
strDesktop = objProcess.Item(“UserProfile”) & “\Desktop\”
boolOverwrite = False
objFSO.CopyFile “\\server\share\shortcut.lnk”, strDesktop, boolOverwrite

Or

If you’re using redirected folders, try the below code:

Const DESKTOP = &H10&
Set objFSO      = CreateObject(“Scripting.FileSystemObject”)
Set objAppshell = CreateObject(“Shell.Application”)
Set objFolder = objAppShell.Namespace(DESKTOP)
strFilePath = objFolder.Self.Path & “\”
objFSO.CopyFile “\\server\sharename\Shortcut.lnk”,strFilePath,True

Always test before pushing out to a live environment

How to automatically delete temporary internet files

Reading Time: < 1 minute

A visitor contacted us to ask; “How can i configure Internet Explorer so when I close the browser it  automatically deletes temporary internet files”

This is how it’s done:

1) Open Internet Explorer
2) Click Tools
3) Click Internet Options
4) Click the advanced tab
5) Scroll down to the security section
6) Tick ‘Empty Temporary Internet files folder when browser is closed’
7) Click OK

If you’re using Internet Explorer 7 and would like a script which clears out internet activity please see: https://cloudbuild.co.uk/?p=307

If you would like a script which deletes temp files from all profiles located on a machine, please see https://cloudbuild.co.uk/?p=657

Free Contact Us Form Script

Reading Time: < 1 minute

I was looking for a free contact us form script which included the below fields:

Name
Email Address
Phone Number
Message
How did you hear about us

And something which recorded the senders IP address and also included a spam filter.

I searched around but was unable to find a free script which met my needs. I made a post at a forum called Webmaster Serve and the team created me one from scratch (for Free)!! I would like to thank the team for taking the time to create the script. The script is working great.

If anyone else is interested in the script or would like to view a demo, click here