27 November, 2011

Cleaning iTunes Library - Finding Mismatched Tracks





I recently changed my computer and I am now a full time laptop user. I hardly waited up until now and resisted to keep my desktop but I cannot avoid the fact that a laptop of 500$ is almost more powerful than my 2 year old expensive gaming PC. Why not switch to a laptop now? I've made the move BUT I took these decisions so fast that I completely forgot certain small things, like properly backing up my iTunes library, Google Picasa albums, Microsoft Office program settings... I did not loose any data though. Do not get me wrong here. I have backups of backups because of all the bad experiences I've had in the past with loosing important data. But today, all these programs are working with some type of internal databases. Those databases keeps the metadata attached to your pictures, tracks, movies... When you use your programs internal "backup" functions, like Picasa's "Backup Pictures" option under the "Tools" menu.

So, here what I've been through and I hope my article will save you the time that I lost on finding how to do this kind of messed up situations.

I've installed iTunes from scratch and set my library location from the "Edit", "Preferences", "Advanced" menu to the folder that has all my music. Let's say, M:\Music for example purposes. Than, I had almost triples of every track in my library and also missing a lot of tracks... Based on my hours of research, I found this way to easily get rid of all the mismatched items in your iTunes library. No need to install any third party software.

  1. Make a smart playlist called “All Files” with this rule: “Artist” is not “123456789? (or any nonsense name that won’t be in your library).
  2. Make a static playlist called “All Live Files”.
  3. Make a smart playlist called “Missing Files” with these rules: Match all of the following rules, Playlist is “All Files”, Playlist is not “All Live Files”
  4. Select all the files from “All Files” and drag them into “All Live Files”. The dead files marked (!) will not copy over.
  5. “Missing Files” will contain all of your dead files. Select all and delete. 

This method can be found on the internet. I did not discover this method personally. I'm just sharing it so anyone who is looking for the answer can find it easily. But i personally, saved hours of work with this method and I was able to recover  most of my songs information and artwork.


But I want to mention a third party software that might help you if you still have problems. Especially for thos who have huge itunes library wih thousbands songs, this third party tool is just perfect for you. If you want a clean iTunes library, this tool will work with an online music database to artwork and metadata your entire iTunes library. I do not work for these folks but I am just a happy customer who have a very clean iTunes library now. When I say clean, I mean not a single song with a missing artwork cover! It's "TuneUp for iTunes". You can find more info @ www.tuneupmedia.com


Enjoy


09 November, 2011

Terminal Services Easy Print Advantages & Issues


Lately I have been working on a new Remote Desktop (formerly Terminal Services) server and I’ve seen a couple of problems related to the printers. Windows Remote Desktop Services is a great technology and for some organizations out there is the ultimate solution! Especially, with some new features like “RemoteApp” and “App-V”… It’s a great technology for users and from IT when your server is configured properly and it’s a big headache if you don’t know what you are doing. For everyone out there who is looking into “Remote Desktop Services”, I highly recommend to spent a little time on Microsoft forums and read as much as you can because there is a lot to know before you go ahead and install the roles on your server. In this article, I’ll only cover print features in Remote Desktop Services.

Let me tell you what the problem was before giving out the solution. We have a plotter printer to print out plans for electricians and engineers. I had no problem installing the printer on the remote desktop server directly with the “Add new printer” wizard and my tests were successful but some of the users reported issues with this printer. I think it’s worth to say that these users were using the remote sessions from outside of the company through a mobile 3G internet connection. On the client side, there is nothing special other than setting “printer redirection” as shown here;



So, with these settings, when people hit the “print” button on any application with this printer, either there is nothing happens or the remote desktop session window crashes…
So the problem was related to the “Easy Print” feature of “Remote Desktop Services in Windows Server 2002 R2”. This feature is great for almost any model and make of printers. Basically, it’s for people who have small printers connected to their machines locally that need to print out stuff from the “Remote Desktop Sessions”. You don’t want any user to install a printer on your server but you want your users to be able to print their stuff on their own printers. Easy print feature is redirecting any local printer to the remote sessions and your local printers become available in the “Remote Desktop”. This magic happens with this feature called “Easy Print”. So in our case, the easy print was unable to print out on the plotter. Probably this was due to the driver that the plotter was using.
The solution was hidden under group policy. There is a “Group Policy” setting right under;

Computer Configuration\ Administrative Templates\Windows Components\Terminal Services\Terminal Server\Printer Redirection\

When the policy “Use Terminal Services Easy Print Printer Driver First” was not configured or set to enabled, whether your server has the right drivers or not, the server tries to do it’s magic before even attempting to try the right way. This was causing the issue because our server had already the right drivers that could use to handle the plotters print jobs.
By setting this policy to “Disabled”, we have come over the problem. Right after the changes were applied, users were able to print without a problem on this printer.

18 October, 2011

CHCP – DOS Special Character Problems (CMD Active Codes)


Another “very hard to find” tip… When writing batch files with some special characters like “é” or “à”, you might have surprise errors. Running batch files, with special characters in the code, can cause some serious interpretation problems and your commands might not work at all. Sometimes, you can’t avoid using these characters, like in my case. Because I live in Montréal, Québec (French part of Canada) and there are serious law issues that we have to respect and I think the most difficult part of my job is this language issue.

The trick is hidden in this link from Microsoft;



The « chcp » command displays or sets the active code page number is the remedy to your problem. By putting the “chcp 1252” at the beginning of your code, you are changing the “active code” for your cmd environment before even executing your commands in the batch file. The number 1252 is the code for West European Latin characters which in my case resolves the "é" - "à" - "è" type of characters. For other regional codes, please refer to the previous link or the table below;
Code page
Country/region or language
437
United States
850
Multilingual (Latin I)
852
Slavic (Latin II)
855
Cyrillic (Russian)
857
Turkish
860
Portuguese
861
Icelandic
863
Canadian-French
865
Nordic
866
Russian
869
Modern Greek


Optionally, if you want further info on the "Dos Code Pages", visit WikiPedia's site for that as it's the best resources that I could find.


15 August, 2011

Default Printers on Terminal Server 2008 R2


If you have a Terminal Server 2008R2 which is used widely in your company and users need to use printers a lot, than you’ll face this default printer problem later or sooner. You can log on as the user on the terminal server, add the printers you would like and set the default printer like you would do on a normal workstation, but the default printer will change to the local machines default printer automatically. Let’s say you are using “comp1” in order to make a “Remote Desktop” connection to a terminal server which is called “Terminal”. Well, as an example, if you have “XPS Virtual Printer” set as a default printer on “comp1” and you make a remote desktop connection to the “Terminal” server, your default printer will be set to “XPS Virtual Printer” by default in the terminal server session. To avoid that action and keep the same printer as a default printer in terminal server sessions, you will need to follow these instructions;
If you want to change the behavior only for one user, then you can;
1-      Open “Active Directory Users and Computers” snap-in with a Microsoft Management Console (mmc.exe)
2-      Find the user in your domain hierarchy, right click on the user and choose “Properties”
3-      From the “users Properties” window, go to “Environment” tab, under “Client devices” section, uncheck the “Default to main client printer” option and click “Apply”

If you want to change the behavior for all users who logs onto the Terminal Server, then you can;
1-      Open the “Remote Desktop Session Host Configuration” from the Terminal server.
2-      Under “Connections”, right click on “RDP-tcp” connection and choose “Properties”.
3-      From the “RDP-tcp Properties” window, go to “Client Settings” tab.
4-      Under the section of “Redirection”, check the checkbox “Default to main client printer” option in order to avoid the unwanted changes with the default printers while logging on a Terminal Server 2008 R2.

02 May, 2011

Easy Windows 7 Sysprep and Imaging

What is sysprep?
From MicrosoftThe System Preparation tool (Sysprep) is a technology that you can use with other deployment tools to install Microsoft Windows operating systems with minimal intervention by an administrator or technician.”
This tool is included by default with all of the Windows 7 versions. Generally, this tool is used to prepare a “master” image of a computer and deploy it to other computers.  Thanks to new “file based imaging” system of Windows 7, we can create a “template” image of a computer with all the settings and applications and deploy this image to different type (brand and model) of computers.
By using sysprep, we can take off the integrated drivers from the OS. So, next time the syspreped image is booted, it is generating new SID (security identifier) and new drivers. This way, your Windows OS is not going to be in conflict with the new hardware that you are copying the image.
You can use an imaging tool of your choice right after the sysprep. It can be your preferred one like Symantec Ghost, Acronis, ClonZilla or a new tool that Microsoft is supporting “ImageX” which is part of the Windows Automated Installation Kit (WAIK). In this guide, I’ll only cover the sysprep part and I’ll explain briefly what to do after the sysprep.


I’ll try to cover the imaging process in my following posts. It’s a very critical process of big system deployment jobs. I’ll cover that subject with the ImageX tool from Microsoft. I’ll go in deep as usual in order to give you all the tips and hints of deploying systems with ImageX and Windows Automated Installation Kit.
Please read the whole document before proceeding with the instructions.

Let’s begin;

1-      First thing is first; let’s build your system as you like. Setup all your preferences and install all your applications. Don’t forget your updates and latest drivers for your system.
2-      Once everything is set and you believe that your system is ready to be deployed to your other computers, we can start syspreping your computer. Open an elevated command prompt as “Administrator” and type
“cd C:\Windows\System32\Sysprep” hit the “Enter” key.
“sysprep.exe /generalize /oobe /shutdown” hit the “Enter” key.
3-      Your system begins the sysprep operations and with the command that we entered, the “/generalize” switch will prepare the image, take off all the drivers from the OS which makes your image “Hardware Independent”. The “/oobe” switch will show you the “Out-of-Box Experience after the deployment of the image and finally the “/shutdown” switch will shut down your computer after the sysprep process is completed.
4-      Once your computer is shut down, boot into your “System Image” software such as Acronis or WinPE for ImageX and make a “backup” of your computer or “capture” an image with ImageX to a network location or to an external hard drive.
5-      Now it’s time to clone! Boot into your “System Image” software on the new machine that you want to copy the OS and this time do a “restore” or “apply” the image with ImageX.

Congratulations, you have just syspreped and imaged a Windows 7 computer. You can now deploy an OS with all the applications and updates installed in about 1 hour!
As I mentioned, this guide covers only the sysprep process and a brief explanation of the imaging process. In the following posts, I’ll try to cover the imaging process with details.

27 March, 2011

Build Your Home BitTorrent Server through a Web Browser (Shared BitTorrent Web Client)

 

My brother and I use a lot the BitTorrent application for a lot of reasons and we realized that my brother was downloading something that I already had on my computer. The whole idea was sharing all our stuff internally, being aware of what we are downloading NOW and why spend our entire internet quota for duplications?
So I found a very easy solution, I was all around the BitTorrent application’s “preferences” window. In my case the program that I’m using is the BitTorrent 7.2 and I know that these instructions work as well on uTorrent application too.
 This solution requires a computer to be “ON” and “online” all the time that you want the resume your downloading stuff. It can be your desktop, laptop or even a virtual machine, in my case; I’m using a dedicated Windows XP VMware virtual machine. The user can connect to the BitTorrent application through almost any browser (tested with Internet Explorer 9, Google Chrome 10, and Mozilla FireFox 4) and start downloading any torrent through that window. Almost everything you can do through the real application, you can do it through the web browser of your choice.
Follow the instructions below to complete your own BitTorrent Server through a Web Browser;

1-      Download and install BitTorrent or uTorrent (You can always try software too. I think it’s worth a shot.)
2-      Open the BitTorrent application and in the menu bar, go to “options” and click on “preferences”.
3-      In the left pane, go to “Web UI” and click on the check box to “Enable Web UI”. Set your “username” and “password” under “Authentication” and under “Connectivity” check the box who says “Alternative Listening port (default is the connection port) and leave the field to “8080”.
4-      Cick on “Apply” and “OK”. Leave the application open.
5-      Download the WebUI.exe web engine. This is the only trick in the game that we are going to do J. That’s it. It’s not easy to find so I’ve already found a couple of links but I’m going to give you the most reliable ones and also my own upload through the Google Docs free service. Here you are…
Ø  From uTorrent forums (you can also find detailed information about this process in here)
Ø  Direct Download link from uTorrent forums. (A direct link given by the same uTorrent forum posts)
Ø  My own upload (I’m using this version and i uploaded it on Google Docs everybody can have access it more easily. Please note that I’m not the owner of these files in the webui.zip folder).
6-      Rename the downloaded .zip file to “webui.zip”
7-      Press the “Windows Key + R” or go to start and click on “run” and type “%AppData%”. Move the webui.exe file in the “Bittorrent” or “uTorrent” folder. All depending your configuration and software. The long path for this folder is “C:\Users\username\AppData\Roaming\” for windows 7 and “C:\Documents and settings\Username\Application Data\” for Windows XP.
8-      Now find out what the IP address of the machine and type it in a browser with the right port and address.

Ex:                          http://192.168.1.10:8080/gui

If you installed it on your own machine, you can easly access to the web console of the bittorrent application by this address.

                                http://127.0.0.1:8080/gui

9-      Now, the easiest way to add a torrent for download through this browser interface is to click on the first icon and paste the download “url link” in the “torrent url” field and click on OK.
10-   Done! You can now share your BitTorrent client with every house tenants J Enjoy.

Note: This solution was found on the internet from different sources. I just documented the whole solution through a step-by-step guide for others.

17 March, 2011

How to Create Customized Bootable WinPE 3.0 Image?

WinPE is a light version of Windows 7 (command line version). To be able to make a WinPE, you need to install Windows AIK (Automated Installation Kit) from Microsoft. With this professional series of tools, we can create our personalized WinPE 3.0 environment.
What can WinPE do for me?
WinPE contains very useful tools to…
-  Deploy desktop and server operating systems
-  Patch the existent OS with the newest updates, hot fix and patch
-  Backup your computer!
-  Add and Remove hardware drivers

Steps to create a WINPE environment
1-      Start the “Deployment Tools Command Prompt” with the “Administrator” rights!
2-      Enter the following command.
“copype.cmd (architecture) Destination Path”
[Copype.cmd X86 C:\WinPE] or [copype.cmd amd64 C:\WinPE64]

3-      You can add additional customizations by copying your favorite tools into the created C:\WinPE\ISO folder. Like “ImageX + Sysinternal Tools + GImageX + etc.” To do that, simply copy these tools in C:\WinPE\ISO folder that you created.

Copy “C:\Program Files\Windows AIK\Tools\x86\ImageX.exe” C:\WinPE\ISO

4-      Copy the base image (WinPE.wim) into the \WinPE\ISO\Sources folder and rename the file to Boot.wim

Copy C:\WinPE\WinPe.wim C:\WinPE\ISO\Sources\boot.wim

If you are finished with your WinPE image, you can create a bootable .ISO to burn it on a DVD or CD or you can make a bootable USB flash disk! To do that, look at the “Creating a Bootable USB Flash Disk” title.
If you want to add some drivers, activate features; add packages, updates, hot fixes… Look at the “Customizing the WinPE Image” title.

Creating a Bootable USB Flash Disk / ISO image

Bootable ISO

To create a bootable ISO image for your WinPE environment, type the following command from “Deployment Tools Command Prompt” with “Administrator” rights!

Oscdimg –n –bc:\WinPE\ISO\boot\etfsboot.com C:\WinPE\ISO C:\imagename.iso

                            Defines the boot sector!        -  Root of the desired image - Path to new ISO file!

This command creates a bootable image of the WinPE environment that you just created. You can than burn this ISO into a CD/DVD and boot your computers with this media. Usually, this is the last step to do after customizing and tweaking your WinPE image.

Bootable UFD (USB)

After finishing our WinPE image, we can now use a USB stick to boot on WinPE. To do that, follow the steps above and prepare your USB Flash Drive with “Diskpart” utility.

Diskpart Commands

Open an elevated command prompt with “Administrator” rights! It doesn’t have to be “Deployment Tools Command Prompt”, we can use the normal “cmd” in Windows 7. Type the following commands…

Diskpart
List disk (shows the connected disks with their I.D.)
Select Disk 1 (1 represents your USB KEY)
Clean (wipes the selected drive)
Create partition primary size=7500 (creates a partition on selected disk. The value is in MB)
Select partition 1 (selects the partition that is newly created)
Format fs=FAT32 quick label=”WinPE”
Assign
Active
Exit

These steps prepare the UFD to be bootable! It still needs the boot files and environment in it. You can copy the content of WinPE into the root of your UFD! To do that, enter the following command…

Xcopy C:\WinPE\ISO\*.* /e F:\       (F:\ is the USB Drive)

Customizing the WinPE Image

With the WIM files, we can add drivers, updates, packages, patches, hot fixes, enable/disable features, etc… The easiest way to do these operations is to use the “DISM” and “IMAGEX” command line tools. In this tutorial, I’ll only show how to add drivers in a WinPE environment. But the potential to do things with this tool is much more than just adding the drivers…

First thing to do when playing around with WIM images is to “Mount” the WIM image. Mounting is like putting a CD into your CD-ROM. As WIM files are image based files, they contain a structure of folders and files… By mounting the “WIM” image, we can access to the content of the image and make changes if we want to.

To mount a WIM image, enter the following command in the “Deployment Tools Command Prompt” with the “Administrator” rights.

Dism.exe /Mount-Wim /WimFile:C:\Images\myimage.wim /index:1 /MountDir:C:\MountedImages
Or
Imagex /Mountrw C:\Images\Myimage.wim 1 C:\MountedImages

(/Mountrw = this switch mounts the images with the re-write attributes.
/Mount = this switch mounts the images with the read-only attributes.
Imagex.exe /? = will display the detailed information about “Imagex” and its options.)

Note: If you have the possibility to mount the image on a different physical hard drive, this helps a lot in terms of performance while working with mounted images.

Once we have the “MountedImage”, we can now add or remove the additional options or packages. I will only provide the commands to manipulate your mounted image and it’s all up to you to make all the changes needed. 

Dism Driver Commands: 

 Dism /image:C:\Mountedimages[ /get-drivers | /get-driverinfo | /add-driver | /remove-driver]

To add a driver for WinPE:
Dism /image:C:\MountedImages /add-driver:C:\NewDrivers\mydriver.inf  

(Optionally you can add the “-forceunsigned” (without quotes) option at the end of this command to force the installation of unsigned drivers)  

Dism /image:C:\MountedImages /add-driver:C:\newdrivers\mydriver.inf /forceunsigned

(Optionally you can use the “-recurse” (without quotes) option to add all the drivers with in a folder. Let’s say you have 5 new drivers in a folder (C:\NewDrivers) and you want to install all these drivers with a single command)

Dism /image:C:\MountedImages /add-driver:C:\NewDrivers\ -recurse –forceunsigned

To Servicing Applications and Application Patches

dism /image:path_to_directory [/check-apppatch | /get-apppatchinfo: | /get-apppatches |
/get-appinfo | /get-apps] 

Ex:  dism /image:C:\MountedImages /get-apppatches 

If you want to display information about specific .msp patches applicable to the offline image, you can use the /check-apppatch parameter. You use /patchlocation to specify the path to the MSP patch file. You can specify multiple patch files by using /patchlocation more than once in the command. For example, to display information about two patch files, 30880d0. msp and 8c82a.msp (both in C:\Windows\Installer) in the mounted image, you would enter the following command:

dism /image:c:\mountedimages /check-apppatch /patchlocation:c:\windows\installer\30880d0.msp
/patchlocation:c:\windows\installer\8c82a.msp

If you need detailed information about all installed MSP patches applicable to the offline image, you would enter a command similar to the following:

dism /image:c:\mountedimages /get-apppatchinfo

Known Problems

Boot Problems – Bootmgr is missing – BCDBoot

You can try the “BCDboot.exe”. After applying a WIM image to the new computer, use the following command to recover the missing Boot files.

X:\>C:\Windows\System32\bcdboot.exe C:\Windows /s C:
 
(In this example, C: is the drive that contains Win7 with the defective boot files.)

Kubilay Elmas
Microsoft IT Professional 
Windows 7 Enterprise Desktop Administrator

15 March, 2011

Mv91xx.sys BSOD Repair – Windows 7 X64


