Archive

Archive for February, 2009

Bluetooth on Laptops with Windows 2008

February 26th, 2009 2 comments

I was informed via Ishai’s blog that he has been able to find and implement the solution here to get his Bluetooth to work on Windows 2008 with hyper-V installed. Since I only use x64 Windows Server operating systems on my laptops (for the same reasons he does), I have been desprately looking to find a fix to enable Bluetooth feature on my lovely ThinkPad T61P as well.

I read through the fix and looks like there is a catch for x64 users!

Getting your Bluetooth device using WIDCOMM 5.1 drivers and patcher requires you to select “Disable Driver Signing Enforcement” EVERY time you boot (from F8 Menu) right after your BIOS post; otherwise Windows marks the driver improper and stops it from being loaded.

Windows with the hypervisor enabled doesn’t allow you to sleep or hibernate the laptop, so pressing F8 every time your computer boots up is a MAJOR bummer, then again at least this way you have an option! Better than nothing, eh?

Update March/01/09: Fellow MVP, Ben Curry pointed me to this installer (Ready Driver Plus) which takes care of the manual step. It works for me! Install, reboot, and enjoy No more driver enforcement 🙂 . I’m all for increased security (Disable Driver Signing Enforcement is NOT a good security practice ), but I guess , for now, I am going to live without it until I find a better solution. As always , please try this at your own risk!

Categories: General Tags:

Notes Field Not Getting Populated by SPUserCollection.Add Method

February 23rd, 2009 No comments

So here is the deal:

You add a user to the users collection of a site collection by calling into the SPUserCollection.Add method passing login name, email, name and notes as parameters, but notes field doesn’t get populated as you expected:

[CSharp]
using (SPSite site = new SPSite(url))
{
using (SPWeb sweb = site.OpenWeb())
{
//Ommitted Code for brevity
sweb.SiteUsers.Add(“foo\\JohnDoe”, “JohnDoe@foo.com”, “John Doe”, “Is it John Doe or John Dough?”);
//Ommitted Code for brevity
}
}
[/CSharp]

Although, using the code snippet above, the user is added correctly to the user collection of the site but notes field is always left blank. Note that in the above code, I am just adding the user to the users collection and I don’t bother adding him to any specific group at this point (for example by calling into SPWeb.Groups[groupName].AddUser). Let’s suppose that my requirement only dictates to add the user to this collection at this point and that’s all for now.

kept at each site collection level, there is this hidden list called ‘User Information List’ that stores some metadata about every and each user has ever browsed, authenticated or added to a group in that site collection . This design decision along with many other things kept at the site collection level gives countless developers a good amount of grief and frustration as you may be aware of . When a user is granted access to a site, a new list item will be created in that list. The User Information List can be accessed via the browser by navigating to /_catalogs/users/simple.aspx from your site or via Object model , only if you or your code runs under sufficient privileges. So, we can use that list for troubleshooting above issue by updating the ‘Notes’ field after the user is added. The following example shows how to interact with this list for setting the required user properties.

[CSharp]
using (SPSite site = new SPSite(url))
{
using (SPWeb sweb = site.OpenWeb())
{
//Ommitted Code for brevity
sweb.SiteUsers.Add(“foo\\JohnDoe”, “JohnDoe@foo.com”, “John Doe”,string.Empty);
user = sweb.AllUsers[“foo\\JohnDoe”];
SPList list = sweb.Lists[“User Information List”];
SPListItem userItem = list.Items.GetItemById(user.ID);
userItem[“Notes”] = “Is it John Doe or John Dough?”;
userItem.Update();
//Ommitted Code for brevity
}
}
[/CSharp]

This way you pass an empty string to the calling method (SiteUsers.Add) and update the Notes field in a separate call.

Categories: MOSS 2007 Tags: