Search This Blog

January 16, 2008

Before upgrading from Windows XP / Win2k3 to Windows Vista/ Windows Server 2008, we need to uninstall Windows Powershell first

Today I find one interesting issue. If you have Windows Powershell install on Windows XP / Windows Server 2003 and if you want to upgrade to Windows Vista / Windows Server 2008, the upgrade wizard will tell you that you need to uninstall Windows Powershell first. Where can you uninstall Windows Powershell?

















There are 2 ways to do so. One is to go to Add or Remove Programs, select “show updates”, and you can uninstall it.















The other one is to go to C:\WINDOWS\$NtUninstallKB926139$\spuninst, double click spuninst.exe, and then you can uninstall it. You can also use the command line to uninstall Windows Powershell as follows:
C:\WINDOWS\$NtUninstallKB926139$\spuninst\ spuninst.exe /q

After the upgrade, Windows Powershell is not installed on windows Vista / Windows Server 2008. If you still need it, you need to install it again.
















For Windows Vista, you need to download Windows Powershell Vista version in Microsoft website.

For Windows Server 2008, Windows Powershell is part of the windows components. You can see use the following command line to install it.

ServerManagerCmd.exe /install PowerShell

Do you think Windows Powershell is an interesting issue?

Using command lines to turn off/on UAC on Windows Vista

I know lots of people hate UAC and want to turn it off on Windows Vista. You can just write the command line to turn off/on UAC and reboot your PC. How to do it?

Turn off UAC:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

Turn on UAC:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

Reboot: shutdown –r

After you run UAC and reboot command lines, your PC will cause reboot automatically. Everything will be fine. Is that easy for you?

January 13, 2008

3 failed login attempts block your account—a good idea?

If you go to some famous online websites, you need to login to your account using your username and password. But if you use the wrong password to login 3 times, your account will be blocked. You need to call the customer service representative and get the new password to login again. Is it a good idea to set the policy of 3 failed login attempts?

Just imagine this situation. If a hacker is very familiar with using the tool to try different username and password during 2 hours in ABC Company, do you think it is easy for him to block other people’s accounts? Do you think the account owners will blame ABC Company?

January 9, 2008

SQL Server 2005: Data files are always under MSSQL.n\MSSQL\Data folder

If you use UI or command line to install SQL server 2005, data files are placed under MSSQL.n\MSSQL\Data .

If you specify INSTALLSQLDATADIR=”C:\mydata” and try to put data files under mydata folder, you probably feel disappointed.

After the install, it generates the path MSSQL.1\MSSQL\Data and attaches it to the above path; finally it becomes: “C:\mydata\MSSQL.1\MSSQL\Data”.

From this article (http://msdn2.microsoft.com/en-us/library/ms345408.aspx), master and resource DBs must be in the same location:

The Resource database depends on the location of the master database. If you move the master database, you must also move the Resource database to the same location as the master data file. Do not put the Resource database in either compressed or encrypted NTFS file system folders. Doing so will hinder performance and prevent upgrades.

Do you think it is an interesting issue?