Posts

Showing posts from November, 2009

Run Windows apps faster

Computer Management "compmgmt.msc" Internet Information Services "inetmgr" Services "services.msc" Device Manager "devmgmt.msc" Microsoft Management Console "mmc" Event Viewer "eventvwr" Disk Management "diskmgmt.msc" Shared Folders Management "fsmgmt.msc" Local Group Policy Management "gpedit.msc" Explorer Window WinBtn+E Show Desktop WinBtn+D Run WinBtn+R mywebsite to www.mywebsite.com (IE) Ctrl+Enter

Linux Samba Sharing Microsoft Network

//create client session Smbclient –L //servidor –U utilizador //montar pasta da rede na pasta local “partilha” do utilizador local “ubuntupc” Smbmount //servidor/public /home/ubuntopc/partilha –o username=ubuntopc //remover pasta de rede previamente montada na pasta local “partilha” Smbumount /home/ubuntupc/partilha //definir password de acesso à partilha Smbpasswd -a add user -d deactivate user -e activate user -r change password -U change username -x remove user from file these commands might need downloading: "sudo apt-get install smbmount"

C++ / C# / Ajax Code

Dozens of issues I've had. Errors, warnings and ways to fix them. Download C++ Code Snippets Download C# Code Snippets

Linux Apps and Code

Download linux_manuals.zip

Change Motherboard, same OS / Boot Emulation Software

Enable chipset changes avoiding BSODs. Run Windows PE, Hiren's Boot CD, or some other Boot Emulation system and run WinMBoardMig.exe Works on XP SP1/SP2. Might work on others. Windows Motherboard Migration with WinMBoardMig.zip Download Hiren's Boot CD Download BartPE

Download SharePoint Designer 2010

SharePoint Designer 2010 - Download 32 bit version - Download 64 bit version Notes: - WSS3/MOSS 2007 only works with SharePoint designer 2007 - WSS4/SP SERVER 2010 only works with SharePoint designer 2010 - You must use a build of SPD2010 equal or earlier than the build of Foundation/Server (4006.1010 conflicts with 4514.1007) - Data transfer uses client's dinamic TCP ports (2400, 2579, etc). Make sure SPD is added to firewall exceptions. Enable some of these ports if nothing else works. - If your system has 32 bit versions of Office apps installed, you need 32bit version of SPDesigner 2010 or you'll get an error saying "you have these XXX 32bit office apps. please uninstall them in order to install 64bit app version or download 32 bit version" - It IS possible to have both 2007 and 2010 installed side-by-side (if same 32/64 bit version) If you try to open a WSS3/MOSS 2007 website with SPD 2010, you will get: "This web site has been configured to disallow editing...

PowerShell | Create New SPWebApplication + New SPSite

My thanks go to Arpah Shah's great video mms | URL #this code creates a new web application in specified port Write-Host "Please specify the Farm Administrator credentials" $FarmCredential = Get-Credential "Administrator" $NewPort = Read-Host -Prompt "Please Insert New Port for Web Application" $spfarm = get-spfarm if($spfarm -ne $null) { $SPManagedAccount = Get-SPManagedAccount $FarmCredential.UserName Write-Host "Creating New Web Application" $webApp = New-SPWebApplication -Name "SharePoint - $NewPort" -ApplicationPool "SharePoint - $NewPort" -ApplicationPoolAccount $SPManagedAccount $new_website=New-SPSite -url "http://localhost:$NewPort" -OwnerAlias $FarmCredential.Username -Language 1033 -Template "STS#0" } Make a new web application, one line code: PS C:\Users\jdoe> New-SPWebApplication -Name Contoso Internet Site -Port 80 -HostHeader http://sharepoint.contoso.com -URL https://www.contoso.c...

SharePoint 2010 Management with PowerShell from the Outside - Walkthrough

