Change location of My documents with regedit

By Nisse Pettersson at May 17, 2010 11:18
Filed Under: Technical
Share on Facebook

This is something that i've came across alot of times and I think it's about time I wrote a blog post on this. It's a verry easy fix but just a tip. Use a policy if you have the ability. This is for Windows XP

In regedit change the following key.
HKEY_LOCAL_MACHINE / Software / Microsoft / Windows / Current Version / Explorer / DocFolderPaths
There is a key with the path to the folder. Change that and reboot.

That should do the trick!



Clear all connections to a Micrsoft SQL Server(MSSQL)

By Nisse Pettersson at February 17, 2010 04:32
Filed Under: Technical
Share on Facebook

Sometimes you need to clear allt he connections to the database in order to make som changes to it. I guess that there is a lot of way doing this but this one suites me.

USE master;
GO
ALTER DATABASE [databaseName]
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE [databaseName]
SET MULTI_USER;
GO

 

Found it on this site



Uninstall button missing in Windows Vista

By Nisse Pettersson at January 03, 2010 07:44
Filed Under: Technical
Share on Facebook

When you click the application you wish to uninstall in Add/remove programs under control panel you need to reset the folder views in vista. Follow these steps.

  1. Open RegEdit
  2. Browse to HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\
  3. Remove Bags registry key
  4. Remove BagMRU registry key
  5. Close RegEdit
  6. Log off, restart
  7. Login and go to folder options, make sure remember each folder's view settings
  8. Restart computer.

This 8 steps is quite simple. I found the solution on this blog.



Implement ObjectListView in your Winforms application

By Nisse Pettersson at January 02, 2010 06:02
Filed Under: Code
Share on Facebook

I'm developing an inventory software and I was using a listview component. But I do need to be able to change the sorting. Microsft have whitepaper on how to do this. Started reading and then gave up. Did a google search and found ObjectListView. Love at first sight!

This DLL-package is what I was looking for and it's a really nice application. NOTE: This is an open source and is licensed under GPL

Since the getting started guide on their homepage is awsome i'll just link to that page. Get it on!

Technorati-taggar: ,,


Force removal of Visual Studio 2008

By Nisse Pettersson at December 06, 2009 23:37
Filed Under: Technical
Share on Facebook

I've canceled my installation of Visual Studio 2008 and when I now try to install it again I get an error and can't continue. Can't unistall either so I found a tool supplied by Microsoft. It will remove all the components so that I can run the installation again.

Microsoft Visual Studio 2008 RC/RTM uninstall tool



Change CD-Key in Windows Server environment

By Nisse Pettersson at November 30, 2009 01:45
Filed Under: Technical
Share on Facebook

