智能卡(Smart Card)服务修复工具(解决无法读取外接设备的问题)

用于修复XP/Vista/Win7 下的智能卡(Smart Card)服务。

用于解决无法读取各类外接设备的问题。

程序自身有多语言功能,通过判断本地系统语言来显示相应的语言文本。

代码之后会放出。

作者:pencil  Email:pencil@yeah.net

09/11/25

http://download.csdn.net/source/1844640

顺便请英文好的挑错。  thx

Unable to open the Service Control Manager!   ||无法打开服务管理器(SCM)
Unable to open the Smart Card Service,to check if the service is in your operation system please.服务打开失败,请检查是否存在Smart Card或智能卡服务
Query information of the Smart Card Service failed!it had maybe damaged,you can click the [ForceRestoration] button to repair it!智能卡服务信息查询失败,该服务可能已经损坏,请重新安装该服务,或点击强力修复恢复该服务。
The Smart Card Service's configuration modify operation had failed!修改服务配置失败
The Smart Card Service' status check operation had failed!检测服务运行状态失败
Stop the Smart Card Service failed!启动服务失败
Repair the Smart Card Service successful!智能卡(Smart Card)服务修复完成
Change the Smart Card Service's account failed!设置账户权限为LocalService失败
Stop the Smart Card Service failed停止服务过程中失败
Start the Smart Card Service failed.启动服务过程中失败
The Smart Card Service is in the startup......智能卡(Smart Card)服务启动中……
The Smart Card Service is in the restart procedure.....智能卡(Smart Card)服务重新启动中……
In the force restoration procedure......强力修复程序正在运行……
Sorry:nonsupport the force restoration on Vista/Win7.抱歉:目前还不支持Vista/Win7下的强力修复
It is failed in the reinstall procedure.服务重新安装过程中失败
It is failed in the Smart Card Service register procedure.智能卡服务注册失败
The Smart Card Service 's restoration is successful智能卡(Smart Card)服务修复完成!如功能仍然异常,您可以反馈您的信息到我司。"
The Smart Card Service opened failed!Now,we had to enter force restoration procedure打开智能卡服务失败!正在进行强力修复……
Force restoration successful!We will quit 5 seconds later强力修复程序运行成功!5秒后自动退出本修复程序。
Force restoration failed!We will quit 5 seconds later强力修复程序运行失败!5秒后自动退出本修复程序。
The Smart Card Service had be damaged,to enter force restoration 3 seconds later智能卡服务已损坏,3秒后进入强力修复程序!
The Smart Card Service's configuration modify operation failed!to enter force restoration 3 seconds later更改为autoRun过程中失败!3秒后进入强力修复程序!
Startup service failed!to enter force restoration 3 seconds later.启动服务失败!3秒后进入强力修复程序!
Restoration successful!Please to check the function of easySafe software,if it is still abnormal,click [Force Restoration] button to start force restoration procedure修复成功!已完成修复过程,请您检测easySafe Key是否能正常使用,如功能异常,请点击【强力修复】!
The Smart Card Service is in good condition!if it is abnormal now,click [Yes] button to start force restoration procedure.功能检测正常!如果此时easySafe功能仍处于异常状态,请选择【是】进入强力修复程序。
easySafe Smart Card Service repair tool  ||   easySafe 智能卡服务修复工具
Waiting for order......|||||||||等待指令……
Repair修复
Force Repair强力修复
Quit退出
Invalid Message ID错误的Message ID

程序有英语 汉语 两种语言,根据操作系统环境来选择language. 修复过程分【普通修复】和【强力修复】。 XP和VISTA/WIN7下的修复操作还是有很多区别的。但基于的原理是一样的。 并且因为Vista/Win7下的Smart Card 服务的scardsvr.exe可执行文件被更改为scardsvr.dll,也就没有了scardsvr的相关安装命令。我用dependency查看了下scardsvr.dll,只能看到一个入口函数。能力有限,google了一些资料也没有结果。就没分析下去了。 【普通修复】的修复过程(以XP下的修复过程讲述,vista/win7下操作请看代码): (1)检查"智能卡服务"是否为自启动。并设置其为自启动。 (2)检测服务当前状态是否为SERVICE_RUNNING,并设置其状态为运行中。 (3)检测前两步是否成功,如果成功则向用户弹出messagebox询问moveable device功能是否正常。 (4)如果功能仍abnormal,则初步判断是服务登陆账户为非"NT AUTHORITY\LocalService" ,则用CreateProcess来运行 sc.exe config SCardSvr obj= \"NT AUTHORITY\LocalService" password= "" ,改变其用户为localservice(smart card service只有在此登陆账户下才正常运行)。 (5)如果在普通修复过程中遇到服务查询不到等error时,程序自动启动强力修复来安装smart card service. 注意:普通修复中的第3,4步中有点问题,在这个地方其实最好是直接检查服务的登陆账户。然后做出相应的动作,但是我这个地方没有想到实现的办法。望前辈提示。另就是sc的命令格式有严格的限制,编码的时候要注意等号后面首先是空格。我当时被这个空格困扰到了。 【强力修复】的修复过程(XP下的修复,vista/win7 下没有强力修复) 其实强力修复的过程就是网上流传的那个修复过程,我只不过在这个修复过程中增加了验证和配置修改。 修复过程: (1)ScardSvr.exe reinstall (2)regsvr32.exe SCardssp.dll (3)sc.exe config SCardSvr obj= \"NT AUTHORITY\LocalService" password= "" (4)通过以上三步之后,剩下的配置修改就跟普通修复过程一样了。而以上三步通过CreateProcess和WaitForSingleObject来配合控制。 应该差不多了。代码是半个月前写的,一些地方可能有疏漏。 在代码实现中还有很多地方需要注意,我也都在代码中做出了注释。可自行查看。 如需交流,可mailto:pencil@yeah.net MSN:pencilsoft@hotmail.com
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值