SharePoint 2010 and PowerShell are united to allow running virtually any command from from a command-line interface, and even, from a remote computer that's not even inside the server's domain. Objective: Run SharePoint Commands from any Remote PC Requirements: Windows PowerShell V2 (CTP3) Windows Remote Management - WinRM (CTP3) Needed Configurations #ENABLE WinRM > Net Start WinRM > Enable-PSRemoting > Set-WSManQuickConfig #Create HTTPS listener winrm create winrm/config/listener?Address=*+Transport=HTTPS @{Hostname="DESTINY_HOSTNAME";CertificateThumbprint="7fd53c46a38c60c089f3ab3451258f917011c655"} CertificateThumbprint can be found running mmc, > File, Add Snapp-in > Certificates, Add > Personal, Certificates > Double Click certificate, Details, Certificate, Thumbprint > Select all, copy to notepad > Delete all white-spaces and ? characters, leave only numbers and leters #set trusted hosts on origin computer #ORIGIN HOST MUST ...

Upgrading an Existing Master Page to SP Foundation

take your master page and make it sp 2010 compatible, adding the ribbon and a few more changes http://msdn.microsoft.com/en-us/library/ee539981(office.14).aspx

VMWare Inscrease Disk Size

cd "C:\Program Files (x86)\VMware\VMware Workstation" vmware-vdiskmanager.exe -x 30GB "C:\Users\Administrator\Desktop\Appz\VMs\VMWare\WServer64bitR1\Windows Server 2008 x64 Edition (experimental).vmdk" Import disk into Secondary VM, run it Run diskmgmt.msc , pick disk to extend and click extend on the context menu

SharePoint Foundation 2010 Beta Install | SQL database errors

Error: "Failed to create Configuration Database" Possible W2008R2 solution: Reinstall prerequisites Possible Windows 7 Solution: Uninstall Geneva Framework and install newer version (possibly need do download it manuall) "(For SP Foundation) The required Geneva Framework is 0.5.1(Beta 1). For SharePoint 2010, a new build of Geneva (1.0.xx) is required." http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/b3d31931-9d6b-4b68-8f7b-d8df55601beb

SharePoint 2010 Beta | Too much errors

Before anything, check if you're doing everything right. Here's a detailed howto instruction manual for SP installation. http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx As it says, "If your developer workstation is set up with the Windows Server 2008 Service Pack 2 or Windows Server 2008 R2 operating system, to install SharePoint 2010 you only have to run the PrerequisiteInstaller.exe tool, which is included with SharePoint 2010 to install the prerequisites that SharePoint needs, and then run Setup.exe. However, you cannot use PrerequisiteInstaller.exe on Windows 7 or Windows Vista ." At this point, Microsoft Windows Server 2008 64bit SP2 Release 1 seems to be the best choice, for both host and virtual workstation solutions. Although R2 may work, it is not supported yet, so SP Foundation does install fine but SharePoint 2010 most possibly won't. Still, I describe some solutions to possible issues below. W2008SERVER INSTALL PROCEDURE - Install Pr...

SharePoint WSS/Foundation VS MOSS/Server

Image
WSS 3 VS MOSS 2007 like they say at Miles Consulting, here's a "short list of key differentiating features and functions " http://www.milesconsultingcorp.com/SharePoint-Portal-2007-Version-Comparison-between-MOSS2007-and-WSS3.aspx SharePoint Foundation 2010 (not in) VS SharePoint Server Enterprise 2010 - Enterprise Search - Excel Services - User profiles (My Sites) - Social Data - Enterprise Content Management (ECM) - Improved Business Connectivity Services (BCS) SharePoint Foundation 2010 Features here SharePoint Server Enterprise 2010 Features here For more info, check out Alex Schulz blog at http://blogs.msdn.com/alexschulz/default.aspx

SP 2010 Beta Download

