最新日志

Linux 下 vi 的基本操作


/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-font-kerning:1.0pt;}

1、 修改一个文件

#vi 文件名【回车】或#vim

2、 插入字符

按下键盘“i”键,进入Insert状态

3、 删除字符

Del键或Backspace

4、 退出编辑状态

如果在编辑状态,如Insert,按Esc键退出编辑状态,如Insert

5、 保存文件

退出编辑状态,按下组合键 shift+; (即输入:),输入w【回车】

如需要保存并退出,则输入 wq【回车】

6、 不保存退出

退出编辑状态,按下组合键 shift+; (即输入:),输入q【回车】

如已经修改过文件,则输入q!【回车】

7、 搜索字符

退出编辑状态,按下 / 键,输入要搜索的字符【回车】

在非编辑状态下,按下 n 键,查找下一个搜索结果


/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-font-kerning:1.0pt;}

8、 查看行号

:se number

Linux常用命令

注:CentOS下测试

查看硬盘
#df -lh

系统设置
#setup

查看已安装软件 [查看是否安装]
#rpm -qa [软件名称]

注销、退出
#logout
#exit

关机、重启
#shutdown
#reboot

查看当前登录用户
#who

添加组、添加用户
#groupadd
#useradd

修改密码
#passwd <username>

查看时间、修改日期、修改时间
#date
#date -s 12/31/2012
#date -s 10:31

查看时区
#more /etc/sysconfig/clock

查看cpu
#cat /proc/cpuinfo

查看进程
#ps -aux

终止进程
#kill -9 PID编号

查看系统版本
#lsb_release -a

查看内核
#uname -a

从user用户到root用户
$su
输入密码后从$转入#

查看IP地址
#ifconfig

操作服务
#service 服务名 sart|stop|restart...启动、停止 、重启某用户
如:#service iptables stop 停止防火墙

WPF中实现Loading动画

知道WPF的人都知道,要在WPF上播放GIF图片是一件非常麻烦的事(找开源控件除外),如果单纯的想整一个Loading动画,去找开源控件那就有点浪费了。下面是一个WPF实现Loading动画的例子。

1、首先找到一张Loading图片,如下面这张,它是一张png图片
loading

2、在XAML添加这张图片

<Image x:Name="image" Source="/TestWpf;component/Images/loading.png" Width="66" Height="66" RenderTransformOrigin="0.5,0.5">
 <Image.RenderTransform>
  <TransformGroup>
   <ScaleTransform ScaleX="1" ScaleY="1"/>
   <SkewTransform AngleX="0" AngleY="0"/>
   <RotateTransform Angle="0"/>
   <TranslateTransform X="0" Y="0"/>
  </TransformGroup>
 </Image.RenderTransform>
</Image>

如上,图片控件名称为 image ,图片原来是TestWpf项目中Images目录的loading.png,宽和高都为66,RenderTransformOrigin表示图片旋转的中心点,x和y皆为0.5表示,以图片正中转为中心点进行自动旋转。
TransformGroup里面是一些图片的属性:
ScaleTransform:图片沿水平或垂直方向拉伸或收缩对象
SkewTransform:图片倾斜或扭曲
RotateTransform:旋转的角度
TranslateTransform:图片偏移

3、设置Storyboard动画场景,在Window.Resource(用户控件则使用UserControl.Resouce)中添加Storyboard:

<Storyboard x:Key="RotateIcon" RepeatBehavior="Forever">
 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
  <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  <SplineDoubleKeyFrame KeySpline="0,0,0,0" KeyTime="00:00:01.0000000" Value="360"/>
 </DoubleAnimationUsingKeyFrames>
</Storyboard>

RepeatBehavior:重复
Storyboard.TargetName:针对控件名称
Storyboard.TargetProperty:针对控件的属性,以上设置的是旋转角度
SplineDoubleKeyFrame:实现角度变换 1)在00:00:00时为0度 2)在00:00:01时为360

 4、开始动画及结束动画

C#代码:开始动画

 BeginStoryboard(this.FindResource("RotateIcon") as System.Windows.Media.Animation.Storyboard);

C#代码:结束动画

(this.FindResource("RotateIcon") as System.Windows.Media.Animation.Storyboard).Stop();

C#中发送POST请求

