-
Posts
16 -
Joined
-
Last visited
Everything posted by guaikahenguai
-
The code I wrote before: If StringInStr("0804 1004 1404 0004", @OSLang) Then MsgBox(64,"Language","Chinese(Simplified)") ElseIf StringInStr("0404 0c04 7C04", @OSLang ) Then MsgBox(64,"Language","Chinese(Traditional)") Else MsgBox(64,"Language","English") EndIf
-
-
zh-Latn ( "dào shān xué hǎi" ) is Chinese phonetic alphabets,Chinese Pinyin "It is used to teach Standard Chinese, normally written with Chinese characters, to students already familiar with the Latin alphabet." Only for learning Chinese. Example1: "dào shān xué hǎi" Chinese(Simplified):刀山血海 Chinese(Traditional):刀山血海 Example2: zhōng huá rén mín gòng hé guó Chinese(Simplified):中华人民共和国 Chinese(Traditional):中華人民共和國 Example3: My name:guài kā hěn guài Chinese(Simplified):怪咖很怪 Chinese(Traditional):怪咖很怪
-
Yes, there is no reading barrier between Chinese(Simplified) and Chinese(Traditional). Except for the different fonts and the different usage of some phrases, it is still understandable.
-
Get Home DiskDrive SerialNumber
guaikahenguai replied to r2du-soft's topic in AutoIt General Help and Support
-
I want to modify the user account "User Cannot Change Password" option by remotely connecting to the Active Directory (using the same way as RSAT). Current situation: I run the following script on the local computer to connect to the Active Directory and modify the "User Cannot Change Password" option of the specified user account, the setting does not take effect. #NoTrayIcon ;~ #RequireAdmin #include <AD.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> _AD_ErrorNotify(1) Global $AD_user = "gg.com\ADadmin" ;ADadmin member of Domain Admins Global $AD_pswd = "Abcd.123654" Global $AD_domain = "gg.com" Global $nMsg, $sUser, $sUser1, $sUser2 _AD_Open($AD_user,$AD_pswd,"",$AD_domain) If @error Then Exit MsgBox(16, "Active Directory Example Skript", "Function _AD_Open encountered a problem. @error = " & @error & ", @extended = " & @extended) Global $iReply = MsgBox(308, "Enables/Disable change password", "This script Enables/Disable the specified user to change their password." & @CRLF & @CRLF & _ "Are you sure you want to change the Active Directory?") If $iReply <> 6 Then Exit #region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Active Directory Functions - Example 1", 714, 124) GUICtrlCreateLabel("User to change (FQDN or sAMAccountName):", 8, 10, 231, 17) Global $IUser = GUICtrlCreateInput("", 241, 10, 459, 21) Global $BDisable = GUICtrlCreateButton( "Disable", 8, 72, 121, 33) Global $BEnable = GUICtrlCreateButton( "Enable", 260, 72, 121, 33) Global $BCancel = GUICtrlCreateButton("Cancel", 628, 72, 73, 33, BitOR($GUI_SS_DEFAULT_BUTTON, $BS_DEFPUSHBUTTON)) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BCancel Exit Case $BDisable $sUser1 = GUICtrlRead($IUser) _DisablePasswordChange($sUser1) ExitLoop Case $BEnable $sUser2 = GUICtrlRead($IUser) _EnablePasswordChange($sUser2) ExitLoop EndSwitch WEnd Func _DisablePasswordChange($sUser) Local $iValue1 = _AD_DisablePasswordChange($sUser) ConsoleWrite("Result: " & $iValue1 & ", error: " & @error & ", extended: " & @extended) If $iValue1 = 1 Then MsgBox(64, "Disable Password Change", "User '" & $sUser & "' successfully changed") ElseIf @error = 1 Then MsgBox(64, "Disable Password Change", "User '" & $sUser & "' does not exist") Else MsgBox(64, "Disable Password Change", "Return code '" & @error & "' from Active Directory") EndIf EndFunc Func _EnablePasswordChange($sUser) Local $iValue2 = _AD_EnablePasswordChange($sUser) ConsoleWrite("Result: " & $iValue2 & ", error: " & @error & ", extended: " & @extended) If $iValue2 = 1 Then MsgBox(64, "Enable Password Change", "User '" & $sUser & "' successfully changed") ElseIf @error = 1 Then MsgBox(64, "Enable Password Change", "User '" & $sUser & "' does not exist") Else MsgBox(64, "Enable Password Change", "Return code '" & @error & "' from Active Directory") EndIf EndFunc _AD_Close() I get the _AD_ErrorNotify(1) error message: COM Error Encountered in _AD_DisablePasswordChange.au3 AD UDF version = 1.6.1 @AutoItVersion = 3.3.15.4 @AutoItX64 = 1 @Compiled = 0 @OSArch = X64 @OSVersion = WIN_10 Scriptline = 1322 NumberHex = 0x80020009 Number = -2147352567 WinDescription = Exception occurred. Description = Source = HelpFile = HelpContext = 0 LastDllError = 0 The script can modify the user's "User Cannot Change Password" option and take effect when running in Active Directory. I've been working on this for a few days and can't figure it out. Does anyone have the same problem and I need help.😭 thanks in advance!
-
Active Directory: allow Password Change
guaikahenguai replied to Marc's topic in AutoIt General Help and Support
Excuse me, has the problem been solved yet? I have the same problem and need help!😭 -
Active Directory UDF - Help & Support (III)
guaikahenguai replied to water's topic in AutoIt General Help and Support
I found this Scriptline by my own method: $oObject.Put("ntSecurityDescriptor", $oSD)- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
guaikahenguai replied to water's topic in AutoIt General Help and Support
COM Error Encountered in _AD_DisablePasswordChange.au3 AD UDF version = 1.6.1 @AutoItVersion = 3.3.15.4 @AutoItX64 = 1 @Compiled = 0 @OSArch = X64 @OSVersion = WIN_10 Scriptline = 1328 NumberHex = 0x80020009 Number = -2147352567 WinDescription = Exception occurred. Description = Source = HelpFile = HelpContext = 0 LastDllError = 0 ======================================================== Result: 1, error: 0, extended: 0 How to view "Scriptline = 1328".My script is only 89 lines in total.- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
guaikahenguai replied to water's topic in AutoIt General Help and Support
Running an uncompiled script does not display a script error line. The script runs normally but does not display a run error message, just setting will not take effect. Weird thing: The same script works on a domain controller, but setting will not take effect on a domain member computer. At a loss to understand.🤔 This problem can't be solved? That's really a pity.😔- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
guaikahenguai replied to water's topic in AutoIt General Help and Support
COM Error Encountered in _AD_DisablePasswordChange.exe AD UDF version = 1.6.1 @AutoItVersion = 3.3.15.4 @AutoItX64 = 0 @Compiled = 1 @OSArch = X64 @OSVersion = WIN_10 Scriptline = -1 NumberHex = 0x80020009 Number = -2147352567 WinDescription = Exception occurred. Description = Source = HelpFile = HelpContext = 0 LastDllError = 0- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
guaikahenguai replied to water's topic in AutoIt General Help and Support
Here is my script, which is run in the gg.com domain controller to set the specified user account: Boy,the setting will take effect. If the same script is run on another computer in the domain member to set the same user account: Boy, the setting will not take effect. #RequireAdmin #include <AD.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $AD_user = "gg.com\admin" ;admin member of Domain Admins Global $AD_pswd = "Asdf.123654" Global $AD_domain = "gg.com" Global $nMsg, $sUser, $sUser1, $sUser2 _AD_Open($AD_user,$AD_pswd,"",$AD_domain) If @error Then Exit MsgBox(16, "Active Directory Example Skript", "Function _AD_Open encountered a problem. @error = " & @error & ", @extended = " & @extended) Global $iReply = MsgBox(308, "Active Directory Functions - Example 1", "This script Enables/Disable the specified user to change their password." & @CRLF & @CRLF & _ "Are you sure you want to change the Active Directory?") If $iReply <> 6 Then Exit #region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Active Directory Functions - Example 1", 714, 124) GUICtrlCreateLabel("User to change (FQDN or sAMAccountName):", 8, 10, 231, 17) Global $IUser = GUICtrlCreateInput("", 241, 10, 459, 21) Global $BDisable = GUICtrlCreateButton( "Disable", 8, 72, 121, 33) Global $BEnable = GUICtrlCreateButton( "Enable", 260, 72, 121, 33) Global $BCancel = GUICtrlCreateButton("Cancel", 628, 72, 73, 33, BitOR($GUI_SS_DEFAULT_BUTTON, $BS_DEFPUSHBUTTON)) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BCancel Exit Case $BDisable $sUser1 = GUICtrlRead($IUser) _DisablePasswordChange($sUser1) ExitLoop Case $BEnable $sUser2 = GUICtrlRead($IUser) _EnablePasswordChange($sUser2) ExitLoop EndSwitch WEnd Func _DisablePasswordChange($sUser) ; Change user Local $iValue1 = _AD_DisablePasswordChange($sUser) ConsoleWrite("Result: " & $iValue1 & ", error: " & @error & ", extended: " & @extended) If $iValue1 = 1 Then MsgBox(64, "Disable Password Change", "User '" & $sUser & "' successfully changed") ElseIf @error = 1 Then MsgBox(64, "Disable Password Change", "User '" & $sUser & "' does not exist") Else MsgBox(64, "Disable Password Change", "Return code '" & @error & "' from Active Directory") EndIf EndFunc Func _EnablePasswordChange($sUser) Local $iValue2 = _AD_EnablePasswordChange($sUser) ConsoleWrite("Result: " & $iValue2 & ", error: " & @error & ", extended: " & @extended) If $iValue2 = 1 Then MsgBox(64, "Enable Password Change", "User '" & $sUser & "' successfully changed") ElseIf @error = 1 Then MsgBox(64, "Enable Password Change", "User '" & $sUser & "' does not exist") Else MsgBox(64, "Enable Password Change", "Return code '" & @error & "' from Active Directory") EndIf EndFunc _AD_Close()- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
guaikahenguai replied to water's topic in AutoIt General Help and Support
I have two computers, one Windows2019 Active Directory, another development computer Windows10. Create a new domain administrator account (username: admin) on Windows2019, and the scripts developed are all using _AD_Open("admin","xxx" , "", "win19-ad.com") to run the script. The current situation is: I use this script to modify settings for a domain user (username: Boy). I run the script in the Windows2019 Active Directory to set the Boy account to take effect normally, but this script will not take effect when the script is set for the Boy account in the development computer Windows10. In Windows 10, using other functions(_AD_DisablePasswordExpire & _AD_SetPasswordExpire & _AD_DisableObject) to set Boy account can take effect normally, but this function(_AD_DisablePasswordChange & _AD_EnablePasswordChange) does not take effect. I also found this problem in a long time ago post on the forum。- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
guaikahenguai replied to water's topic in AutoIt General Help and Support
Yes,I did logoff/logon after calling _AD_DisablePasswordChange,And I called _AD_DisablePasswordChange thirty minutes later it still didn't take effect. _AD_GetPasswordInfo only returns the Password expires,Password last changed and Password properties, but cannot return the "user cannot change password".- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
guaikahenguai replied to water's topic in AutoIt General Help and Support
First of all thanks for the useful UDF, Second there are two questions that need help: I have two computers, one is windows server 2019 and the other is windows 10. I want to run a script through windows 10 to modify the settings on windows server 2019。 1.Function _AD_DisablePasswordChange,It runs perfectly and takes effect on windows server 2019, and shows success when it runs perfectly on windows 10, but it does not actually take effect. (PS:_AD_EnablePasswordExpire & _AD_SetPasswordExpire & _AD_DisableObject when it runs perfectly and takes effect on windows 10) 2.How to get "user cannot change password"? Thank you for support- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with: