Tuesday, January 25, 2011

How to change the listening port for Windows RDP

How do you manage multiple remote desktop connections from different users? If you dont have a dedicated remote gateway and dont want to spend any more than what you have, this solution may be the best one for your enterprise. You can have each user remotely connect to their own desktop by using port forwarding on your router specific to each user's RDP port settings. Here are steps to change the RDP listening port.

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
  1. Start Registry Editor.
  2. Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
  1. On the Edit menu, click Modify, and then click Decimal.
  2. Type the new port number, and then click OK.
  3. Quit Registry Editor.

Wednesday, January 19, 2011

How to Delete OEM Partition

Here's a procedure to delete an OEM partition. Be careful when using this tool since it will remove all data saved in the partition where this command is used.
  1. On the Start button, Run "diskpart" utility.
  2. Make sure that you select the proper hard drive where the partition is to be removed from. So to display all available hard drives, type "list disk" then hit Enter.
  3. Select the proper disk, type "select disk #" where # is the number (from 0 to 9 depending on how many disks are installed) of the disk you want to delete partition.
  4. To view all partition in the selected disk, type "list partition" then hit Enter.
  5. If you are sure that the selected disk is the one that you need to delete the OEM partition, you may now issue the delete partition, type "delete partition override" if there is only 1 partition or "delete partition 1 override" to delete the first partition.

Saturday, January 8, 2011

How to run 32 bit Application on a 64 bit OS

  1. CorFlags.exe does the trick by setting the application to run on 32 bit mode.
  2. You can search the CorFlags.exe directly from windows explorer or from the command prompt by the following command (i would prefer using the cmd prompt since we will be running the CorFlags on it).
    - Open the cmd prompt (Start -> Run -> Type "cmd" -> OK or hit Enter Key).
    - Type "cd\" then hit Enter key. (This will change your current location to the root folder or top most folder)
    - Type "DIR /S CorFlags.exe" then hit Enter Key. (This will tell your computer to search for CorFlags.exe in your entire C drive)
  3. If you are unable to find the file, you may download and install Windows or .NET SDK's from microsoft.com. My preference would be Microsoft .NET Framework SDK (64 bit version).
  4. Once installed, change directory to where the CorFlags.exe was installed using the command "CD <path>", where <path> in my case would be any of the following folders;
    - C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin
    - C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64
    - C:\Program Files\Microsoft.NET\SDK\v2.0 64bit\Bin
  5. Run CorFlags using the syntax: CorFlags <application> /force /32BIT+, where <application> is the application name including its full path.
    Example: CorFlags "C:\Program Files (x86)\Veeam\Veeam Backup and FastSCP\VeeamShell.exe" /force /32BIT+
  6. In any case you get an error message like this: corflags : error CF001 : Could not open file for writing. This can be resolved by giving write permission to the current user on the path where the application is located. For instance, in our example would be on "C:\Program Files (x86)\Veeam\Veeam Backup and FastSCP" folder.
  7. To enable write access to the current user using windows explorer;
    - Launch Windows Explorer and go the folder where the application is located.
    - Right click on the folder and select Properties. Click Security tab and then Edit button just below the Group or user names list.
    - Select Users (<pc name>/Users) then check allow Full control check box.
  8. Again run the CorFlags.exe. This time it should successfully flag the application to run on 32 bit mode.