Failed to create directory C:\Program Files(x86)\Android\Android-sdk\temp – How to fix it ?

Objective :

When Trying to install new packages/updates using Android SDK Manager, We can see some errors that “Unable to Install”. So Here are some errors I got when I got when I was trying to Install android API(s) and other package by Right Click and Run the app(Normal way).

Failed to create directory C:\Program Files(x86)\Android\Android-sdk\temp

4 error faild to create directory - Copy

Error 1

URL not found: C:\Program Files (x86)\Android\android-sdk\temp\platform-tools_r25.0.5-windows.zip (Access is denied)

1 error

Error 2

How to Fix it ?

To Fix the error and Install the packages, what we have to do is Run the Android SDK Manager as Administrator..

First, go to C:\Program Files (x86)\Android\android-sdk and select SDK Manager.exe. 

Then Right Click and Run As Administrator.

5 run as administrator

Image 1 : Run as Administrator

6 loading packages

Image 2 : Loading packages

1 install ready

Image 3 : Select Packages to Install/Update

2 click install

Image 4 : Selected Packages

3 select and click install

Image 5 : Accept one by one to Install (Accept radio Button)

3 install sdk s

Image 6 : Accept all selected packages to install using “Accept Licence” radio Button

7 downloading

Image 7 : Downloading

8 finished downloading

Image 8 : Downloaded Successfully

Important

Instead of Running as Administrator by going to Program Files, You can Open Android SDK manager using Visual Studio.

It will run the Android SDK Manager as Administrator itself.

Click the …  Tools -> Android -> Android SDK Manager

9. open in vs

Image 9 : Run SDK Manager using VS as Administrator

Thanks !

Xamarin Lesson 1 – Install Xamarin with VS 2017

Video

This Video show you how to download and install Visual Studio for the development of Cross-platform mobile apps.

Please Follow the video.. To Download and Install Visual Studio 2017…

SQL Server blocked access to procedure ‘sys.xp_cmdshell’ of component ‘xp_cmdshell’ because this component is turned off as part of the security configuration for this server – How To Fix It ?

Objective

When I was trying to execute an  .exe file in my PC using xp_cmdshell command, I got an error which says the sys.xp_cmdshell component is turned off.

Ans Here is the error message…

SQL Server blocked access to procedure ‘sys.xp_cmdshell’ of component ‘xp_cmdshell’ because this component is turned off as part of the security configuration for this server.
A system administrator can enable the use of ‘xp_cmdshell’ by using sp_configure.

1 error

1 : Error messgge

Reason

By Default, xp_cmdshell is Disabled in SQL Server. So We have to enable it to use the feature.

What is xp_cmdshell  ?

Spawns a Windows command shell and passes in a string for execution. Any output is returned as rows of text.

In another way xp_cmdshell is a alternative of DOS prompt for SQL Server.

To Learn more use below link…

Reference : docs.microsoft.com

How to Fix the issue ?

Then what I did is Enable the xp_cmdshell  using SQL Server configure option.

Here are Steps to do it…

2 show advanced options

2 : Step 1 – Run  SP_Configure ‘Show advanced options’

3 re configure

3. Step 2 – Run RECONFIGURE

4 enable cmd shell

4. Step 3 – Run CONFIGURE ‘xp_cmdshell’ to Enable

In here you have top add “1” if you want to Enable the Feature. If you want to Disable the feature, then add “0”.

4 re configure again

5. Step 4 – Again Run RECONFIGURE

5 OK

6. Step 5 : Then Run the quarry you want to execute

Then the quarry will run properly.


-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1;
GO
-- To update the currently configured value for advanced options.
RECONFIGURE;
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1;
GO
-- To update the currently configured value for this feature.
RECONFIGURE;
GO

Thanks !

References :

https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/xp-cmdshell-transact-sql

https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/xp-cmdshell-server-configuration-option