/// <summary>
/// Web请求
/// </summary>
/// <param name="url">网址</param>
/// <param name="postData">Post数据,格式如:username=111&password=222</param>
/// <returns></returns>
private static string PostWebRequest(string url, string postData)
{
 try
 {
//编码
  byte[] byteArray = Encoding.UTF8.GetBytes(postData);

//创建Web请求 
 HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(new Uri(url));
//使用系统设置的代理
  webRequest.Proxy = System.Net.WebRequest.GetSystemWebProxy();
  //webRequest.CookieContainer = 这里设置Cookie;
//请求方式为POST
  webRequest.Method = "POST";

  webRequest.ContentType = "application/x-www-form-urlencoded";
  webRequest.ContentLength = byteArray.Length;
  Stream newStream = webRequest.GetRequestStream();

  newStream.Write(byteArray, 0, byteArray.Length);
  newStream.Close();

  HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();
  StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.Default);
  return sr.ReadToEnd();
 }
 catch (Exception ex)
 {
  return "";
 }
}

wpf 进度条ProgressBar的使用

 XAML

 <ProgressBar x:Name="pbProgress"></ProgressBar>

 

 CS

//设置进度
pbProgress.Dispatcher.Invoke(new Action<System.Windows.DependencyProperty, object>(pbProgress.SetValue),  System.Windows.Threading.DispatcherPriority.Background, ProgressBar.ValueProperty, 100);//1-100 double类型

regsvr32 注册dll时提示LoadLibrary失败

LoadLibrary("x:\xxx.dll")失败-由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 

 判断可能是 Microsoft Visual C++ Redistributable 版本问题。

据我所知 vcredist_x86.exe 三个版本:

Microsoft Visual C++ 2005 Redistributable

Microsoft Visual C++ 2008 Redistributable

Microsoft Visual C++ 2010 Redistributable

FireFox下载文件,文件名乱码问题


Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment;filename=" + file.FileName);
Response.BinaryWrite(file.FileContent);
Response.Flush();
Response.End();

IE:
Response.AddHeader("Content-Disposition", "attachment;filename=" + file.FileName);//修改为HttpUtility.UrlEncode(file.FileName) 或 server.urlencode

FireFox:
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + System.IO.Path.GetFileName(file.FileName) + "\"");

android 无法自动关闭屏幕

最近发现我的G1无法自动关闭屏幕,手机耗电严重

由于最近安装了钛备份,怀疑可能是该软件的问题,启动程序细细查看,果然如此

运行钛备份,进入偏好设置,修改WakeLocks mode为Disabled

退出程序,关闭屏幕,按任意键打开,屏幕打开时是锁屏,不解锁N秒后可自动关闭屏幕,应该是解决了。。。

Inno Setup中创建Web虚拟目录

function CreateIIS() : Boolean;
var
  IIS, WebSite, WebServer, WebRoot, VDir: Variant;
  ErrorCode: Integer;
