打开platform.reg文件,找到以下内容:
[HKEY_LOCAL_MACHINE\COMM\FTPD]
"IsEnabled"=dword:1
"AllowAnonymous"=dword:1
"AllowAnonymousUpload"=dword:1
"AllowAnonymousVroots"=dword:1
"UseAuthentication"=dword:0
"DefaultDir"="\\"
;"DefaultDir"="\\FriendlyARM\\"
可以修改为:
[HKEY_LOCAL_MACHINE\COMM\FTPD]
"IsEnabled"=dword:1
; "AllowAnonymous"=dword:1
"AllowAnonymous"=dword:0
"AllowAnonymousUpload"=dword:1
; "AllowAnonymousUpload"=dword:0
"AllowAnonymousVroots"=dword:1
; "AllowAnonymousVroots"=dword:0
"UseAuthentication"=dword:0
"DefaultDir"="\\"
;"DefaultDir"="\\FriendlyARM\\"
"UserList"="zhongbao"
在c#中,调用:
[DllImport("ntlmssp.dll")]
public static extern bool NTLMSetUserInfo(String pszUser, String pszPassword);
[DllImport("ntlmssp.dll")]
public static extern bool NTLMDeleteUser(String pszUser);
添加用户:NTLMSetUserInfo("zhongbao", "cbsw952");
删除用户:NTLMDeleteUser("zhongbao");
阅读(2466) | 评论(0) | 转发(0) |