I recently had a problem with this driver (mv91xx.sys) with a fresh install Windows 7 Ultimate X64. After a quick search I could find out what was causing the blue screen from time to time during the boot of my computer. It was the “Marvell 9123 Disk Controller” driver in conflict with some other drivers. So I had to find the latest drivers for this controller which was not provided from the supplier (Asus) but from a third party! This is really frustrating, because companies who sell worldwide should keep their drivers section always up-to-date!!!  I managed somehow downloading the needed drivers from a third-party driver website (http://www.station-drivers.com/). I’m happy that I found such a good site like this one where we can have the latest versions of drivers. Especially, the ones that we all have problems with… So, I ended up downloading the latest drivers and update the drivers on my computer, I did not see any BSOD (Bluescreen of Death) after this update. And also, I used to have a 2-3 second freezes during the normal usage of my system. I was thinking that this was related to the same problem and after the driver update, guess what… The freeze goes away too. I now have a perfect system. I wanted to share my experience so if you guys are suffering from the same problem.

Please right click on the link and choose “save as” in order to download the latest drivers of

Marvell MV-91xx (88SE91xx) Ahci/Raid Controller
(PCI\VEN_1B4B&DEV_90xx&CC_ & PCI\VEN_1B4B&DEV_91xx&CC_)


In order to install these drivers, you have to extract the content of the .exe file into a folder with a compression application such as (WinZip, 7Zip, WinRAR) and go to “device manager” under the “Computer Management” and expand the “Storage Controller” section to see all the controllers installed in your computer. You should see the Marvell’s controller too, right-click on the “Marvell’s Controller” and choose “update driver software”. You should than point the right folder who has the latest versions of the new driver and load the new drivers. Do not forget to restart your computer after the setup.

13 February, 2011

Application Error of "CivilizationV_DX11.exe" in Steam

It has been longtime that I did not send any posts. But recently I build a new system for myself and i had a couple of annoying situations. I would like to share my bad experiences with you so you don't have to spend the amount of time that I spent to remedy your problems...

After installing Windows 7 Ultimate X64, drivers and all my applications, I tried to lunch my recently purchased game "Sid Meier's Civilization V", and it was crashing while the introduction video at the beginning of the game. I had this application crash window and Windows couldn't find any solution with it's online checkup. So I had to go trough a lot of stuff and I finally found what the real problem was. Because, I kept the necessary game files and user data for my Steam installation (by simply copying the "C:\Program Files\Steam\" folder to a external Hard Disk.), I always think that, the migration was the problem. But... There was an easy solution through Steam.
I had to "Verify Integrity of Game Cache" under the "properties" of Civilization game in Steam. Actually, this process will verify that you have all the necessary file to run the game and if there is a file is missing, it will download the missing file and update your games files. Here is the instructions;

  1. Open your Steam Application
  2. Go to "Library" Tab
  3. From the left pane, Right click on "Civilization" game and choose "Properties"
   4. As shown on the screenshot, it's necessary to click on "Verify Integrity Of Game Cahce..." button under "Local Files" tab. And it's always better to "Defragment Cache Files" after.

So, if you follow these procedures, you don't have to update your motherboards bios, GPU driver update, DirectX update, registry clean and the list goes on... You can find the actual "Event Viewer" report, at the bottom of this post,that I found in my computer when this game used to crash.

APPLICATION ERROR EVENT LOG VIEW
Log Name:      Application
Source:        Application Error
Date:          13/02/2011 4:32:50 PM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
Description:
Faulting application name: CivilizationV_DX11.exe, version: 1.0.1.167, time stamp: 0x4d301b58
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00000000
Faulting process id: 0x11a8
Faulting application start time: 0x01cbcbc57f943e52
Faulting application path: d:\games\steam\steamapps\common\sid meier's civilization v\CivilizationV_DX11.exe
Faulting module path: unknown
Report Id: ce700522-37b8-11e0-b0e7-bcaec59150e8
Event Xml:
xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 
   
    <EventID Qualifiers="0">1000EventID>
    2
    100
    0x80000000000000
    <TimeCreated SystemTime="2011-02-13T21:32:50.000000000Z" />
    <EventRecordID>2746EventRecordID>
    Application
    Kubi-PC
   
 

  <EventData>
    CivilizationV_DX11.exe
    1.0.1.167
    4d301b58
    unknown
    0.0.0.0
    00000000
    c0000005
    00000000
    11a8
    01cbcbc57f943e52
    d:\games\steam\steamapps\common\sid meier's civilization v\CivilizationV_DX11.exe
    unknown
    ce700522-37b8-11e0-b0e7-bcaec59150e8
  EventData>



Cheers... :)