Preventing your system from getting auto locked


Within most of the organization, there is a default setting that after a few minutes have escaped, the system gets locked itself, if system is left unattended. Well to prevent this i have written a small utility (windows application) which periodically sends user input to the system, making it to believe that some mouse movement has been made and thus stopping the system from getting locked.

Here we would be calling SendInput function within user32.dll

The SendInput function synthesizes keystrokes, mouse motions, and button clicks and that is what we need.

http://msdn.microsoft.com/en-us/library/ms646310.aspx

This is useful in case we are giving presentation or else reading some documents …

Following is the code for the same

1) Create a new windows application in C#

2) Add a button named btn_Unlock to it and a timer control named timer1.

3) Set enabled to false and interval to 120000 for timer control.

4) Put the following code to your form class


public partial class frmKU : Form

{

public
frmKU()

{

InitializeComponent();

}

[DllImport(“User32.dll”, SetLastError = true)]

public static extern int SendInput(int
nInputs, ref INPUT
pInputs, int cbSize);

public struct INPUT

{

public
int type;

public
MOUSEINPUT mi;

}

public struct MOUSEINPUT

{

public
int dx;

public
int dy;

public
int mouseData;

public
int dwFlags;

public
int time;

public
int dwExtraInfo;

}

// Call the
API

int
resSendInput;

private
void btnUnlock_Click(object
sender, EventArgs e)

{

timer1.Enabled = true;

INPUT
input = new INPUT();

resSendInput = SendInput(5, ref input, Marshal.SizeOf(input));

}

private
void timer1_Tick(object
sender, EventArgs e)

{

INPUT
input = new INPUT();

resSendInput = SendInput(5, ref input, Marshal.SizeOf(input));

}

}

 

Bye …

Passed Exam MB2-634: CRM 4.0 Extending Microsoft Dynamics


Today I cleared the extension exam for Microsoft Dynamics CRM 4.0 with score of 82.

For version 3.0 the number of questions were 40 and passing score was 80.

This time around for version 4.0 there were 50 questions but how much is the passing score it wasn’t mentioned anywhere.

For preparation i used the the course material 8969 and CRM as a Rapid Development Platform book.

CRM as a Rapid Development Platform – I found this book really very useful..

Although from exam point of view the course material 8969 is more than enough !!!

Bye ..

Retrieving the COM class factory for component with CLSID {3D42CCB1-4665-4620-92A3-478F47389230} failed due to the following error: 8007042d.


I got this error while trying to perform a backup within backup and restore inside operations of Central Administration site.

I checked services on server within operations and it was showing that all the services had started, but on checking at services.msc i found out that the following service hadn’t started

Office SharePoint Server Search, after starting this service, the error got resolved.

Find more information over here

http://social.technet.microsoft.com/forums/en-US/sharepointgeneral/thread/dc1db06b-ac78-4547-b28d-a0d1efab3b80

Bye

Customizing Export to spreadsheet in Survery or Adding columns for export to excel in Survey (Sharepoint)


We wanted to have created column value in the excel sheet for our survey responses. We modified the existing view to include the created column and then selected the option of Export to SpreadSheet. But it was not including the created column.

 

So the solution for this was to

 

Select All Responses View than

Site Actions – Edit Page – Modify the shared web part – Edit the current view – Than selecting the created column and copying the url of that page

 

http://servername:12345/_layouts/viewedit.aspx?List=%7B545889CC%2D1BE0%2D463D%2DBAA2%2D6DBEC360BA68%7D&View=%7B107DCB6B%2D83D8%2D439C%2D8996%2DF1B7782C8062%7D&Source=http%3A%2F%2Fd%2D1246%3A12345%2FLists%2FDemoSurvey%2FAllItems%2Easpx%3FPageView%3DShared

 

Get the id of the view

%7B107DCB6B%2D83D8%2D439C%2D8996%2DF1B7782C8062%7D

Which is

107DCB6B-83D8-439C-8996-F1B7782C8062

 

%7B is equal to {

%7D is equal to }

%2D is equal to –

 

Go back to survey, click on Action – Export to spreadsheet – Save the query to your machine and make the following changes in the query

 

WEB1

http://d-1246:12345/_vti_bin/owssvr.dll?

XMLDATA=1

&List={545889CC-1BE0-463D-BAA2-6DBEC360BA68}

&View={ED178AE0-E856-47FD-AB02-E1566F30E400}

&RowLimit=0&RootFolder=%2fLists%2fDemoSurvey

Selection={545889CC-1BE0-463D-BAA2-6DBEC360BA68}-{ED178AE0-E856-47FD-AB02-E1566F30E400}

EditWebPage=

Formatting=None

PreFormattedTextToColumns=True

ConsecutiveDelimitersAsOne=True

SingleBlockTextImport=False

DisableDateRecognition=False

DisableRedirections=False

SharePointApplication=http://d-1246:12345/_vti_bin

SharePointListView={ED178AE0-E856-47FD-AB02-E1566F30E400}

SharePointListName={545889CC-1BE0-463D-BAA2-6DBEC360BA68}

RootFolder=/Lists/DemoSurvey

 

 

Replace the above value with the value of your view i.e. 107DCB6B-83D8-439C-8996-F1B7782C8062.

 

Now when you will open this query it will show all the columns specified by you in the view.

 

Another option could be to use Data View web part for it and adding the required column to it through sharepoint designer. And than right clicking on it and selecting Export to Microsoft Excel from the context menu of the IE.

 

Bye

Creating custom views on Survey in Sharepoint


For other lists within sharepoint we have an option of
creating our own custom views.

(Settings-CreateView).

However we have no such option in case of Survey. To create
our own custom view in case of survey we can do the following

First get the id of your survey. For this select view source
of the following page

http://servername:12345/Lists/DemoSurvey/overview.aspx
of your survey.

You can get the id of the survey at following line

href=”/_layouts/listfeed.aspx?List=545889cc%2D1be0%2D463d%2Dbaa2%2D6dbec360ba68″

The id of the survey list is – 545889cc%2D1be0%2D463d%2Dbaa2%2D6dbec360ba68

Or

545889cc-1be0-463d-baa2-6dbec360ba68

%2D is equal to

Now we need the url where in we
will use the above list id for creating custom view

For this create a simple IssueTracking
list or any other list for which we have an option of creating custom view.

Now select setting–>create
view for that newly created list

Copy the url

http://servername:12345/_layouts/ViewType.aspx?List==%7B59C5C613%2D11FB%2D44D8%2DB29E%2DC973006C062A%7D&Source=http%3A%2F%2Fd%2D1246%3A12345%2FLists%2FDemo%2520tasks%2FAllItems%2Easpx

Get this much part of the url

http://servername:12345/_layouts/ViewType.aspx?List==%7B59C5C613%2D11FB%2D44D8%2DB29E%2DC973006C062A%7D

%7B is equal to {

%7D is equal to }

Modify it in the following manner

http://servername:12345/_layouts/ViewType.aspx?List={545889cc%2D1be0%2D463d%2Dbaa2%2D6dbec360ba68}

or

http:// servername:12345:12345/_layouts/ViewType.aspx?List={545889cc-1be0-463d%2Dbaa2-6dbec360ba68}

i.e replace the list id.

Now you should be able to create your own custom views on surveys

The request failed with HTTP status 401: Unauthorized. Mandatory updates for Microsoft Dynamics CRM could not be applied successfully


We faced this problem while installing  CRM outlook client in one of our laptops.

I  followed the instructions mentioned below which i found while searching for the same.

On the client computer open the control panel.
Open the User Accounts icon.
Click the Advanced tab.
Click Manage Passwords.
Click Add.
Enter the server name of the CRM server
Enter the username as domain\username
Enter the password.
Click OK, then click Close and then click OK.

 

On the client open IE, click the Tools menu and then click Internet Options.
Click the Security tab.
Click the Local Intranet icon.
Click the Sites button.
Click the Advanced button.
Enter the website for access Microsoft CRM and then click the Add button.
Click OK 3 times.
Close any open IE sessions.

The problem got solved for us !

Bye..

Nishant Rana's Weblog

Everything related to Microsoft .NET Technology

Skip to content ↓