Monday, September 27, 2010
Sky+ remote codes
Luckily my dad had a spare new Sky+ HD remote, which I thought would work.
If you need to get a different type of remote to work with Sky, Sky+ or Sky HD. Here's how:
1 press the TV button
2 press and hold the Select and i buttons until the red light on the remote flashes twice
3 press the 1 button (0=Standard, 1=Sky+, 2=Sky HD)
4 press the Select button (the red light should flash twice, if it doesn't, your remote cannot control a Sky+ Digibox)
5 press the Sky button
There are also other 'reset' codes and TV codes, which are easily available on the web. But this was the one we needed to get our remote working with our Sky+.
Now for some soldering of the old remote...
Thursday, September 16, 2010
Restoring a Dell factory image file (.wim) to a new hard disk
Basically, I extracted the factory.wim file from the recovery partition of a failing hard drive, and also got the imagex.exe and it's config files from the tools folder in the recovery partition and stuck them all on my external usb.
Then, using a vista disk, I booted into the recovery options after installing a new hard drive.
Going into command line, I issue the following commands to get the new hard disk ready, active and formatted:
diskpart
select disk 0
clean
create partition primary
assign letter=c:
active
exit
format c: /q /y
once this was complete, I navigated to my USB drive (handy that vista boot disk repair has usb support - as does windows 7) and ran the imagex command to restore the factory.wim file:
Imagex /apply factory.wim 1 c:\
Once this was complete, and again, thanks to the tjb-ts blog, I needed to run the vista startup repair option, which sorted out the booting issue. If I didn't run this option, then vista wouldn't load.
All in all, a successful operation!
Friday, September 3, 2010
Searching in Windows for NOT those things!
After renaming many files with prefixes to allow for faster searching, and getting all the mp3 tags correct and orderly, I wanted to check through my directories for any files that were NOT meant to be in the respective folders. IE in my music directory, for any files that were NOT .mp3, and in my pictures, any files that were NOT .jpg, etc.
I found out you cant do this with Windows search. DOH!
I found out (on Eileen's Lounge - thanks Hans!) that a command line will do this. Yay!
For instance:
dir "C:\Documents and Settings\
will pipe a LOT of info into a text file, detailing any files not of the type .mp3 in the music directory. There is a lot of verbatim with this method to sift through though.
I think Google desktop search could probably do this with less verbatim, but I don't have this app (no major use for it) and didn't want to install it. I would rather write a nice little script...
I called it the NOT search. I have posted it for download with an .exe version on 'Eileen's Lounge (formerly Woodies Lounge)' here.
It basically prompts you for the directory to search on, then for the file types to exclude, ie NOT search on, and then offers folder recursion, ie search through all subfolders. Once complete a nice little report is presented to you in Notepad, detailing any found files and their paths. I found this very helpful indeed and was able to clean up and move any files to where they should be.
The code is below:
'// pmatz's file extension NOT search - sept 01 2010. v 1.1
'// script to search for all files with extension's NOT specified
'//---------------------------------------------------------------
Public strList
main
Sub main
strList = ""
Dim strFileExtensions()
strPath = InputBox ("Enter path to search on." & vbCr & _
"(For root drives please use driveletter" & vbCr & _
"followed by :\ )" ,"pmatz's file extension NOT search")
If IsEmpty(strPath) Then
closeMessage1
Exit Sub
End If
strGetFileExts = InputBox ("Enter filetype/s NOT to search for." & vbCr & _
"(seperate file extensions with commas and leave no spaces" & vbcr & _
"e.g. .mp3,.jpg,.gif,.tar,.iso)","pmatz's file extension NOT search")
bRecurse = (MsgBox("Recurse through all subfolders?",vbYesNo) = vbyes)
strTypes = strGetFileExts
iExtensions= 0
Do
ReDim Preserve strFileExtensions(iExtensions)
iComma = InStr(1,strGetFileExts,",")
If iComma > 0 Then
strFileExtensions(iExtensions) = Left(strGetFileExts,iComma-1)
strGetFileExts = Right(strGetFileExts,Len(strGetFileExts)-iComma)
iExtensions=iExtensions+1
End If
Loop Until iComma = 0
strFileExtensions(iExtensions) = strGetFileExts
search strPath, strFileExtensions, bRecurse
createOutput strPath,strTypes
End Sub
Sub search(searchFolder,excludeTypes,recurse)
On Error Resume Next 'this stops crash for issues with no access etc.
bFound = False
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FolderExists(searchfolder) Then
closeMessage1
Exit Sub
End If
Set fFolder = fso.GetFolder(searchFolder)
Set fSubfolders = fFolder.SubFolders
Set fFiles = fFolder.Files
For Each fFile in fFiles
For iExtension = 0 To UBound(excludeTypes)
For iStop = Len(fFile.Name)To 0 Step -1
If Mid(fFile.Name,iStop,1) = "." Then
iStop = Len(fFile.Name)-iStop + 1
Exit For
End If
Next
If UCase(Right(fFile.Name,iStop)) = UCase(excludeTypes(iExtension)) Then
bFound = True
End If
Next
If Not bFound Then
strList = strList & vbNewLine & fFile.Path
Else
bFound = False
End If
Next
If recurse Then
For Each fSubfolder In fSubfolders
search fSubfolder.Path,excludeTypes,True
Next
End If
Set FSO = Nothing
Set fFolder = Nothing
Set fSubfolders = Nothing
Set fFiles = Nothing
End Sub
Sub createOutput(strPath,StrTypes)
Set oShell = CreateObject("WScript.Shell")
strOut = oShell.SpecialFolders("Desktop")
Set fso = CreateObject("Scripting.FileSystemObject")
strOut = strOut & "\pmatzFileExtensionNOTsearch_" & getStamp & ".txt"
Set f = fso.CreateTextFile(strOut)
f.WriteLine "pmatzFileExtensionNOTsearch performed on " & Now()
f.WriteLine "Searched through " & strPath & ", excluding types " & strTypes
f.WriteLine "__________________________________________________"
f.WriteLine
f.Write strList
f.Close
oShell.Run("%systemroot%\notepad.exe " & strOut)
Set oShell=Nothing
Set fso = Nothing
Set f = Nothing
End Sub
Function getStamp
strStamp = FormatDateTime(Now(),2)
strStamp = Replace(strStamp,"/","-")
strStamp = strStamp & "_" & FormatDateTime(Now(),4)
strStamp = Replace(strStamp,":","-")
getStamp = strStamp
End function
Sub closeMessage1
MsgBox "Need to enter a legitimate path!",vbinformation,"pmatz's file extension NOT search"
End Sub
Wednesday, August 18, 2010
TreeSize - check your storage capacities
It comes in free version or a paid version with lots more features. But the free version is fine.
This will scan a directory or drive and breakup by folder how much space is used by files and folders.
You can print a 'report' which is helpful, and although the free version doesn't support an export to .csv feature, you can print to XPS for instance and do a little copy and pasting if necessary.
Wednesday, July 14, 2010
Google Sketchup
You gotta play with this, its excellent free software. I am completely immersed in the tutorials and am enjoying every minute.
Have a look and play. http://sketchup.google.com/
Tuesday, July 6, 2010
LDAP query
Function LDAPsearch (strSearch,strQ)
'set variable to hold required amount of attributes
Dim aResults(4)
'set LDAP defaults to root domain
Set rootDSE = GetObject("LDAP://RootDSE")
DomainContainer = rootDSE.Get("defaultNamingContext")
'create recordset connection
Set conn = CreateObject("ADODB.Connection")
conn.Provider = "ADSDSOObject"
conn.Open "ADs Provider"
'set query, using strQ for searched FOR item and strSearch as search ON string
ldapStr = "
'execute LDAP query
Set rs = conn.Execute(ldapStr)
'look for records that meet the query
While Not rs.EOF
'FoundObject is a successful find for query
Set FoundObject = GetObject (rs.Fields(0).Value)
'put results into array with tags
aResults(0) = FoundObject.employeeID
aResults(1) = FoundObject.displayName
aResults(2) = FoundObject.userPrincipalName
aResults(3) = FoundObject.sAMAccountName
aResults(4) = FoundObject.telephoneNumber
'goto next record
rs.MoveNext
'concatenate attributes to string
For i = 0 To 4
strResult = strResult & aResults(i)
Next
'count results (searches may produce multiple results)
iCount = iCount + 1
'add newline results string
strResult = strResult & vbnewline
'continue until no further records are found
Wend
End Function
PureSync
Synctoy didn't allow for easy changes to the directoris and files that you set up for synch.
To cut a long story short there was a clear contender, namely PureSync from Jumping Bytes.
This is a very powerful and flexible tool, with way more options to really specify how you want to back up / sync your files.
I have three main directories that I sync regularly to ensure minimal data loss in the event of a 'catastrophic failure' eg hard drive fail, theft etc. And so I am only scraping the surface in my use of what PureSync can do, even so, it is far more preferable than SyncToy.
If you are looking for a free sync tool that beats the competition, I would recommend PureSync as the solution.
Friday, July 2, 2010
Google Sync - Outlook 2010
Upon an upgrade at work to office 2010 (from XP) the calendar sync no longer worked. A bit of googling and it seemed to be a simple issue caused by the stamp of the 2010 tag on the app, and there were fixes involving hex editing the exe file which is where i thought .... oh no. Then i found this link: (thanks to james manning!)
Google Calendar Sync with Outlook 2010
This is the way to do it. Install the google tool, then use the updated .exe file and it works perfectly again.
Ahh...
Wednesday, February 17, 2010
Media Monkey
I was looking for something better than iTunes as I have LOADS of music and need to keep it organised and searchable, but was finding iTunes both too slow (startup time especially) and creating duplicates and other various niggles. I have to say that within an hour of using (and getting to know its features) MediaMonkey, I am completely converted. And this is the free version. Am seriously thinking of buying the lifetime subscription to the full 'Gold' version. It handles all my music and I have completely un-duplicated my library already. It has EXCELLENT features and in my opinion blows all other players / library managers out of the water.
Friday, October 30, 2009
USB boot, with puppy OS
This is very helpful (and sometimes necessary) for those situations where you need to bypass the main OS on a system:
- System hard drive failure - you need to be try and recover your files
- You just want a quick 'netbook' system with no HDD
- Locked out with no administrator password, and need to reset user accounts etc
- Take an image of a HDD, or indeed write an image
- Unnattended installations
I have recently found a nice simple method to prepare a USB stick for this purpose - making it bootable and using a pretty slick lightweight OS (Puppy Linux) which is in many ways preferable to my usual BartPE windows line of attack. It has most features you need, like basic office apps, network support, browser, USB support, file manager, nice layout and look and feel...
To set up the .iso image (or any .iso for that matter!) on a USB stick and make it bootable, I found a great little application which will do just that. It's called 'UNetbootin' - Universal Netboot Installer.
Simple to use, and works a treat.