As a SharePoint developer I need Hyper V feature, I am using Windows 2008 R2 OS as my laptop system. Laptop hdd is 250G which is not enough. Recently I got a 1TB portable hdd from company lottery. So I start to upgrade my laptop hdd.
1. I tried DriveImage xml, the duplicated hdd cannot start OS
2. I download the diskgenius software from http://www.diskgenius.cn/download.asp and installed on Windows 2008 R2
3. Connect portable hdd to laptop and start disk 2 disk copy
4. Replace laptop hdd with the 1TB hdd
5. Resize partation using diskgenius
Share my point of working experience in SharePoint 2010/2013, Foundation and Server, On premise and Online, Office 365, Installation, Administration, Programming with C# and JavaScript, InfoPath and Workflow, Apps and etc
Friday, 18 January 2013
Saturday, 12 January 2013
SharePoint Apps development experience
Better to know this when you start to develop your SharePoint Apps
2. Javascript client object model is the core to built SharePoint Apps.
to be continued....
Friday, 11 January 2013
Update metadata field value
To update metadata field, firstly you have to find the exact value of the metadata value.
Update metadata value manually, then use the following script to find the value:
function queryitems(){
var query = "<Query>";
query += "<Where><Eq><FieldRef Name='ContentType' /><Value Type='Text'>Document</Value></Eq></Where></Query>"
$().SPServices({
operation: "GetListItems",
//webURL: window.location.protocol + "//" + window.location.host,
webURL: "https:" + "//" + url,
async: false,
listName: list,
CAMLQueryOptions: "<QueryOptions><ViewAttributes Scope='RecursiveAll' IncludeRootFolder='True' /></QueryOptions>",
CAMLQuery: query,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var liHtml = "<li>" + $(this).attr("ows_ID") + " : " + $(this).attr("ows_Year") + "</li>";
$("#tasksUL").append(liHtml);
var obj = {
itemid: $(this).attr("ows_ID"),
};
arrayid.push(obj);
});
}
});
}
Update metadata value manually, then use the following script to find the value:
function queryitems(){
var query = "<Query>";
query += "<Where><Eq><FieldRef Name='ContentType' /><Value Type='Text'>Document</Value></Eq></Where></Query>"
$().SPServices({
operation: "GetListItems",
//webURL: window.location.protocol + "//" + window.location.host,
webURL: "https:" + "//" + url,
async: false,
listName: list,
CAMLQueryOptions: "<QueryOptions><ViewAttributes Scope='RecursiveAll' IncludeRootFolder='True' /></QueryOptions>",
CAMLQuery: query,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var liHtml = "<li>" + $(this).attr("ows_ID") + " : " + $(this).attr("ows_Year") + "</li>";
$("#tasksUL").append(liHtml);
var obj = {
itemid: $(this).attr("ows_ID"),
};
arrayid.push(obj);
});
}
});
}
After get the value, in my case is: 3;#2012, I use the following script to update around 1000 items in a run:
function updateitems(){
var yearvalue="3;#2012";
var update_string = "<Batch OnError='Continue'>";
for (i=0; i<arrayid.length; i++) {
update_string += "<Method ID='"+(i+1)+"' Cmd='Update'>";
update_string += "<Field Name='ID'>"+ arrayid[i].itemid+"</Field>";
update_string += "<Field Name='Year'>"+ yearvalue +"</Field>";
update_string += "</Method>";
}
update_string += "</Batch>";
$().SPServices({
operation: "UpdateListItems",
async: false,
batchCmd: "Update",
listName: list,
updates: update_string,
webURL: "https:" + "//" + url,
completefunc: function (xData, Status) {
var liHtml = "<li>" + xData.responseText + "</li>";
$("#Updated").append(liHtml);
}
});
}
It is great ~~
Thursday, 10 January 2013
Add columns to user information list
Go to site collection root site, Site Action
>> Site Setting >> People and Groups
Go to Setting>>List setting of People and Groups
We can add more columns from here
Go to Setting>>List setting of People and Groups
We can add more columns from here
Open pdf file in a new window
In a document library, pdf, word, excel file open in the same window as view does. For word, excel still have a breadcrumb links which can navigate back, for pdf we need a solution to open it in a new window via this script:
<script>
$(“a[href$='.pdf']“).removeAttr(‘onclick’).attr(“target”,”_blank”);
< /script>
$(“a[href$='.pdf']“).removeAttr(‘onclick’).attr(“target”,”_blank”);
< /script>
Simple and efficient !
Integration services cannot upgrade HAL
Yesterday I did server replacement project. To simplify the process, I migrated the physical server windows 2003 sbs to virtual machine. Be careful on RAM installation as it has 12 slots, I guess only 6 slots are available if one processor installed, it takes me 2 hours to figure out.
After conversion, the integration services couldn't be installed on virtual server. Finally I found a easy and interesting way to solve it:
Finishing touch is:
You need to use msconfig.exe and go to boot.ini. In my case, there were two boot entries of my server2003 installation. The one with disk2vhd at the start was on top. Change it to the normal server2003 boot path and reboot the machine.
payne80 you are awesome ~~
Windows 2008 Server R2 Auto Login
I am using Windows 2008 Server R2 as my laptop OS, after joining to company domain, the auto login feature was not working any more.
Today I found a blog and made my day:
http://www.expta.com/2008/04/how-to-enable-autologon-for-windows.html
For reference I copy the commands:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d "1" /f
Run control userpasswords2
To set default Domain name
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d %USERDOMAIN% /f
Alternatively using reg file (didn't try):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultDomainName"="DomainNameGoesHere"
"DefaultUserName"="Administrator"
"DefaultPassword"="AdminPasswordGoesHere"
A craftsman who wishes to do his work well must first sharpen his tools.
There is a mission impossible on Windows 2008 R2 Server: using hibernate function on a Hyper V enabled server, please leave a message if you know how to do it, I worship you as a guru ^_^
http://www.expta.com/2008/04/how-to-enable-autologon-for-windows.html
For reference I copy the commands:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d "1" /f
Run control userpasswords2
To set default Domain name
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d %USERDOMAIN% /f
Alternatively using reg file (didn't try):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultDomainName"="DomainNameGoesHere"
"DefaultUserName"="Administrator"
"DefaultPassword"="AdminPasswordGoesHere"
A craftsman who wishes to do his work well must first sharpen his tools.
There is a mission impossible on Windows 2008 R2 Server: using hibernate function on a Hyper V enabled server, please leave a message if you know how to do it, I worship you as a guru ^_^
Customize Black Top Bar of Google in Chrome
By default Google doesn't allow user to change the top link bar, maybe they think all people are programmers as smart as them, then no worries people can customize links as well ^_^
Yeah, I finally find how to customize the top link bar as following, the way is a bit tricky to find:
1. Firstly I tried IE, I gave up because the add-in Trixie was built in 2007 and nobody support any more.
2. Then I tried Greasemonkey, found it only support Firefox.
3. Then I tried Google Extension - Big G Black Bar Sorter, as far as I know, this one only works on google.com and not for google.com.sg
4. Thanks God, I notice Chrome supports native user script as extension, which means everyone can write extension using JavaScript, wow, this is great!
Go to http://userscripts.org/ and found this guy: http://userscripts.org/scripts/show/131931, download and install, it works.
Here is another script which is simple but still working well: http://userscripts.org/scripts/review/111786
My top link bar of Chrome:
Let me know if you encounter any problems because maybe I have the same experience.
Enjoy~~
Yeah, I finally find how to customize the top link bar as following, the way is a bit tricky to find:
1. Firstly I tried IE, I gave up because the add-in Trixie was built in 2007 and nobody support any more.
2. Then I tried Greasemonkey, found it only support Firefox.
3. Then I tried Google Extension - Big G Black Bar Sorter, as far as I know, this one only works on google.com and not for google.com.sg
4. Thanks God, I notice Chrome supports native user script as extension, which means everyone can write extension using JavaScript, wow, this is great!
Go to http://userscripts.org/ and found this guy: http://userscripts.org/scripts/show/131931, download and install, it works.
Here is another script which is simple but still working well: http://userscripts.org/scripts/review/111786
My top link bar of Chrome:
Let me know if you encounter any problems because maybe I have the same experience.
Enjoy~~
Subscribe to:
Posts (Atom)

