Wednesday, May 13, 2015

Get SQL management Studio installed on a STIGGed box

Problem:
My work system is locked down but I have the responsiblity to manage several SQL servers and to develop TSQL for my projects.  Sounds like a job for SQL Managment Studio, heh?  Well not if you
want to get SeDebugPrivilege on your work box!!!!!  GPOs denied my account this priv so no love running the exe package.

Solution:

1.) Download the bits:

en_sql_server_2012_express_management_studio_with_service_pack_2_x86_4385973.exe

2.) Add your admin account to local admins group on the box where you want to use MS.
3.) Grab a copy of ntrights.exe 2012,

4.) Run cmd.exe as elevated admin account.
5.) Execute this command in the cmd session

ntrights.exe -u "BUILTIN\Administrators" +r SeDebugPrivilege
 
6.)Now run the exe you downloaded in step 1.
 
Your done!
 
 
Source:
1.)http://pwrshell.net/attribuer-des-privileges-locaux/
2.)NtRights.exe is part of Windows Resource Kit.
 

Thursday, May 7, 2015

How to Wrap Text in a Monotouch/Xamarin UILabel

Doing some UI work on our iPhone app and still trying to remember what the UI supports.
I had an issue with how to wrap text in a UILabel field.  Fortunately, Xamarin forums has some great recipes.

What I needed was (UILineBreakMode.WordWrap)

Solution

var descriptionField = new UILabel(new RectangleF(10, 45, 300, 140));
descriptionField.LineBreakMode = UILineBreakMode.WordWrap;
descriptionField.Lines = 10;
descriptionField.BackgroundColor = UIColor.Gray;
Add(descriptionField);


Source:
http://developer.xamarin.com/recipes/ios/standard_controls/labels/uilabel-truncate-wrap-text/