If you need to change your KEY for Windows 2008 server there is a nice way to do this.

   1. Open the command prompt and change working directory to System32 directory
   2. Type in slmgr.vbs -ckms (this clears and KMS entry you may have)
   3. Type slmgr.vbs -upk (this removes any product key installed)
   4. Type slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx (where the x's is the new product key you want to use )
   5. Type slmgr.vbs -ato (this activates the server)

 

To do the same thing in Windows 2003 server follow these instructions.

  • Click Start, and then click Run.
  • In the Open box, type Regedit, and then click OK.
  • In the left pane, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents
  • In the right pane, right-click OOBETimer, and then click Modify.
  • Change at least one digit of this value to deactivate Windows.
  • Click Start, and then click Run.
  • In the Open box, type the following command, and then click OK.
    %systemroot%\system32\oobe\msoobe.exe /a
    1. Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.
    2. Click Change Product key.
    3. Type the new product key in the New key boxes, and then click Update. If you are returned to the previous window, click Remind me later, and then restart the computer.
    4. Repeat steps 6 and 7 to verify that Windows is activated. You receive the following message:Windows is already activated. Click OK to exit.
    5. Click OK.
    6. Install SP1 for Windows XP.

    If you cannot restart Windows after you install SP1, press F8 when you restart the computer, select Last Known Good Configuration, and then repeat this procedure.

     



  • Connect to Vsphere 4 with windows 7

    By Nisse Pettersson at November 19, 2009 05:35
    Filed Under: Technical
    Share on Facebook

    UPDATE:

    If you go to VmWares download site you can download the latest version with built in support for Windows 7.

    If you would like to try out windows 7 you should since it's a great OS. But if you like me need to connect to VmWare's VsPhere 4 you need to read this post. It's taken from a tread at vmware communities.

    In short this is what you need to do is the following:

    1. Obtain a copy of %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\System.dll from a non Windows 7

    machine that has .NET 3.5 SP1 installed.

    2. Create a folder in the Windows 7 machine where the vSphere client is installed and copy the file from step 1 into this folder. For example, create the folder under the vSphere client launcher installation directory (+%ProgramFiles%\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib+).

    3. In the vSphere client launcher directory, open the VpxClient.exe.config file in a text editor and add a <runtime> element and a <developmentMode> element as shown below. Save the file.

    <?xml version="1.0" encoding="utf-8"?> 
    <configuration> 
    ... 
    <runtime> 
    <developmentMode developerInstallation="true"/> 
    </runtime> 
    </configuration> 

    3. Create a batch file (e.g. *VpxClient.cmd*) in a suitable location. In this file add a command to set the DEVPATH environment variable to the folder where you copied the System.dll assembly in step 2 and a second command to launch the vSphere client. Save the file. For example,

    SET DEVPATH=%ProgramFiles%\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib
    "%ProgramFiles%\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\VpxClient.exe"

    4. (Optional) Replace the shortcut on the start menu to point to the batch file created in the previous step. Change the shortcut properties to run minimized so that the command window is not shown.

    You can now use the VpxClient.cmd (or the shortcut) to launch the vSphere client in Windows 7.

    Note that this workaround bypasses the normal .NET Framework loading mechanism so that assembly versions in the DEVPATH folder are no longer checked. Handle with care.

    I've attached the DLL-file so you don't have to look around for the file.

    Technorati-taggar: ,,,,

     

    System.dll.zip (1.05 mb)



    Migrate to Windows Small Business Server 2008

    By Nisse Pettersson at October 23, 2009 00:15
    Filed Under: Technical
    Share on Facebook

    I'm migrating a Small Business Server 2003 to Small Business Server 2008 and I hit a problem. The source server is in English and the target server is in Swedish. You need to run sourcetool.exe to prepare the source server AD Schema. This tools fails if you take the tools folder from a Swedish media. (or any other than the language of the source server). The error you get is UnableToModifyError(6)

    I found the solution after a few hours of Google. Change the name of the folder called sv-se located in the adprep folder. In my case I change from sv-se to en-us. Then run the sourcetool.exe again with success.

    Big thanks to this blog and this thread. Saved my day!



    Transient Multimon Manager

    By Nisse Pettersson at October 15, 2009 01:45
    Filed Under: Technical
    Share on Facebook

    My work laptop is a HP 6730b and i'm not that pleased with it. Especially when I place it in the dock and power it up. The problem is that I need to have the laptop open and to login with the laptop. Then I can close the lid. If I don't follow this procedure I wont get the desired effect. I've thought this is a HP problem since I did not experience this at all with my last Fujitsu Lifebook.

    Then I found some articles about Transiet Multimon Manager and how this is a service in Vista that helps me with my displays or at least it tries to help me.

    Toms hardware explains this service in short.
    Transient Multi-Monitor Manager or  Transient Multimon Manager (TMM) is a cool Windows Vista Feature that simplifies the setup of display configurations on mobile computers.Windows Vista Transient Multimon Manager is targeted at improving the user experience of connecting and disconnecting external displays Transient Multimon Manager (TMM) can place a mobile computer display (for example, a laptop computer display) into clone view when a new monitor is detected.TMM is enabled by default in Windows Vista. TMM automatically finds external displays at boot, it can also remember settings of the same external display if you connect it later.If you are not using an external monitor, or don't switch back and forth always then turn TMM off.This is the 2-3 second delay followed by a blank black screen as Windows Vista searches for monitor changes when you startup Vista.

    So I need to start my computer without having it in the docking station and then logon and afterwards place it in the dock. Before I had to restart my computer to get the external screen working.

    Conclusion is that Microsoft have made feature that work for persons who have a docking station at work and then work at home sometimes and always shutting their PC down. I use my computer alot and when I leave one customer i hibernate or put the computer in sleep mode. So this is a nice feature for some but not implemented right. In other words a normal windows feature.



    How to move you offline folders files in Windows 2000 / XP

    By Nisse Pettersson at September 15, 2009 03:22
    Filed Under: Technical
    Share on Facebook

    If you are in the need of moving the contents of the %systemroot%\csc folder for some reason(lack of space on C:) you need to use a tools called cachemov.exe. I found this very easy but harder to find the actual tool.

    Download the file below unzip and run. It will ask you for which partition to store the files on and then the waiting game starts. This does only work in Windows 2000 and Windows XP. There are some DLL-files missing if you try running the file in Vista and i guess Windows7.

    cachemov.zip (46.95 kb)