Backup and Restore Outlook Express Mail and Settings
Wednesday, December 17th, 2008 | Author: ren

http://support.microsoft.com/kb/270670

Send email using IIS7 ASP
Friday, November 21st, 2008 | Author: ren

Don’t need to install 3rd party component, sample script:

<!–
    METADATA
    TYPE=“typelib”
    UUID=“CD000000-8B95-11D1-82DB-00C04FB1625D”
    NAME=“CDO for Windows 2000 Library”
–>
<%
    Set cdoConfig = CreateObject(“CDO.Configuration”)
 
    With cdoConfig.Fields
        .Item(cdoSendUsingMethod) = cdoSendUsingPort
        .Item(cdoSMTPServer) = “mail.server.com”
        .Update
    End With
 
    Set cdoMessage = CreateObject(“CDO.Message”)
 
    With cdoMessage
        Set .Configuration = cdoConfig
        .From = “aaa@abc.com”
        .To = “aaa@abc.com”
        .CC = “aaa@abc.com”
        .BCC = “aaa@abc.com”
        .Subject = “Sample CDO Message”
        .TextBody = “This is a test for CDO.message”
        .Send
    End With
 
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
 
Response.write “<HTML><head><title>A message has been sent.</title></head><body>A message has been sent.</body></HTML>”
%>
Enable IIS7 to send ASP Error to browser
Friday, November 21st, 2008 | Author: ren

3 steps:

1. Turn off HTTP Friendly Errors (IE)

2. execute the following command in command prompt:

%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

3. another command:

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpErrors -errorMode:Detailed
Hide information_schema table from users in phpMyAdmin
Friday, November 21st, 2008 | Author: ren

Add the following code to config.inc.php of the phpMyAdmin installation:

$cfg['Servers'][$i]['hide_db'] = ‘information_schema’;
Category: Database |  One Comment
Export to Excel - Specify filename
Thursday, October 30th, 2008 | Author: ren
response.ContentType=“application/vnd.ms-excel”
Response.AddHeader “content-disposition”, “attachment; filename=helloworld.xls”
Export number field as text to Excel
Thursday, October 30th, 2008 | Author: ren

to export a “number” but appears as “text” in asp-exported-excel:

<td style=“”mso-number-format:\@;“”>" & rs1("field1") & "</td>"

good for
- numeric data starts with zero
- very long digit (excel would convert it to xxxx+Exx)
- 1-2 (excel converts it to 1-02-2003)
- etc

Kill all processes for a user
Tuesday, September 16th, 2008 | Author: ren

su - user -c “kill -9 -1″

Category: Linux / Unix |  Leave a Comment
Remove pin to start menu items
Wednesday, August 27th, 2008 | Author: ren

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage

Look in the right-hand pane for a value named Favorites. This binary value defines your pinned Start menu items. You can’t edit it, but you can get rid of it and start fresh.

Cannot change wall paper, screen saver, display properties
Wednesday, August 27th, 2008 | Author: ren

Click ’start’->run and type ‘gpedit.msc’ in run window.
User configuration -> Administrative Templates ->Control Panel-> Display.

Double click on following items to open properties window and change the setting to disabled.
- Remove Display in Control Panel
- Hide Desktop Tab
- Prevent changing wallpaper
- Hide Appearance and Themes tab
- Hide Settings tab
- Hide Screen Saver tab

Change system date time
Sunday, August 24th, 2008 | Author: ren

date -s “2 OCT 2006 18:00:00″

Category: Linux / Unix |  Leave a Comment