20090720 wordpress tags 删除
SIMPLE TAGS 修改
SIMPLE TAG功能很强大,可是默认是整个页面搜索TAG,我习惯标题直接放了,并且整个页面搜索内容实在太多,生成的TAG也太多。
修改:D:\PhpNow\htdocs\wp\wp-content\plugins\simple-tags\2.7\inc
simple-tags.admin
// Get objects
global $wpdb;
$objects = (array) $wpdb->get_results(“SELECT p.ID, p.post_title, p.post_title FROM {$wpdb->posts} p WHERE {$post_type_sql} ORDER BY ID DESC LIMIT {$n}, 20″);
直接把P.POST_COMMENT也改为POST_TITLE,让它搜索两次标题
~
突然无法批量从管理页面删除TAG,点击删除后整个页面就白了。刷新返回后,TAG又出现了。找了找资料,看了看数据。折腾下,直接从数据库里面把所有TAG干掉了。
TAG总共关系到三个表
select a.* FROM `wp_term_relationships` a, wp_term_taxonomy b, wp_terms c WHERE a.term_taxonomy_id = b.term_taxonomy_id AND c.term_id = b.term_id AND b.taxonomy = ‘post_tag’ //找出所有TAG
delete
FROM `wp_term_relationships`
WHERE term_taxonomy_id in (select term_taxonomy_id from wp_term_taxonomy
where taxonomy = ‘post_tag’) 删除
可是服务器上居然是MYSQL 4.0,不支持嵌套SELELCT,只好改
select wp_term_relationships.* from wp_term_relationships
LEFT JOIN wp_term_taxonomy ON wp_term_relationships.term_taxonomy_id=wp_term_taxonomy.term_taxonomy_id
where wp_term_relationships.term_taxonomy_id is not NULL and wp_term_taxonomy.taxonomy = ‘post_tag’
wp_term_relationships这是POST ID和term_taxonomy_id关联
SELECT wp_terms . *
FROM wp_terms, wp_term_taxonomy
WHERE wp_terms.term_id = wp_term_taxonomy.term_id
AND wp_term_taxonomy.taxonomy = ‘post_tag’ and wp_terms.term_id >20
wp_term_taxonomy 是 TAG ID和 term_taxonomy_id 关联
wp_terms 存放每个ID的名称等
标签:tag, word, wordpress, 删除20071228 gridview 筛选 编辑 删除
http://www.yippeesoft.com
http://blog.csdn.net/aricc/archive/2007/04/05/1552657.aspx
出错啦!!
错误类型:UnauthorizedAccessException
错误信息:Access to the path \’D:\\CSDN Web Site\\CSDN Blog\\NewDottext\\DottextWeb\\HTML\\BlogConfig\\DD\\43\\27\\Aricc.xml\’ is denied.
GridView-Search Control
By Chris Hambleton
http://www.codeproject.com/KB/custom-controls/GridViewSearch.aspx?msg=2149976
Search control with basic/advanced modes for DataTable filtering capabilities
扩展GridView控件(全)——增加10个常用功能
http://www.xieker.com/txt/37104.htm
Extended GridView Control
In this article Bilal Haidar explains in detail an extended GridView control developed based on the GridView control that ships with ASP.NET 2.0. Also discussed are important features of this new GridView: the built-in context menu row-based and the Filter textbox to filter the GridView\’s rows.
ASP.NET Futures初探——动态数据控件(Dynamic Data Control):入门
ASP.NET Futures CTP中的动态数据控件(Dynamic Data Control)简直成了ASP.NET版本的Ruby on Rails——无需配置、无须代码、无需任何干预——只要一个控件,一个完整的数据驱动程序就搞定了。动态数据控件将自动搜寻项目中的数据库,自动选择与页面文件名相同的数据表,自动提供列表显示、详细内容显示、过滤、分页、排序、添加、删除、编辑、修改以及RSS等功能——没错,所有都是自动的——只要一个控件,甚至都不用任何设置!非常有意思的同时也极其有用!
http://www.cnblogs.com/dflying/archive/2007/05/15/746574.html
GridView 控件使用不完全指南!
http://kk2000.cnblogs.com/archive/2006/03/04/342942.html
GridView在分页(翻页)时filter(过虑,FilterExpression)失效问题的解决方法
TestPage.aspx.cs
protected void Page_Load(object sender, EventArgs e)
&leftsign;
this.Rebind();
&rightsign;
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
&leftsign;
DropDownList d = (DropDownList)sender;
ViewState["filter"] = "Country = \’" + d.SelectedValue + "\’";
Response.Write("<br>filter changes to : "+Convert.ToString(ViewState["filter"]));
this.Rebind();
&rightsign;
protected void Rebind()
&leftsign;
string filter = Convert.ToString(ViewState["filter"]);
Response.Write("<br>applied filter is : " +filter);
SqlDataSource1.FilterExpression = filter;
GridView1.DataBind();
&rightsign;
数据源的FilterExpression 在回调时并不能保存,所以得人工来保存这个值,以保持FilterExpression 。
sqldatasource的FilterExpression用法
http://blog.csdn.net/hzleihuan/archive/2006/12/07/1433110.aspx
这样就可以。
<script language="javascript">
function okClick()
&leftsign;
Form1.btnAdd.disabled = true;
document.all["runing"].style.display = "";
Form1.btnOk.click();
&rightsign;
</script>
<form id="Form1" runat="server">
<span id="runing" style="DISPLAY: none; Z-INDEX: 100; LEFT: 116px; VERTICAL-ALIGN: middle; WIDTH: 200px; COLOR: #990000; POSITION: absolute; TOP: 45px; HEIGHT: 30px; BACKGROUND-COLOR: white; TEXT-ALIGN: center"><IMG src="../images/runing.gif"></span>
<script>document.all["runing"].style.left=(document.body.clientWidth-200)/2</script>
<asp:button id="btnOk" runat="server" Text="增 加"><input type="button" value="增加" name="btnAdd" onclick="okClick()">
One of the goals that Microsoft has really pushed for in ASP.NET 2.0 is saving the amount of coding necessary to perform common tasks such as data access. On a recent project, I needed the ability to filter the results on a GridView control after I returned the results from my datasource. To accomplish this, I added a DropDownList and set the AutoPostBack property on the DropDownList to True. I added two values to the list; one that showed all of the results, and one that showed the filtered result set which in my case was a list of exceptions. I also added a SqlDataSource object called MySqlDataSource. I set the OnChange event to a subroutine similar to below:
Private Sub FilterDropDownList_Change(s as Object, e as EventArgs)
If FilterDropDownList.SelectedValue = "Filter" then
MySqlDataSource.FilterExpression = "MyColumn=1"
Else
MySqlDataSource.FilterExpression = "
End If
MyGridView.DataBind
End Sub
I added the sub MyGridView.DataBind to the subroutine because this subroutine occurs after the SqlDataSource object is created and the resultset is filled. In reality, you only need to perform the MyGridView.DataBind when the FilterExpression value is set to something other than ".
ASP.NET 2.0 Tutorials : GridView Filtering
http://www.exforsys.com/tutorials/asp.net-2.0/asp.net-2.0-gridview-filtering/1.html
Ok i found a solution for this.
Basically you need to reset the filter on page load.
What i did is i added a hidden text box that holds the SqlDataSource1.FilterExpression value. And on page load if its a postback, i just re apply it…
SqlDataSource1.FilterExpression = txtFilter.Text;
and viola! fixes the edit and also the paging problem (caused by the same thing).
found the solution here:
Peace,
Mikey
Edit Gridview After Filter applied (using an SQLDataSource)
06-27-2007, 2:57 PM
Contact
Reply
http://forums.asp.net/p/1127136/1775869.aspx
Filtering and Editing in GridView (.NET 2.0)
http://www.thescripts.com/forum/thread442691.html
Search from a Textbox-Display with a GridView
http://aspnet101.com/aspnet101/aspnet/codesample.aspx?code=searchGridView#next
Programming ASP.NET中文版(第3版)
在DataSet中创建DataRelations
http://book.csdn.net/bookfiles/184/1001848409.shtml
http://ditiedetiaozao.blog.163.com/blog/static/18041287200782465031736/
GridView控件
每次通过detailsview添加后的数据并不当时显示,而必须重新载入页面(redirect)才能显示,貌似延迟似的。我看网上人家在后台写什么page.ispostback,还有的自己写控件事件,反思一下,其实根源是viewstate。由于gridview在第一次load时就读取了数据源的数据,之后每次事实上读的是viewstate。
我把@page的EnableViewState设置为false,一切就解决了
标签:gridview, 删除, 编辑20070710 打印机 端口 删除 不同 网段 共享
http://www.yippeesoft.com
不同网段机器,可以PING通,不能共享打印机
WINDOWS默认防火墙可以Ping通,说明两机之间可以通讯,可能的问题是XP本身的防火墙,如果你加了例外(文件及打印机共享),范围默认值是本网段,即自己所在的子网,要改成所有计算机就可以了。
打印机端口
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Ports]
"COM1:"="9600,n,8,1"
"COM2:"="9600,n,8,1"
"COM3:"="9600,n,8,1"
"COM4:"="9600,n,8,1"
"FILE:"=""
"LPT1:"=""
"LPT2:"=""
"LPT3:"=""
@=""
"Ne00:"=""
直接注册表删除,再重启Print Spooler服务
资料:
某单位有两个局域网,一个用于内部办公,一个用于接入Internet,这两个网络通过交换机联系在一起;现在有一台网络打印机连接在Internet网络上,那么内网的工作站,能否共享到Internet网络上的打印机呢?
答:很显然,上面的两个局域网处于不同网段,因此我们在内网的工作站上,无法使用网上邻居,直接访问到Internet网络上的共享打印机。但考虑到这两个网络,在物理连接上还是通过交换机联系在一起的,因此你可以将打印机设置为基于IPX/SPX协议下的网络共享。在设置共享时,你必须先用直接连接的方法,获得打印机在IPX/SPX协议下的一些技术参数,例如IPX地址、IPX名称、硬件地址、打印机的名称等(注意这些参数,不是每一台打印机都可以提供的,必须要求打印机支持IPX/SPX网络共享才可以),当然你也可以使用WEB浏览的方式,查看到这些技术参数,只要以打印机超级管理员身份登录到打印服务器中,然后在IE地址栏中,输入形如“http://打印机服务器IP地址:端口号码”格式的网址,就能获得IPX/SPX协议下的技术参数了。以后在需要安装网络打印机的工作站中,单击“添加打印机”命令,打开网络打印机安装向导界面,当屏幕上提示你安装何种类型的打印机时,必须选中“本地打印机”选项,并选用LPT1端口,作为缺省的打印端口;以后打开本地打印机的属性设置页面,找到“打印到以下端口”项,然后自行添加一个端口,并在弹出的“协议”框中,选用“IPX/SPX打印机”,然后输入上面收集到IPX/SPX技术参数;完成上面的设置后,内网中的工作站将自动创建一个网络打印机图标,再将该网络打印机设置为默认状态,如此一来你就完成了不同网段之间的共享打印了。
如何删除网络打印机目标端口
更多信息
警告: 正确使用注册表编辑器可导致严重的系统级问题, 可能需要重新安装 WindowsNT 以纠正它们。 Microsoft 不能保证能够解决因注册表编辑器使用导致任何问题而。 需要您自担风险使用此工具。
打印机目标可为下列类型之一: 本地端口、 Hewlett-Packard 网络端口或 AppleTalk 打印设备。
回到顶端
删除 Hewlett-Packard 网络打印机目标
1. 在注册表编辑器, 从以下项中删除 Hewlett-Packard 网络打印机: HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Print\\Monitors\\
Hewlett-Packard Network Port\\Portnames
2. 退出注册表编辑器并重新启动 Windows NT。
回到顶端
删除一个 AppleTalk 打印机目标
1. 在注册表编辑器, 从以下项中删除 AppleTalk 打印机: HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Print\\Monitors\\
AppleTalk Printing Devices\\Ports
2. 退出注册表编辑器并重新启动 WindowsNT。
回到顶端
删除一个 LPR 打印机目标
1. 在注册表编辑器, 从以下项中删除 LPR 打印机: HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Print\\Monitors\\
LPR Port\\Ports
2. 退出注册表编辑器并重新启动 WindowsNT。
删除打印机端口
描述
从计算机中删除打印机端口。需要 Windows XP 或 Windows Server 2003。
脚本代码
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "&leftsign;impersonationLevel=impersonate&rightsign;!\\\\" & strComputer & "\\root\\cimv2")
Set colInstalledPorts = objWMIService.ExecQuery _
("Select * from Win32_TCPIPPrinterPort Where Name = \’IP_169.254.110.14\’")
For Each objPort in colInstalledPorts
objPort.Delete
Next
删除未使用的打印机端口
描述
删除安装在计算机上但是未使用的任何打印机端口。需要 Windows XP 或 Windows Server 2003。
脚本代码
Set objDictionary = CreateObject("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "&leftsign;impersonationLevel=impersonate&rightsign;!\\\\" & strComputer & "\\root\\cimv2")
Set colPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer")
For Each objPrinter in colPrinters
objDictionary.Add objPrinter.PortName, objPrinter.PortName
Next
Set colPorts = objWMIService.ExecQuery _
("Select * from Win32_TCPIPPrinterPort")
For Each objPort in colPorts
If objDictionary.Exists(objPort.Name) Then
Else
ObjPort.Delete_
End If
Next
不过只有Win32_TCPIPPrinterPort
关于不同网段共享打印机的问题已经解决
首先不能连接打印机是因为你在共享项目里尝试连接打印机的时候,系统会默认用NETBIOS
协议去连接打印机。但是因为你的R402工作在NAT的模式下,只是使用TCP/IP协议,其他协议通过宽带路由时已经给过滤。所以就算你开放了那些端口,也会出现你那种问题的。
明白了问题所在,只要我们保证是用TCP/IP协议去连接打印机的话,那在BOOBOO那个网络里就不会出现问题了。
解决方法:
在你已做的基础上。做下面步骤:
你可以在需要连接打印机的机子(和终端三不在同一LAN内的机子)上做一下步骤:
一,你在控制面板——打印机和传真机——添加新的打印机。选择添加本地打印机和不自动检测安装。然后下一步,在选择端口的界面选择创建新的端口,然后输入
\\\\192.168.11.8\\打印机的共享名 。然后默认下一步到最后。
完成打印机的添加步骤后,打印机就可以正常使用了!
20070627 ACEEventLog 删除 DEP
http://www.yippeesoft.com
求助】事件檢視器裡的項目可以移除嗎?
事件檢視器裡的項目除了應用程式,安全性,系統這3個之外的可以移除嗎?
直接到C:\\WINDOWS\\System32\\Config\\ACEEventLog.evt都不能刪…
那是裝ATI 顯卡驅動程式時一並裝Catalyst Control Center後出現的,
都已經移除Catalyst Control Center了,但事件檢視器裡那個項目還一直存在,
請問有辦法可以除掉嗎?謝謝!!~
那是ATI显示卡驱动生成的日志文件,你是不是装显示卡驱动后还装Catalyst Control Center之类的显示监控软件了,找个强删工具强删吧,不删也无大碍,放那放着吧,也占不了多少地方
string logName;
if (EventLog.SourceExists("ACEEventLog"))
&leftsign;
// Find the log associated with this source.
logName = EventLog.LogNameFromSourceName("ACEEventLog", ".");
// Delete the source and the log.
//EventLog.DeleteEventSource("ACEEventLog");
EventLog.Delete(logName);
Console.WriteLine(logName + " deleted.");
&rightsign;
我机器最近老是出现毛病,真是晕了
今天下午干着干着活儿,就蹦出来个 数据执行保护,在网上查资料
得到的结果是:
在Windows根目录下找到Boot.ini文件(这是个隐藏的系统文件,需要在文件夹选项的“查看”设置里将“隐藏受保护的操作系统文件”前面的勾去掉,并选择“显示所有的文件和文件夹”)。打开它,搜索里边的“NoExecute”字段,并将其改为:NoExecute=AlwaysOff,这样数据执行保护功能将完全失效。
试了一下,果然有效!哈哈
解释
数据执行保护 (DEP) 是 WinXP SP2 和 Win2K3 SP1 新加入的安全保护功能,它可以防止恶意程序或脚本在其他程序使用的内存位置上执行恶意代码来发起的攻击,目前大部分的溢出方式入侵就属于这种攻击。
现象
在我们使用中,遇到程序启动后无反应,内存中也没有增加程序进程,下次登陆或启动 Windows 是收到错误报告这种现象一般就是由于数据执行保护 (DEP)在作怪。
解决
那么怎么才能使合法软件不受此干扰呢?数据执行保护 (DEP) 也提供了豁免设置,在“控制面板>系统>高级>性能.设置”里面找到“数据执行保护”标签,把允许的程序添加到下面的豁免列表中就可以了。
为了防止病毒或其他安全威胁造成损害,Windows XP SP2 使用了数据执行保护 (DEP) 功能。
DEP 既可以单独工作,也可以和兼容的微处理器一起将某些内存位置标记为“不可执行”。如果某个程序试图从受保护的位置运行代码,则不管该代码是否有恶意,DEP 都将关闭该程序并通知您。
?具体的介绍看这里
?
我抱着试一试的心理(勇于开拓创新,剩下的同上括号),把那个可疑的东东改成“只为关键windows程序和服务启用数据执行保护”。重启,CS建主,那熟悉的战场又出现在我的面前(T_T)
?
步骤:管理员帐户登录系统,我的电脑 ->右键 ->属性 ->高级 ->性能 ->设置 ->数据执行保护 。如果选的是“除所选之外,为所有程序和服务启动数据执行保护”,而下面的列表又是个空栏的话,别说CS,其它的东东说不定也会被它搞掉,懒的话就选上面那个,虽然可能牺牲了防病毒功能,但好歹能正常运行很多程序,生活也变得美好了一些么,再说找个好的防病毒软件也就能既有安全又有兼容性了不是?
默认情况下,DEP 只针对基本 Windows 操作系统程序和服务启用。要使用 DEP 帮助保护其他程序,请选择“为下列程序之外的所有程序启用 DEP”。
Win XP SP2具备数据执行保护(DEP)功能,要实现此功能,需配合支持DEP功能的处理器使用,如AMD Athlon64和编号中包含字母"J"的Intel Pentium4处理器。
DEP 功能可以有效阻止未获得允许的程序对受保护内存区域的访问,一旦产生这种内存访问,该程序将被Windows强行关闭,从而达到保护系统安全的目的。但对于早期的应用程序,可能与DEP功能产生兼容性问题,导致应用程序无法运行或系统死机等问题。此时若希望继续正常使用应用程序,可关闭 Win XP SP2的DEP功能。操作方法如下:
打开系统分区根目录下的BOOT.INI文件,对其进行编辑。将其中的"/noexecute=optin"改为"/execute",或者改为"/NoExecute=AlwaysOff" 保存后重新启动系统,此时系统中的DEP功能即已关闭。
例如,Boot.ini文件内容如下:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect
修改后,最后一行变为:
multi(0)disk(0)rdisk(0)partition(1)\\WINDOWS="Microsoft Windows XP Home Edition" /execute /fastdetect
20070324 VS2003 VSS 删除 Cleanup
http://www.yippeesoft.com
以前的项目,用的VSS,现在用SVN,但是老是提示VSS管理,非常讨厌,看看:
Visual Studio.Net 2003 Solution Cleanup
—————————————
## 1.7 BETA 1 Refresh 2 — DO NOT REDISTRIBUTE PLEASE ##
This utility cleans up Solution directories, for all solutions created with
Visual Studio.NET 2003.
It can:
- Remove links to source code control (Visual SourceSafe, CVS, SourceGear Vault, …)
- Delete bin, obj, Debug, Release directories
- Delete *.user files (which can cause file reference problems)
- Delete *.suo files (which determine which source code windows are open in Visual Studio.NET)
- Delete *.xml files
- Clear the Visual Studio.Net Web Cache (which can also cause Web project compilation problems)
- Clear the Internet Explorer cache and the ASP.NET Temporary Files cache
- …
Simply copy the program to your hard disk and run it. Check the options you want
and click the "Clean up" button. Make sure that Visual Studio.Net is closed and that
all files and directories you wish to delete are not read-only. If necessary, use
right-click/Properties on the directory containing your solution to turn read-only mode
off.
This utility is freeware; it is provided at no cost and with no guarantees
whatsoever. Use at your own risk! Only for Visual Studio.Net 2003 solutions. This
utility does not remove source code control links from Visual Studio.Net 2002 or
Visual Studio 2005 projects.
Written by Roy Dictus (roy.dictus@gmail.com); see also my blog on .Net development at
http://www.dotnetjunkies.com/weblog/roydictus. Feedback is always welcome! So are
postcards
This utility may be included in CD-ROM utility compilations if I get a copy of the CD. Please
send CDs to:
Roy Dictus
James Ensorlaan 2/B
B-2630 Aartselaar
Belgium
Many thanks and have fun with Cleanup!
TROUBLESHOOTING
—————
- If you get a PolicyException when running the utility, very probably you\’re trying
to run it from a mounted volume — i.e., from a non-local disk. Copy the utility
to your disk to use it.
- To clean up a Solution directory, that Solution may not be open in Visual Studio.NET.
- If you have removed links to source code control by accident, don\’t panic! Simply
re-fetch the files from the source code control system. For instance, using Visual
SourceSafe, just do a "Get Latest Version" again. The files on your system will be
overwritten by the versions stored in the repository, and links will be restored.
- Note that you need .NET Framework 1.1 on your system to run Cleanup for Visual Studio.NET 2003.
You do not need Visual Studio.NET 2003 itself on your machine.
- Remember that running with scissors is dangerous.
软件资讯 > 开发特区 > .net技术
用C#去除代码的SourceSafe管理
经常看一些的程序,有些一个解决方案带有多个项目,由于代码比较多,多人开发,所以好多vs.net下的工程是用source safe进行版本控制的。而用source safe进行版本控制需要局域网路径共享,因此好多项目换一台机器打开会出现一些问题,比如“解决方案看起来是受源代码管理,但无法找到它的绑定信息……”之类的提示信息很多。有时候修改了代码还保存不了,所以想把他去掉,下面是对项目管理前后的一些对比。
一、工程项目比较
同没有受Source Safe代码管理的工程相比:
1. 多出了.scc、.vssscc和.vspscc文件;
2. C#项目文件(.csproj)里面添加了几行标签:
SccProjectName = "SAK"
SccLocalPath = "SAK"
SccAuxPath = "SAK"
SccProvider = "SAK"
3.在解决方案文件(.sln)中,中增加了如下节点原素:
GlobalSection(SourceCodeControl) = preSolution
SccNumberOfProjects = 4
SccLocalPath0 = .
……
SccLocalPath3 = SUBSCRIBE_TOOLS
CanCheckoutShared = false
EndGlobalSection
去除 vs.net 2003 项目的 VSS 信息的脚本(收藏)
这个脚本是在 codeproject 上面看到的,是一个文章的回复里面某老外贴的脚本,其作用是彻底去除 vs.net 2003 项目的 VSS 信息。我经常需要使用,所以发在这里做一个备份。
首先把这些代码保存为 RemoveVssInfo.js,放到和 xxx.sln 项目文件同一个目录里面。然后双击执行即可。代码如下:
/// Global ——————————————————
var deleteByForce = true;
var consoleOnly = true;
var defaultTimeOut = 1;
var showDetails = false;
var WSShell;
var fso;
var currentFolder;
var deletedFiles = 0;
var modifiedFiles = 0;
var ForReading = 1, ForWriting = 2, ForAppending = 8;
var CharSetDefault = -2, CharSetUnicode = -1, CharSetAscii = 0;
var AttrNormal = 0, AttrReadOnly = 1, AttrHidden = 2, AttrSystem = 4,
AttrVolume = 8, AttrDirectory = 16, AttrArchive = 32, AttrAlias = 1024,
AttrCompressed = 2048;
Init();
Main();
//Test();
/// Main ——————————————————
function Main() &leftsign;
var text;
// say hello
text = "Remove from SourceSafe has started.";
Out(text,true);
COut("Working folder: \\r\\n"+ currentFolder);
// delete files
// *.suo, *.eto, *.vssscc, *.vspscc, vssver.scc, mssccprj.scc
DeleteFiles("[.]*([.]suo$&line;[.]eto$&line;[.]vssscc$&line;[.]vspscc$&line;vssver[.]scc$&line;mssccprj[.]scc$)");
// modify files
// *.etp, *.sln, *.csproj
ModifyFiles("[.]*([.]etp$&line;[.]sln$&line;[.]csproj$)");
// say goodbye
text = "Remove from SourceSafe has finished. \\r\\n\\r\\n"
+ "Deleted files: \\t" + deletedFiles + "\\r\\n"
+ "Modified files: \\t" + modifiedFiles + "\\r\\n";
Out(text,false);
&rightsign;
function Init() &leftsign;
// detect command line
try &leftsign;
WScript.StdOut.WriteLine(" ");
&rightsign; catch (e) &leftsign;
consoleOnly = false;
&rightsign;
// initialize
WSShell = new ActiveXObject("WScript.Shell");
fso = new ActiveXObject("Scripting.FileSystemObject");
currentFolder = GetCurrentFolder();
&rightsign;
/// Files ——————————————————
// getcurrent folder
function GetCurrentFolder() &leftsign;
return fso.GetFolder(fso.GetFile(WScript.ScriptFullName).ParentFolder);
&rightsign;
// delete files by mask
function DeleteFiles(mask) &leftsign;
var files = FindFiles(mask);
var i;
Out("Deleting files", true);
for (i=0; i<files.length; i++) &leftsign;
try &leftsign;
fso.DeleteFile(files[i], deleteByForce);
deletedFiles ++;
&rightsign; catch (e) &leftsign;
WScript.echo(e.Message);
&rightsign;
&rightsign;
if (deletedFiles == 0) &leftsign;
COut("No files were deleted.");
&rightsign;
&rightsign;
// find files
function FindFiles(mask) &leftsign;
return GetFiles(currentFolder, mask);
&rightsign;
// determine, if filename matches given mask
function MatchesMask(file, mask) &leftsign;
return new RegExp(mask).test(file);
&rightsign;
// get files in current folder & subfolders
function GetFiles(folder, mask) &leftsign;
var result = new Array();
// do files in current folder
var files = new Enumerator(folder.Files);
for (; !files.atEnd(); files.moveNext()) &leftsign;
if (MatchesMask(files.item(), mask)) &leftsign;
result.push("" + files.item());
&rightsign;
&rightsign;
// do subfolders in current folder
var folders = new Enumerator(folder.SubFolders);
for (; !folders.atEnd(); folders.moveNext()) &leftsign;
result = result.concat(GetFiles(folders.item(), mask));
&rightsign;
return result;
&rightsign;
/// Output ——————————————————
// output
function Out(text, useTimeOut) &leftsign;
if (useTimeOut) &leftsign;
useTimeOut = defaultTimeOut;
&rightsign; else &leftsign;
useTimeOut = -1;
&rightsign;
if (consoleOnly) &leftsign;
WScript.StdOut.WriteLine(text);
&rightsign; else &leftsign;
WSShell.Popup(text, useTimeOut, "Remove from SourceSafe");
&rightsign;
&rightsign;
// output
function COut(text, useTimeOut) &leftsign;
if (useTimeOut) &leftsign;
useTimeOut = defaultTimeOut;
&rightsign; else &leftsign;
useTimeOut = -1;
&rightsign;
if (consoleOnly) &leftsign;
WScript.StdOut.WriteLine(text);
&rightsign;
&rightsign;
/// Modify ——————————————————
// modify all files matching given mask
function ModifyFiles(mask) &leftsign;
var files = FindFiles(mask);
var i;
Out("Modifying files", true);
for (i=0; i<files.length; i++) &leftsign;
// WScript.echo(files[i]);
// try &leftsign;
ModifyFile(fso.GetFile(files[i]));
modifiedFiles ++;
// &rightsign; catch (e) &leftsign;
// WScript.echo(e.description);
// &rightsign;
&rightsign;
if (modifiedFiles == 0) &leftsign;
COut("No files were modified.");
&rightsign;
&rightsign;
function ModifyFile(file) &leftsign;
switch (fso.GetExtensionName(file.Path).toLowerCase()) &leftsign;
case "etp":
ModifyFileETP(file);
break;
case "sln":
ModifyFileSLN(file);
break;
case "csproj":
ModifyFileCSPROJ(file);
break;
&rightsign;
&rightsign;
function ReadFile(file) &leftsign;
var stream = file.OpenAsTextStream(ForReading, CharSetDefault);
text = stream.ReadAll();
stream.Close();
return text;
&rightsign;
function WriteFile(file, text) &leftsign;
var ro = ((file.Attributes & AttrReadOnly) != 0);
if (ro) file.Attributes -= AttrReadOnly;
var stream = file.OpenAsTextStream(ForWriting, CharSetDefault);
stream.Write(text);
stream.Close();
if (ro) file.Attributes += AttrReadOnly;
&rightsign;
// remove element <SourceControlSettings></SourceControlSettings>
function ModifyFileETP(file) &leftsign;
var text;
var re1 = new RegExp(\’(\\\\s*GlobalSection\\\\(SourceCodeControl\\\\))[.\\\\r\\\\n\\\\s\\\\S]*?EndGlobalSection\’,\’m\’);
text = ReadFile(file);
text = text.replace(re1, "");
WriteFile(file, text);
&rightsign;
// remove lines with SccProjectName, SccLocalPath, SccAuxPath, SccProvider
function ModifyFileCSPROJ(file) &leftsign;
var text;
var re1 = new RegExp(\’(^\\\\s*SccProjectName = .*$)\’, \’m\’);
var re2 = new RegExp(\’(^\\\\s*SccLocalPath = .*$)\’, \’m\’);
var re3 = new RegExp(\’(^\\\\s*SccAuxPath = .*$)\’, \’m\’);
var re4 = new RegExp(\’(^\\\\s*SccProvider = .*$)\’, \’m\’);
text = ReadFile(file);
text = text.replace(re1, "");
text = text.replace(re2, "");
text = text.replace(re3, "");
text = text.replace(re4, "");
WriteFile(file, text);
&rightsign;
1001 SPOOLSV 删除 清理
同事电脑CPU占用极高,看看资料,好多手工
不过好像最简单的是 添加删除卸载 WinDirected
或者 C:\\WINDOWS\\system32\\spoolsv\\spoolsv.exe -uninst
网上有些资料还是错误的,会导致打印不正常或者删除了正常的系统文件
不知道为什么,突然电脑就变的很卡,一看才发觉spoolsv.exe这个进程占用了我CPU100%的使用率~我现在很想把他关掉,可是在任务管理器里他是禁止不掉了,我结束进程,他又会自动运行,后来我发觉这个程序在C:1/windows/system32里,我把他删除了,他又自动生成~~
救命啊,spoolsv.exe有的时候对我电脑没有影响,有的时候突然就占用了100%的CPU使用率,我现在的电脑牛慢~~哪个高手帮忙解决下啊 ~
最近经常有朋友中了一个类似系统打印进程的木马--spoolsv.exe,它创建多个目录互相监护,删除后重新反弹,从而查杀比较棘手。
下面是关于病毒的一些资料:
启动项 c:/windows/system32/spoolsv/spoolsv.exe -printer
其相关文件、目录:
%System%\\wmpdrm.dll
%System%\\1116\\
%System%\\msicn\\msibm.dll
%System%\\msicn\\ube.exe
%System%\\msicn\\plugins\\
%System%\\spoolsv\\spoolsv.exe
%System%\\spoolsv\\spoolsv.exe
启动运行后会调用%System%\\msicn\\msibm.dll,创建%System%\\1116\\目录,备份用。%System%\\1116\\目录是备份目录,里面是%System%\\wmpdrm.dll、%System%\\msicn\\和%System%\\spoolsv\\spoolsv.exe的备份。 %System%\\msicn\\msibm.dll会插入多个指定进程,大约每4秒钟监视恢复文件(从%System%\\1116\\目录)和注册表信息(启动项、BHO): [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run]"spoolsv" [HKEY_CLASSES_ROOT\\CLSID\\&leftsign;0E674588-66B7-4E19-9D0E-2053B800F69F&rightsign;\\InprocServer32] @="%System%\\wmpdrm.dll" 注:"spoolsv"的数据不会被监视,所以修改它的数据也不会被恢复,只有删除"spoolsv"才会被恢复。
还可能会从远程服务器下载文件:http://liveupdate .ourxin com/secp.exe
secp.exe是个安装程序,安装以下文件:
%System%\\wmpdrm.dll
%System%\\msicn\\ube.exe
%System%\\msicn\\plugins\\(目录里4个dll文件)
%System%\\wmpdrm.dll是一个BHO,%System%\\msicn\\ube.exe像是卸载程序。
另外,在%System%\\和%System%\\msicn\\目录里还有有一些从远程下载来的cpz、vxd文件,比如: ava.vxd guid.vxd plgset.vxd safep.vxd
%System%\\wmpdrm.dll作为BHO被调用后,会尝试调用%System%\\spoolsv\\spoolsv.exe和%System%\\msicn\\msibm.dll。 注:如果%System%\\spoolsv\\spoolsv.exe没有被运行或被调用,也就不会备份还原,好像它就是用来备份的。
另外在“开始菜单”->“程序”里可能会有一项“NavAngel”,里面有个快捷方式NavAngel.lnk,指向:%System%\\spoolsv\\spoolsv.exe -ctrlfun:4,3 “添加/删除程序”里有一项“NavAngel”,对应命令是:%System%\\spoolsv\\spoolsv.exe -ctrlfun:4,2 还有一项“WinDirected 2.0”,对应命令是:%System%\\spoolsv\\spoolsv.exe -uninst
还可能会有mscache\\目录,从名字看像是存放临时缓存文件的。
这个东西通常是不知不觉就中了的,也有肯可能是下载了一些伪装的垃圾安装程序(通常是一堆垃圾绑在一起的)。要注意:spoolsv.exe和windows的打印服务spoolsv.exe很类似,不要被它迷惑了,打印服务spoolsv.exe的目录是系统文件夹(以XP为例)system32\\spoolsv.exe而此病毒的路径为system32\\spoolsv\\sploosv.exe
根据病毒信息提供两种得查杀方法:
第一种:
1、在安全模式下进入系统目录system32删除文件夹spoolsv和miscn以及1116
2、开始菜单运行regedit打开注册表编辑器,找到
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run]
"spoolsv"="%System%\\spoolsv\\spoolsv.exe -printer" 删除该项
3、在注册表中搜索spoolsv文件夹(注意是文件夹不是文件),删除
4、在注册表编辑器中打开下面的分支并使用组合键ctrl+f进行查找如下内容:
[HKEY_CLASSES_ROOT\\CLSID\\&leftsign;0E674588-66B7-4E19-9D0E-2053B800F69F&rightsign;
[HKEY_CLASSES_ROOT\\wmpdrm.cfsbho
[HKEY_CLASSES_ROOT\\wmpdrm.cfsbho.1
[HKEY_CLASSES_ROOT\\TypeLib\\&leftsign;8B200623-3FC5-4493-8B49-DC2AD4830AF4&rightsign;
[HKEY_CLASSES_ROOT\\Interface\\&leftsign;4A775183-9517-420E-9A13-D3DA47BB8A84&rightsign;找到以后进行删除
5、运行注册表清里软件清理注册表,比如超级兔子,优化大师,恶意软件清理助手等都可以,此步骤也可以不执行。
近来网上出现一个很厉害的病毒。杀毒软件都不能杀死。唯有手工清除。。。以c盘系统为例
请打开你的电脑看看WINDOWS\\system32文件夹里有没有这几个文件夹
C:\\WINDOWS\\system32\\msibm\\
C:\\WINDOWS\\system32\\msicn\\
C:\\WINDOWS\\system32\\mscache\\
C:\\WINDOWS\\system32\\spoolsv\\
C:\\WINDOWS\\system32\\1116\\
如果有的话,恭喜你,你中毒了。具体表现为有个叫播霸的软件不请自来*******(*号部分作者省掉n个字,表达能力差,呵呵。)你把上述文件夹删除,四秒后再看看,删除的文件夹又出现了。真是可恶。本人是下载狂,在一下网站下载软件,不小心下载了病毒程序,运行而中招。。。。。以下是我综合网上的资料总结出来的手工清除方法。
首先进入安全模式,控制面板,打开添加或删除程序,卸载WinDirected 2.0。这个是罪魁祸首。删除 c:/windows/system32/spoolsv/文件夹
删除c:/windows/exploer.exe程序。(很像explorer.exe)
删除%System%\\wmpdrm.dll
彻底清除“傲讯浏览器辅助工具”spoolsv.exe木马病毒绝对有效方法
一、首先声明:
网上能够搜索到的其他方法都是行不通的,或者清除不够彻底,我验证过。
今天安装某个软件的时候惹上了这个“傲讯浏览器辅助工具”,名字可起得动听,实际上是彻头彻尾的恶意木马病毒。
二、如何知道自己是否也中了招?
检测方法:
1、开始,运行,输入 msconifg,回车,启动,如果里面有一项目名称是spoolsv,命令是c:\\Windows\\System32\\spoolsv\\spoolsv.exe的
2、开始,运行,输入 %systemroot%\\system32\\spoolsv,回车,如果能够打开目录,而且里面有一个spoolsv.exe文件
满足上面两点,就证明你也中“傲讯浏览器辅助工具”的spoolsv木马病毒。
三、清除方法和步骤:
请严格按照以下步骤执行,不要打乱顺序和有缺漏:
1、开机时按F8,选择“安全模式”进入系统,如果你平时用的帐号有管理权限,那就用你平时用的帐号登陆,否则,用管理员帐号登陆;
2、开始,运行,输入 %systemroot%\\system32\\spoolsv\\spoolsv.exe -unist.exe,回车,在弹出框中点“卸载”;
3、开始,运行,输入 %userprofile%\\Local Settings\\Temp,回车,将里面所有文件删除;
4、开始,运行,输入 %userprofile%\\Local Settings\\Temporary Internet Files,回车,将里面所有文件删除;
5、开始,运行,输入 %systemroot%\\system32,回车,按住Ctrl键,用鼠标点选1116、mscache、msicn、spoolsv这四个目录,再按Shift+Del将这三个目录同时删除(也就是不能依次删除,必须同时);
6、开始,运行,输入 regedit,按Ctrl+F,输入spoolsv查找,将查找到的所有相关子键删掉。(执行本步骤前请先阅读本文末的注明)
7、开始,运行,输入 msconifg,回车,启动,如果里面的spoolsv项还是被选上的话,请取消该项。
8、重启,进入正常模式,再用上面的检测方法来验证该木马是否已经被删除。
9、推荐使用卡巴斯基杀毒软件在进行一次全盘查杀。
标签:删除, 清理