ENTERPRISE http://www.microsoft.com/downloads/details.aspx?FamilyID=77c30c6c-47fc-416d-88e7-8122534b3f37&DisplayLang=en&displaylang=en ENTERPRISE FOR INTERNET SITES http://www.microsoft.com/downloads/details.aspx?FamilyID=77195785-0282-4acc-b6f4-7569e1011581&DisplayLang=en&displaylang=en DEVELOPER WALKTHROUGHS http://msdn.microsoft.com/pt-pt/vstudio/dd441784(en-us).aspx DOCUMENTATION SHAREPOINT FOUNDATION 2010 (kown previously as WSS): here SHAREPOINT 2010 (known previously as MOSS): here

PowerShell | HTTP Request/Response

[string]$url="http://IWantToPostHere.com/something" [System.Net.httpWebRequest] $req = [System.Net.webRequest]::create($url) $req.method = "POST" $req.ContentType = "application/x-www-form-urlencoded" $req.ContentLength = $buffer.length $req.TimeOut = 5000 $reqst = $req.getRequestStream() $reqst.write($buffer, 0, $buffer.length) $reqst.flush() #writes stuff overboard $reqst.close() #this code is not catched, errors will not show pretty, but you know whats happening [System.Net.httpWebResponse] $res = $req.getResponse() $resst = $res.getResponseStream() $sr = new-object IO.StreamReader($resst) $result = $sr.ReadToEnd() write-host "`nHTTP Response is " $result http://msdn.microsoft.com/en-us/magazine/cc507642.aspx

Google API Going Crazy

Inserting a new row in a spreadsheet with Google API as been one of the greteast achievements of my entire life! PowerShel WAY ;-) STEPS: 1) WEBCLIENT request, with credentials, for https login page, receive "Auth" 2) convert received data to string 3) regex string, retrive all content after "Auth=" 4) HTTP POST or other requests for CRUD options, send Auth in header with name "Authorization" and value "GoogleLogin auth=$auth" 5) call getstream and write data to buffer and flush POST Headers: # auth is retrived from previous https request with valid credentials # for full code, contact me $httpreq.Headers.Add("Authorization","GoogleLogin auth=$auth") $httpreq.Headers.Add("GData-Version","3.0") [string]$myxml=" <entry xmlns='http://www.w3.org/2005/Atom' <xmlns:gsx='http://schemas.google.com/spreadsheets/2006/extended'> <gsx:column1>1</gsx:column1> <gsx:col...

Are you ready? [SP2010]

Image
Sneak Peak Video

DNN 4/5 | Keeps returning to localhost

Image
One of the most common issues in DNN are aliases. Once you install DNN to a give domain, it will use it once you connect to the portal. You can have several aliases in IIS, but they only redirect to that one domain. So the fix is kind of easy: - Download and run "SQL Server Management Studio Express" if you don't have it yet - Attach the DNN database in your_directory/dotnetnuke_community_your_version/app_data/database.mdf - Open table dbo.PortalAlias - Edit HTTPAlias field That's it!

SharePoint ActiveX | Inherits color from body

You want this .body { background-color: #000; } but you get this for free: - ActiveX controls appear black (color is inherited from body) I tried everything: - Adding "params" to Upload.aspx - rewriting activex script - creating css classes But nothing worked but the fix many people are using: .body { background-color: #fff; } form#aspnetform { background-color: #000; } or simply .bodyclass { background-color: #000; } //add class="bodyclass" to masterpage's form tag

Add Network Printer / Driver missing

I recently ran into this issue: My computer running Windows 2008 Server HP 920C connected to a computer of the network When I double click the printer on the explorer at \\computer_with_printer I get something like "no driver for this version of windows", which was making me crazy since I couldn't find drivers of this printer for 64bit windows 2008 server Now I found out its as simple as: - Add Printer - Add a Local Printer - Create a New Port - Chose "Local Port" on "Type of Port" - In the Port Name dialog box, type the path of the printer by using the following syntax: \\print server name\printer name You should be good to go http://support.microsoft.com/default.aspx?scid=kb;EN-US;895612