Monday, September 24, 2012

How to Activate Product Key in Windows 8 by using WMI

I have installed windows 8 in my laptop. I was struggling to activate the product key. I found out the product key activation steps by using WMI Scripts in windows 8.

The Steps are,
1) Run command prompt with an elevated privilege (Run as Administrator).



2) To Install your Product Key by using below commands,
slmgr.vbs -ipk


3) To Activate Your Product Key by using below commands,
  slmgr.vbs -ato


Tuesday, September 18, 2012

Adding users to local administrator group on server through command line

Add a User to Local Administrator Group by using Command Line,

Syntax:-

net localgroup administrators /add domain\account

Example :-

c:\>net localgroup administrators /add bala\SPAdmin

Wednesday, August 15, 2012

ASP.NET validation controls prevent publishing pages from saving/publish in SharePoint

The situation

You have an ASP.NET controls that contains validation controls in the masterpage or page layout for a publishing site (an ASP.NET login control for example). When you try to edit and check in a publishing page you receive the following error.

This page contains content or formatting that is not valid. You can find more information in the affected sections.

The problem

Even if you fill in all the required fields on the publishing page, the validation controls on the other ASP.NET controls prevent the page from saving / Publishing.

The solution

One quick way of rectifying this problem is to place an EditModePanel with PageDisplayMode=”Display” around the controls to prevent them from displaying when the page is in edit mode. For example:

<PublishingWebControls:EditModePanel runat=server id="EditModePanel1" PageDisplayMode="Display">
<asp:Login runat="server" id="Login1"></asp:Login>
</PublishingWebControls:EditModePanel>


 This will only render the control when the page is in ‘Display’ mode so validation will not occur when users are editing the publishing page.

Tuesday, September 20, 2011

VMWare Workstation - Blank Screen on installation in windows 7


I just spent days to figuring a workaround to this issue. 

Here is what I did:

If you have another version already installed you must uninstall it like this:
  • Go to C:\Windows\Installer
  • Add the "Authors" column and sort by it
  • One of the .msi files with have a "VMware" author
  • Double-click it and follow through with the uninstall steps

Then to install the new version you must extract the installer:
  • Run cmd.exe as administrator with any method... (e.g. type cmd into the search box at the bottom of the start menu and when it shows up right-click on it and select: Run as administrator)
  • Type in "cd the-directory-where-the-install-file-is" then hit enter (e.g. c:\users\bob\downloads\)
  • Type "the-name-of-the-install-file.exe /e tempfolder"
  • Give it a few minutes or so to finish..
  • Go to that new folder (e.g. c:\users\bob\downloads\tempfolder\) and find the .msi file (for VMware Workstation it's named "vmware workstation.msi"), and run it

This worked for me. Good luck.

Sunday, September 11, 2011

How to enable debug information over exceptions on SharePoint 2010

SharePoint has always hidden the real error messages and all debug informations relating the same error, to maintain a good relationship with the final user that most often gets scared at the sight of all those written preferring the usual phrase "an error has occourred".


In WSS 3.0/MOSS 2007 to enable that informations we have to modify only the web.config related to your web application.

Instead, in SharePoint 2010, we have to modify two different web.config:
the one that you can find into the root directory of the web application in which you want to debug you customizations (the file at the path: [drive]:\inetpub\wwwroot\wss\virtualdirectories\[port])

the one that you can find into the "LAYOUTS" directory under the SharePoint root (the file at the path: [drive]:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS)

What remains unchanged from the previous version of SharePoint are the number of attribute to change in the web.config file:

The "debug" attribute of the "compilation" element has to be set to "true"

The "callstack" attribute of the "safemode" element has to be set to "true"

The "mode" attribute of the "customerrors" element has to be set to "off"