begin
  if MsgBox( CustomMessage('connecttoiis') + '''' + IISServerName + '''' + CustomMessage('createvirtualdir') , mbInformation, mb_YesNo) = idNo then
    Exit;

  { Create the main IIS COM Automation object }

  try
    IIS := CreateOleObject('IISNamespace');
  except
    RaiseException(CustomMessage('iisneed') + #13#13 '(''' + GetExceptionMessage + ''')');
  end;

  { Connect to the IIS server }

  WebSite := IIS.GetObject('IIsWebService', IISServerName + '/w3svc');
  WebServer := WebSite.GetObject('IIsWebServer', IISServerNumber);
  WebRoot := WebServer.GetObject('IIsWebVirtualDir', 'Root');

  { (Re)create a virtual dir }
  {-- 创建 web --}
  try
    WebRoot.Delete('IIsWebVirtualDir', 'aaaa');
    WebRoot.SetInfo();
  except
  end;

  VDir := WebRoot.Create('IIsWebVirtualDir', 'aaaa');
  VDir.AccessRead := True;
  VDir.AppFriendlyName := 'aaaa Web';
  VDir.Path := ExpandConstant('{app}\aaaa);
//创建http头
  VDir.HttpCustomHeaders := ['X-Powered-By:ASP.NET','P3P:CP="CAO PSA OUR"'];
  VDir.AppCreate(True);
  VDir.SetInfo();

 Result := true;
end;

Inno Setup中的组件安装

定义安装项目组件:

;组件
[Components]
;组件:aaa
Name: "aaa"; Description: "aaaa"; Types: full
;组件:bbb
Name: "bbb"; Description: "bbbb"; Types: full
;组件:ccc
Name: "ccc"; Description: "cccc"; Types: full
;组件:ddd
Name: "ddd"; Description: "dddd"; Types: full

安装时检测:

procedure CurStepChanged(CurStep: TSetupStep);
var
   iisdirok:Boolean;
   inst_aaa:Boolean;
   inst_bbb:Boolean;
begin
  if CurStep=ssPostInstall then
  begin
    inst_aaa:= IsComponentSelected(aaa);
    inst_bbb:= IsComponentSelected(bbb);
    //do ...
end;

 

替换HTML文件上传控件

原理:将 fileup 控件设为透明,鼠标移动到自定义按钮上,则会将 fileup 的浏览按钮移动到鼠标位置

<input type="file" style="position:absolute;filter:alpha(opacity=0);width:10px;opacity:0;cursor: pointer;" id="fileup1" onchange="sFile.value=this.value" hidefocus> 
修改 opacity (0为全透明,第1个opacity为IE,第2个opacity为FF)查看原理。

<html> 
 <head> 
  <title>添加附件</title> 
 </head> 
 <body class="body"> 
<script type="text/javascript"> 
function fclick(id,e)
{  
 var obj= document.getElementById(id);
 var element=e.srcElement || e.target;
 obj.style.posTop=element.offsetTop;

 var x = (e.x||e.clientX) - obj.offsetWidth/2;
 if(x<element.offsetLeft)
  x=element.offsetLeft;
 if(x>element.offsetLeft+element.offsetWidth-obj.offsetWidth)
  x=element.offsetLeft+element.offsetWidth-obj.offsetWidth;
 obj.style.left = x + "px";

}  
</script> 
  <style> 
   input{border:1px solid #333333;color:#666666;background:#eeeeee;font:normal 12px Tahoma;height:18px}  
  </style> 
   <input id="sFile" type='text'> 
   <input type="button" onmouseover="fclick('fileup1',event)" value="选择上传文件" style="cursor: pointer;"/> 
   <input type="file" style="position:absolute;filter:alpha(opacity=0);width:10px;opacity:0;cursor: pointer;" id="fileup1" onchange="sFile.value=this.value" hidefocus> 
 </body> 

</html> 

山寨Alert And Confirm Box

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> 山寨Alert And Confirm Box </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
 </HEAD>

 <BODY>
  <div id="MaskDiv" style="position:absolute;z-index:30000;margin:0 0 0 0;padding:0 0 0 0;display:none;left:0px;top:0px;right:0px;bottom:0px;background:#cccccc;filter:alpha(opacity=30);opacity:0.3;"></div>
  <div id="AlertDiv" style="z-index:40000;position:absolute;padding:0px;background:#fff;border-color:#8CA85A;border-width:1px;border-style:solid;width:300px;height:100px;display:none;text-align:center"></div>

  <a href="javascript:ShowAlert('独立提示框');">独立提示框</a><br/>
  <a href="javascript:ShowAlert('独立提示框,确定后执行', 'alert(&quot;OK&quot;)');">独立提示框,确定后执行</a><br/>
  <a href="javascript:ShowConfirm('独立提示框,确定或取消后执行', 'alert(&quot;OK&quot;)', 'alert(&quot;Cancel&quot;)');">独立提示框,确定或取消后执行</a>

  <script>
  //alert div
  var AlertDiv = document.getElementById("AlertDiv");
  //mask div
  var MaskDiv = document.getElementById("MaskDiv");
  var Temp_Lang_Title = "提示信息";
  var Temp_Lang_OK = "   确定   ";
  var Temp_Lang_Cancel = "   取消   ";
  function ShowAlert(str)
  {
   ShowAlert(str, null);
  }
  function ShowAlert(str, yes)
  {
   ShowAlertBox(1, str, yes, null);
  }
  function ShowConfirm(str, yes, no)
  {
   ShowAlertBox(2, str, yes, no);
  }
  function ShowAlertBox(type, str, yes, no)
  {
   if(AlertDiv && str!="")
   {
    var a_title_bg = "blue"; //background color
    var a_title_fc = "white";//font color
    var a_title_content = Temp_Lang_Title;//title content
    var a_image = "light.png";//image
    var a_ok = Temp_Lang_OK;//ok
    var a_cancle = Temp_Lang_Cancel;//cancel
    var myhtml = "<table width='100%' height='100%' border='0'><tr height='20' style='background:"+a_title_bg+";color:"+a_title_fc+";'><td>"+a_title_content+"</td></tr><tr><td valign='top' style='padding:5px'><img src='"+a_image+"' /> " + str + "</td></tr><tr height='25px'><td align='center' id='btnTD'></td></tr></table>";

    AlertDiv.innerHTML = myhtml;

    var btnTD = document.getElementById("btnTD");
    if(type==1)
    {
     var btn = document.createElement("input");
     btn.id = "btn_DefaultButton";
     btn.type="button";
     btn.value=a_ok;
     btn.style.height = "20px";
     if(document.all)
     {
      btn.attachEvent('onclick', function(){if(yes){eval(yes);}ShowAlertBox(0,'',null,null);});
     }
     else
     {
      btn.onclick =  function(){if(yes){eval(yes);}ShowAlertBox(0,'',null,null);};
     }
     btnTD.appendChild(btn);
    }
    else
    {
     var btn1 = document.createElement("input");
     btn1.id = "btn_DefaultButton";
     btn1.type="button";
     btn1.value=a_ok;
     btn1.style.height = "20px";
     if(document.all)
     {
      btn1.attachEvent('onclick', function(){if(yes){eval(yes);}ShowAlertBox(0,'',null,null);});
     }
     else
     {
      btn1.onclick =  function(){if(yes){eval(yes);}ShowAlertBox(0,'',null,null);};
     }

     btnTD.appendChild(btn1);

     var btn2 = document.createElement("input");
     btn2.type="button";
     btn2.value=a_cancle;
     btn2.style.height = "20px";
     if(document.all)
     {
      btn2.attachEvent('onclick', function(){if(no){eval(no);}ShowAlertBox(0,'',null,null);});
     }
     else
     {
      btn2.onclick =  function(){if(no){eval(no);}ShowAlertBox(0,'',null,null);};
     }

     btnTD.appendChild(btn2);
    }
    //Qiu@20101221: alert div position
    var tmp_H = document.compatMode=="CSS1Compat" ? document.documentElement.clientHeight : document.body.clientHeight;
    var tmp_W = document.compatMode=="CSS1Compat" ? document.documentElement.clientWidth : document.body.clientWidth;
    var tmp_SL = document.compatMode=="CSS1Compat" ? document.documentElement.scrollLeft : document.body.scrollLeft;
    var tmp_ST = document.compatMode=="CSS1Compat" ? document.documentElement.scrollTop : document.body.scrollTop;
    MaskDiv.style.height = tmp_H;
    MaskDiv.style.width = tmp_W;
    MaskDiv.style.display = "";
    AlertDiv.style.display = "";
    AlertDiv.style.left = ((tmp_W/2) - (AlertDiv.offsetWidth/2)) ;// + (e.offsetWidth));
    var DivTop = 100;
    if(!document.all)
     DivTop = ((tmp_H/2) - (AlertDiv.offsetHeight/2)  - 50);
    else
     DivTop = ((tmp_H/2) - (AlertDiv.offsetHeight/2) - 40);

    AlertDiv.style.top = DivTop;
    //Qiu@20101221: focus the default button
    setTimeout(function(){
     var temp = document.getElementById("btn_DefaultButton");
     if(temp)temp.focus();
    },500);
   }
   else
   {
    //Qiu@20101221: hide alert div
    AlertDiv.innerHTML = "";
    MaskDiv.style.display = "none";
    AlertDiv.style.display = "none";
   }
  }
  </script>
 </BODY>
</HTML>

WPF, 关于ComboBox事件打开的Popup无法隐藏的问题

近期在做版本划分提示框的时候遇到这么一个问题:
 
系统禁用了免费版的用户不能改变某个值,而这个值在界面上是通过ComboBox改变,当用户没有权限并且改变了combobox的值,则弹出Popup提示,但是在实现的时候发现,由combobox_selectionchanged触发打开的popup无法隐藏(点击空白地方隐藏popup,其他控件的click等事件没有这个问题)。
 
解决方法:
使用其他线程打开popup
Dispatcher.BeginInvoke(DispatcherPriority.ContextIdle, (ThreadStart)delegate
{
 popLines.PlacementTarget = COMBOBOX1;
 popLines.IsOpen = true;
});
 
 
问题的原因暂时没有找,有兴趣可以google

WPF,手动绑定资源及获取控件所绑定的资源

最近在实现一个COPY控件的时候遇到一个问题,由于原控件绑定了多语言的资源,而复制控件时需要考虑多语言的问题

在实现过程中,发现有两个问题比较有难度,一个是如何通过后台代码绑定资源到控件,一个是如何获得控件所绑定的资源名称

以下为具体的实现方法:

1、通过代码绑定资源到控件

CheckBox cb = new CheckBox()
cb.SetResourceReference(ContentProperty, "Key");

 
2、获取控件绑定的资源

var obj = temp_cbx.ReadLocalValue(CheckBox.ContentProperty);
if (obj != null)
{

//获取资源类型
 Type type = obj.GetType();
//获取ResourceKey属性
 PropertyInfo ifno = type.GetProperty("ResourceKey");
//获取ResourceKey属性的值
 string resKey = ifno.GetValue(obj, null).ToString();
}

自动创建 Office Outlook 邮箱帐号

 本文介绍的是Office Outlook邮箱帐号的导入方式,Outlook Express帐号导入相对简单,自己google

本文内容在 Windows 7 + Office Outlook 2007 SP2 环境下测试通过

使用PRF方式将帐号导入到Office Outlook中,以下是一个普通的Outlook PRF文件,在代码后面是简单的说明

;Automatically generated PRF file from the Microsoft Office Customization and Installation Wizard
; **************************************************************
; Section 1 - Profile Defaults
; **************************************************************
[General]
Custom=1
ProfileName=Outlook
DefaultProfile=Yes
OverwriteProfile=Append
ModifyDefaultProfileIfPresent=FALSE

; **************************************************************
; Section 2 - Services in Profile
; **************************************************************

[Service List]
;ServiceX=Microsoft Outlook Client
Service1=Outlook Address Book

;***************************************************************
; Section 3 - List of internet accounts
;***************************************************************

[Internet Account List]
Account1=I_Mail

;***************************************************************
; Section 4 - Default values for each service.
;***************************************************************

;[ServiceX]
[Service1]

;FormDirectoryPage=
;-- The URL of Exchange Web Services Form Directory page used to create Web forms.
;WebServicesLocation=
;-- The URL of Exchange Web Services page used to display unknown forms.
;ComposeWithWebServices=
;-- Set to TRUE to use Exchange Web Services to compose forms.
;PromptWhenUsingWebServices=
;-- Set to TRUE to use Exchange Web Services to display unknown forms.
;OpenWithWebServices=
;-- Set to TRUE to prompt user before opening unknown forms when using Exchange Web Services.
;***************************************************************
; Section 5 - Values for each internet account.
;***************************************************************

[Account1]
UniqueService=No
AccountName=livechatadmin
POP3Server=mail.35.cn
SMTPServer=mail.35.cn
POP3UserName=livechatadmin@china-channel.com
EmailAddress=livechatadmin@china-channel.com
POP3UseSPA=0
DisplayName=LC Admin
ReplyEMailAddress=
SMTPUseAuth=1
SMTPAuthMethod=0
ConnectionType=0
LeaveOnServer=0x1
ConnectionOID=MyConnection
POP3Port=110
POP3UseSSL=0
ServerTimeOut=60
SMTPPort=25
SMTPUseSSL=0
;***************************************************************
; Section 6 - Mapping for profile properties
;***************************************************************

[Microsoft Exchange Server]
ServiceName=MSEMS
MDBGUID=5494A1C0297F101BA58708002B2A2517
MailboxName=PT_STRING8,0x6607
HomeServer=PT_STRING8,0x6608
OfflineAddressBookPath=PT_STRING8,0x660E
OfflineFolderPath=PT_STRING8,0x6610

[Exchange Global Section]
SectionGUID=13dbb0c8aa05101a9bb000aa002fc45a
MailboxName=PT_STRING8,0x6607
HomeServer=PT_STRING8,0x6608
RPCoverHTTPflags=PT_LONG,0x6623
RPCProxyServer=PT_UNICODE,0x6622
RPCProxyPrincipalName=PT_UNICODE,0x6625
RPCProxyAuthScheme=PT_LONG,0x6627
CachedExchangeConfigFlags=PT_LONG,0x6629

[Microsoft Mail]
ServiceName=MSFS
ServerPath=PT_STRING8,0x6600
Mailbox=PT_STRING8,0x6601
Password=PT_STRING8,0x67f0
RememberPassword=PT_BOOLEAN,0x6606
ConnectionType=PT_LONG,0x6603
UseSessionLog=PT_BOOLEAN,0x6604
SessionLogPath=PT_STRING8,0x6605
EnableUpload=PT_BOOLEAN,0x6620
EnableDownload=PT_BOOLEAN,0x6621
UploadMask=PT_LONG,0x6622
NetBiosNotification=PT_BOOLEAN,0x6623
NewMailPollInterval=PT_STRING8,0x6624
DisplayGalOnly=PT_BOOLEAN,0x6625
UseHeadersOnLAN=PT_BOOLEAN,0x6630
UseLocalAdressBookOnLAN=PT_BOOLEAN,0x6631
UseExternalToHelpDeliverOnLAN=PT_BOOLEAN,0x6632
UseHeadersOnRAS=PT_BOOLEAN,0x6640
UseLocalAdressBookOnRAS=PT_BOOLEAN,0x6641
UseExternalToHelpDeliverOnRAS=PT_BOOLEAN,0x6639
ConnectOnStartup=PT_BOOLEAN,0x6642
DisconnectAfterRetrieveHeaders=PT_BOOLEAN,0x6643
DisconnectAfterRetrieveMail=PT_BOOLEAN,0x6644
DisconnectOnExit=PT_BOOLEAN,0x6645
DefaultDialupConnectionName=PT_STRING8,0x6646
DialupRetryCount=PT_STRING8,0x6648
DialupRetryDelay=PT_STRING8,0x6649

[Personal Folders]
ServiceName=MSPST MS
Name=PT_STRING8,0x3001
PathToPersonalFolders=PT_STRING8,0x6700
RememberPassword=PT_BOOLEAN,0x6701
EncryptionType=PT_LONG,0x6702
Password=PT_STRING8,0x6703

[Unicode Personal Folders]
ServiceName=MSUPST MS
Name=PT_UNICODE,0x3001
PathToPersonalFolders=PT_STRING8,0x6700
RememberPassword=PT_BOOLEAN,0x6701
EncryptionType=PT_LONG,0x6702
Password=PT_STRING8,0x6703

[Outlook Address Book]
ServiceName=CONTAB

[LDAP Directory]
ServiceName=EMABLT
ServerName=PT_STRING8,0x6600
UserName=PT_STRING8,0x6602
UseSSL=PT_BOOLEAN,0x6613
UseSPA=PT_BOOLEAN,0x6615
DisableVLV=PT_LONG,0x6616
DisplayName=PT_STRING8,0x3001
ConnectionPort=PT_STRING8,0x6601
SearchTimeout=PT_STRING8,0x6607
MaxEntriesReturned=PT_STRING8,0x6608
SearchBase=PT_STRING8,0x6603

[Microsoft Outlook Client]
SectionGUID=0a0d020000000000c000000000000046
FormDirectoryPage=PT_STRING8,0x0270
WebServicesLocation=PT_STRING8,0x0271
ComposeWithWebServices=PT_BOOLEAN,0x0272
PromptWhenUsingWebServices=PT_BOOLEAN,0x0273
OpenWithWebServices=PT_BOOLEAN,0x0274
CachedExchangeMode=PT_LONG,0x041f
CachedExchangeSlowDetect=PT_BOOLEAN,0x0420

[Personal Address Book]
ServiceName=MSPST AB
NameOfPAB=PT_STRING8,0x001e3001
Path=PT_STRING8,0x001e6600
ShowNamesBy=PT_LONG,0x00036601

; ************************************************************************
; Section 7 - Mapping for internet account properties.  DO NOT MODIFY.
; ************************************************************************

[I_Mail]
AccountType=POP3
;--- POP3 Account Settings ---
AccountName=PT_UNICODE,0x0002
DisplayName=PT_UNICODE,0x000B
EmailAddress=PT_UNICODE,0x000C
;--- POP3 Account Settings ---
POP3Server=PT_UNICODE,0x0100
POP3UserName=PT_UNICODE,0x0101
POP3UseSPA=PT_LONG,0x0108
Organization=PT_UNICODE,0x0107
ReplyEmailAddress=PT_UNICODE,0x0103
POP3Port=PT_LONG,0x0104
POP3UseSSL=PT_LONG,0x0105
; --- SMTP Account Settings ---
SMTPServer=PT_UNICODE,0x0200
SMTPUseAuth=PT_LONG,0x0203
SMTPAuthMethod=PT_LONG,0x0208
SMTPUserName=PT_UNICODE,0x0204
SMTPUseSPA=PT_LONG,0x0207
ConnectionType=PT_LONG,0x000F
ConnectionOID=PT_UNICODE,0x0010
SMTPPort=PT_LONG,0x0201
SMTPUseSSL=PT_LONG,0x0202
ServerTimeOut=PT_LONG,0x0209
LeaveOnServer=PT_LONG,0x1000

[IMAP_I_Mail]
AccountType=IMAP
;--- IMAP Account Settings ---
AccountName=PT_UNICODE,0x0002
DisplayName=PT_UNICODE,0x000B
EmailAddress=PT_UNICODE,0x000C
;--- IMAP Account Settings ---
IMAPServer=PT_UNICODE,0x0100
IMAPUserName=PT_UNICODE,0x0101
IMAPUseSPA=PT_LONG,0x0108
Organization=PT_UNICODE,0x0107
ReplyEmailAddress=PT_UNICODE,0x0103
IMAPPort=PT_LONG,0x0104
IMAPUseSSL=PT_LONG,0x0105
; --- SMTP Account Settings ---
SMTPServer=PT_UNICODE,0x0200
SMTPUseAuth=PT_LONG,0x0203
SMTPAuthMethod=PT_LONG,0x0208
SMTPUserName=PT_UNICODE,0x0204
SMTPUseSPA=PT_LONG,0x0207
ConnectionType=PT_LONG,0x000F
ConnectionOID=PT_UNICODE,0x0010
SMTPPort=PT_LONG,0x0201
SMTPUseSSL=PT_LONG,0x0202
ServerTimeOut=PT_LONG,0x0209
CheckNewImap=PT_LONG,0x1100
RootFolder=PT_UNICODE,0x1101

[INET_HTTP]
AccountType=HOTMAIL
Account=PT_UNICODE,0x0002
HttpServer=PT_UNICODE,0x0100
UserName=PT_UNICODE,0x0101
Organization=PT_UNICODE,0x0107
UseSPA=PT_LONG,0x0108
TimeOut=PT_LONG,0x0209
Reply=PT_UNICODE,0x0103
EmailAddress=PT_UNICODE,0x000C
FullName=PT_UNICODE,0x000B
Connection Type=PT_LONG,0x000F
ConnectOID=PT_UNICODE,0x0010

 

 说明信息:

关于全局设置
[General]
...
DefaultProfile=No  ;设为默认帐户
OverwriteProfile=Append  ;覆盖方式,Append为添加,Yes为覆盖Outlook默许帐户设置
...
[Account1]
...
AccountName=livechatadmin   ;显示的名称
POP3Server=mail.35.cn               ; pop服务器
SMTPServer=mail.35.cn               ;smtp服务器
POP3UserName=livechatadmin@china-channel.com            ;用户名
EmailAddress=livechatadmin@china-channel.com                ;邮箱地址
POP3UseSPA=0
DisplayName=LC Admin                                                                       ;发件人姓名
ReplyEMailAddress=
SMTPUseAuth=1
SMTPAuthMethod=0
ConnectionType=0
LeaveOnServer=0x1                                                                              ;在服务器保留副本 0x0为否 0x1为是
ConnectionOID=MyConnection
POP3Port=110
POP3UseSSL=0
ServerTimeOut=60
SMTPPort=25
SMTPUseSSL=0

 

 PRF使用方式:

 %ProgramFiles%\Microsoft Offlice\Office版本\outlook.exe /importprf "x:\1.prf"

得到OpenID
使用OpenID提供商
35OpenID 35OpenID MyOpenID MyOpenID Flickr Flickr
Google Google Yahoo Yahoo! AOL AOL
Blogger Blogger LiveJournal LiveJournal Verisign Verisign
ClaimID ClaimID Technorati Technorati Vidoop Vidoop
OpenID OpenID 帮助
您还没有登录,请登录后继续操作。
提示:您必需打开Cookie才能使用本系统
请输入您的 OpenID OpenID 登录:
例如:http://yourname.openid.35.com
close