Showing posts with label Windows 2012. Show all posts
Showing posts with label Windows 2012. Show all posts

Wednesday, December 18, 2013

Install to global assembly cache without gacutil

In Windows Server 2012 you can't install a DLL to the GAC by drag/drop, but you can do it using GACUTIL.exe.
GacUtil.exe is not present on the server by default.
You can do it using the following script instead of Gacutil.exe
Run your powershell and use command like sample below:
.\Add-AssemblyToGlobalAssemblyCache.ps1 FullPath\itegration.dll
This will applied in legacy windows versions

In Windows 2012 you can use the following PowerShell to install dll to GAC

Set-location "c:\temp"
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall("c:\temp\MyDLL.dll")
iisreset

 In Windows 2012 you can use the following PowerShell to remove dll from GAC:

Set-location "c:\temp"
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacRemove("c:\temp\MyDLL.dll")
iisreset

Tuesday, April 16, 2013

How do I disable administrator prompt in Windows 8/Windows 2012?

I want disable administrator prompt in Windows 8 and Windows 2012, For this I did the following tasks:

  1. Go to Administrative Tools → Local Security Policy
    For windows 8 run secpol.msc
  2. Find Local Policies --> Security Options, in the left side of the window, and scroll down to the button.
  3. User Account Control: Admin Approval Mode for the Built-in Administrator account Disabled. (Default) The built-in Administrator account runs all applications with full administrative privilege.