Translate

20 November 2013

SQL Server Installation - license agreement cannot be located

Another problem which I had to resolve in last days. During installation of Microsoft SQL Server 2012 following error may appear

When you installing from command line
The following error occurred:
The SQL Server license agreement cannot be located for the selected edition, <VERSION>. This could be a result of corrupted media or the edition being unsupported by the media.

Error result: -2054422501
Result facility code: 1420
Result error code: 27

Please review the summary.txt log for further details
And this one when you try to install using classic GUI
SQL Server Setup has encountered the following error:

The SQL Server license agreement cannot be located for the selected edition, <VERSION>. This could be a result of corrupted media or the edition being unsupported by the media.

Error code 0x858C001B.

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&EvtType=0xFDC38F1F%25400xA40CEF17%25401420%254027

The SQL Server license agreement cannot be located
SQL Server Setup failure

Version = [Datacenter | Enterprise | Standard | Web | Business Intelligence | Workgroup | Express]


SOLUTION :


- MUI Language must also match SQL language version (even if you have for example en-US locales and en-US SQL installation media and different MUI language then you may get this error! If you need to use another MUI than SQL installation is, just switch to matched MUI corresponding with SQL installation and then after installation switch it back.
- Or use corresponding SQL language version.
- The other are for sure clear: System locales must match SQL language version - setup will detect this anyway and display correct message.

19 November 2013

How to check currently used MUI Language from command

Today I spent another time to investigate how to achieve that. I googled out lot of sites, but most of them doesn't bring desired solution, even when they discussed exactly this problem:

http://www.visualbasicscript.com/Detecting-MUI-OSLanguage-m40687.aspx
http://www.autoitscript.com/forum/topic/117085-os-display-language-switcher/
... and some other

I tried also 'systeminfo', or registry ("HKEY_CURRENT_USER\Control Panel\Desktop\MuiCached"), or even wmic and so on... All of them responded mostly with system locales or which language OS was installed originally instead of telling which MUI is used.

This one finally help:
http://social.technet.microsoft.com/Forums/en-US/35e542d7-404d-463d-bb49-6c2bd76867dd/collections-on-active-mui-language-not-os-language

Easy solution:
reg query "HKEY_CURRENT_USER\Control Panel\Desktop" -v PreferredUILanguages

If you need this to store as variable just use FOR command with /F parameter:
FOR /F "skip=1 tokens=3" %%I IN ('reg query "HKEY_CURRENT_USER\Control Panel\Desktop" /v "PreferredUILanguages"') do SET Current_MUI=%%I

Basic info about MUI:
http://en.wikipedia.org/wiki/Multilingual_User_Interface

Can't install / enable .NET Framework feature on Windows 8 / 2012

Recenly I had problem to activate .NET feature on Windows server 2012. I tried to activate this feature from server manager which is the easiest way, but this ended with this error:

The source files could not be found. Try installing the roles, roles services, or features again in a new Add Roles and Features Wizard session, and on the Confirmation page of the wizard, click "Specify an alternate source path" to specify a valid location of source files that are required for the installation. The location must be accessible by the computer account of the destination server.

Then I tried to follow instructions from that message. I specified the path to the Windows image. In my case: F:\sources\sxs. But this surprisingly ended again with same message!

Another approach: Try to install it from command line using DISM (Deployment Image Servicing and Management) with this command:

Dism /online /enable-feature /featurename:NetFx3 /All

and this one to specify the the source files:
Dism /online /enable-feature /featurename:NetFx3 /All /Source:F:\sources\sxs /LimitAccess 

Both of them ended up again with same error like in previous cases using wizard:
only difference in errorcodes:

Without source files specified: Error: 0x800f0906
With source files specified: Error: 0x800f081f

The source files could not be downloaded.
Use the "source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

Analyzing DISM log file doesn't bring any news.

Then I followed this article from Microsoft, which can somebody help, but me not: http://support.microsoft.com/kb/2734782/en-us

All these I tried under domain administrator account and under local administrator too. All the time same response. 

Working solution for me:
1. Take out server from domain
2. Login with local administrator and Enable .NET feature
3. Re-Join server in to domain

I hope that can help someone.

Windows BATCH - how to get optical drive letter (CD/DVD)

Windows Batch - Find optical drive (CD/DVD/BD)

This script lists all available optical drives available on system using WMIC and then using loop command saves last listed letter in to variable.

@Echo OFF
:: Script to find and set optical drive available on system

SETLOCAL ENABLEDELAYEDEXPANSION
SET "WMIC=WMIC path win32_logicaldisk where drivetype^=4 get caption"

FOR /F "usebackq delims=" %%i IN (`%WMIC% ^|findstr ":"`) DO SET OPT=%%i
SET OPTICAL_DRV=%OPT:~0,2%

ECHO %OPTICAL_DRV%