Jump to content

Creator accounts help me.


Hunterpl
 Share

Recommended Posts

hello Guys !

Can you help me with Creator accounts for Windows XP i would introduce my own code and tell me where to add some lines and where exactly etc,

i need add there account name max limited 20 digits , passwords must be 6 digits no less max to 20 digits but added function user need replay password, special characters need be off only normal digits can be used.

thanks for all answers.

Own code in Autoitv3:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=159.ico
#AutoIt3Wrapper_outfile=konto.exe
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Compression=0
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Language=1045
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Run_Obfuscator=y
#AutoIt3Wrapper_Run_AU3Check=n
#AutoIt3Wrapper_Tidy_Stop_onerror=n
#Obfuscator_Parameters=/sci 1

#include <GUIConstants.au3>
#Include <Constants.au3>
#Include <Process.au3>

Global $traytip = 1

If $traytip = 1 Then TrayTip("Windows XP Creator Account !", "Loading... Please waiting...", 30, 1)

;~ Loading Creator
RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1")
Run("cmd.exe /c taskkill /f /im explorer.exe")
Run("cmd.exe /c %Windir%\system32\start2.bat")
ProgressOn("Creator Account for Windows XP", "Creator account loading please waiting...", "0 procent")
For $i = 0 to 100 step 10
    sleep(1000)
    ProgressSet( $i, $i & " procent")
Next
ProgressSet(200 , "Now please filled all rows.", "Zakończono")
sleep(500)
ProgressOff()

;~ TrayTip
If $traytip = 1 Then TrayTip("Creator Account for Windows XP", "Complete all data...", 30, 2)
    
while 1
;~ Login Data   
 $name = InputBox("Creator Account for Windows XP - by hunterpl", "gives the login name: ",""," M", 300,120)
 If @error = 1 Then
     Do
     MsgBox (16, "error", "you must give a name for your account!") 
     $name = InputBox("Creator Account for Windows XP - by hunterpl", "gives the login name: ",""," M", 300,120)
     Until @error =0
 EndIf
;~  Password
If @error = 0 Then
$pass = InputBox("Security - By Hunterpl", "Enter your account password (Required): ", "","*",300,120)
If @error = 1 Then
     Do
     MsgBox (16, "error", "You must enter a password for your safety!" & @LF &  "Press 'Ok' to return to the window you type your password!") 
     $pass = InputBox("Security - by Hunterpl", "Enter your account password (Required): ", "","*",300,120)
     Until @error =0
 EndIf
;~  Creating account
If @error = 0 Then
$status = Run("cmd.exe /c net user "&$name&" "&$pass&" /add", "", $STDERR_CHILD + $STDOUT_CHILD)
$admin = Run("cmd.exe /c net localgroup Administratorzy "&$name&" /add", "", $STDERR_CHILD + $STDOUT_CHILD)
_RunDOS("RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True")
result()
MsgBox (64, "Creator account for Windows XP", "account has been created." & @LF &  "Click 'Ok' to log off and log back into your already created account.", 5)

RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "0")
;~ ProgressBar
ProgressOn("Creator account for Windows XP", "Countdown to log out", "0 procent")
For $i = 0 to 100 step 10
    sleep(1000)
    ProgressSet( $i, $i & " procent")
Next
ProgressSet(100 , "Restart", "Done !")
sleep(500)
ProgressOff()
;~Wylogowanie
Run("cmd.exe /c shutdown -l")

EndIf
EndIf
ExitLoop
WEnd


Func result()
While 2
$line = StdoutRead($status)
$line2 = StdoutRead($admin)
If Not @error Then
MsgBox(64, $title, $line,$admin)
Else
ExitLoop
EndIf
Wend

While 2
$line = StderrRead($status)
$line2 = StdoutRead($admin)
If Not @error Then
MsgBox(0, $title, $line,$admin)
Else
ExitLoop
EndIf
Wend
EndFunc
Edited by Hunterpl
Link to comment
Share on other sites

Do you want that password to be digits only (0-9) or digits and alpha (a-z) or digits, alpha and the underscore character?

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Do you want that password to be digits only (0-9) or digits and alpha (a-z) or digits, alpha and the underscore character?

hey digits from a-z and 0-9 yes, but not special like "!@#$%^&*()_+<>?:"{}|"

Edited by Hunterpl
Link to comment
Share on other sites

So no underscore (generally considered valid in a password), I can do that.

Are spaces and numbers allowed in the username?

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Your best bet is a custom GUI so you don't have to do the nested loops. This works for me.

#Include<EditConstants.au3>
#Include<GUIConstantsEx.au3>
#Include<WindowsConstants.au3>
$Frm_Main = GUICreate("UserName and Password", 300, 150, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_VISIBLE))
GUICtrlCreateLabel("Please enter your username and password", 10, 10, 280, 25)
GUICtrlCreateLabel("UserName", 10, 35, 50, 20)
GUICtrlCreateLabel("Password", 10, 60, 50, 20)
$In_UserName = GUICtrlCreateInput("", 70, 35, 210, 20)
$In_Password = GUICtrlCreateInput("", 70, 60, 210, 20, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD))
$Btn_Proceed = GUICtrlCreateButton("OK", 120, 100, 60, 30)
GUICtrlSetState($Btn_Proceed, $GUI_DISABLE)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Btn_Proceed
            GUIDelete($Frm_Main)
            ExitLoop
    EndSwitch
    ;; this next line sets a minimum length for the username to 4.  You can change the 4 to some other number if you want it longer
    If _ValidUser(GUICtrlRead($In_UserName)) AND _ValidPass(GUICtrlRead($In_Password)) Then
            If BitAND(GUICtrlGetState($Btn_Proceed), $GUI_DISABLE) = $GUI_DISABLE Then GUICtrlSetState($Btn_Proceed, $GUI_ENABLE)
    Else
        If BitAND(GUICtrlGetState($Btn_Proceed), $GUI_ENABLE) = $GUI_ENABLE Then GUICtrlSetState($Btn_Proceed, $GUI_DISABLE)
    EndIf
WEnd

;; Add the rest of your code here because the GUI is gone and it's ready to proceed to your next step

Func _ValidUser($s_UserName)
    ;; Allow only a-z, A-Z, _ and spaces in the username.  This can be easily changed to allow all characters
    If StringRegExp($s_UserName, "(?i)[^\w\s]") Then
        GUICtrlSetData($In_UserName, StringTrimRight(GUICtrlRead($In_UserName), 1))
        GUICtrlSetState($In_UserName, $GUI_FOCUS)
        Return False
    EndIf
    Return StringRegExp($s_UserName, "^[\w\s]{4,20}");; Change the 20 to a lower value to reduce the maximum number of characters, Increase the 4 to Increase the minimum
EndFunc

Func _ValidPass($s_Password)
    ;;Check for invalid characters
    If StringRegExp($s_Password, "(?i)[^a-z0-9]") Then
        MsgBox(4096, "Error", "Invalid password character" & @CRLF & "Please try again.")
        GUICtrlSetData($In_Password, StringTrimRight(GUICtrlRead($In_Password), 1))
        GUICtrlSetState($In_Password, $GUI_FOCUS)
        Return False
    EndIf
    Return StringRegExp($s_Password, "(?i)^[a-z0-9]{6,20}")
EndFunc

be sure to read the commented portions of the code and if you have questions post back

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Your best bet is a custom GUI so you don't have to do the nested loops. This works for me.

#Include<EditConstants.au3>
#Include<GUIConstantsEx.au3>
#Include<WindowsConstants.au3>
$Frm_Main = GUICreate("UserName and Password", 300, 150, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_VISIBLE))
GUICtrlCreateLabel("Please enter your username and password", 10, 10, 280, 25)
GUICtrlCreateLabel("UserName", 10, 35, 50, 20)
GUICtrlCreateLabel("Password", 10, 60, 50, 20)
$In_UserName = GUICtrlCreateInput("", 70, 35, 210, 20)
$In_Password = GUICtrlCreateInput("", 70, 60, 210, 20, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD))
$Btn_Proceed = GUICtrlCreateButton("OK", 120, 100, 60, 30)
GUICtrlSetState($Btn_Proceed, $GUI_DISABLE)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Btn_Proceed
            GUIDelete($Frm_Main)
            ExitLoop
    EndSwitch
    ;; this next line sets a minimum length for the username to 4.  You can change the 4 to some other number if you want it longer
    If _ValidUser(GUICtrlRead($In_UserName)) AND _ValidPass(GUICtrlRead($In_Password)) Then
            If BitAND(GUICtrlGetState($Btn_Proceed), $GUI_DISABLE) = $GUI_DISABLE Then GUICtrlSetState($Btn_Proceed, $GUI_ENABLE)
    Else
        If BitAND(GUICtrlGetState($Btn_Proceed), $GUI_ENABLE) = $GUI_ENABLE Then GUICtrlSetState($Btn_Proceed, $GUI_DISABLE)
    EndIf
WEnd

;; Add the rest of your code here because the GUI is gone and it's ready to proceed to your next step

Func _ValidUser($s_UserName)
    ;; Allow only a-z, A-Z, _ and spaces in the username.  This can be easily changed to allow all characters
    If StringRegExp($s_UserName, "(?i)[^\w\s]") Then
        GUICtrlSetData($In_UserName, StringTrimRight(GUICtrlRead($In_UserName), 1))
        GUICtrlSetState($In_UserName, $GUI_FOCUS)
        Return False
    EndIf
    Return StringRegExp($s_UserName, "^[\w\s]{4,20}");; Change the 20 to a lower value to reduce the maximum number of characters, Increase the 4 to Increase the minimum
EndFunc

Func _ValidPass($s_Password)
    ;;Check for invalid characters
    If StringRegExp($s_Password, "(?i)[^a-z0-9]") Then
        MsgBox(4096, "Error", "Invalid password character" & @CRLF & "Please try again.")
        GUICtrlSetData($In_Password, StringTrimRight(GUICtrlRead($In_Password), 1))
        GUICtrlSetState($In_Password, $GUI_FOCUS)
        Return False
    EndIf
    Return StringRegExp($s_Password, "(?i)^[a-z0-9]{6,20}")
EndFunc

be sure to read the commented portions of the code and if you have questions post back

Thanks for that code but you can do something like, "please re-type password" ? and doesnt work on my windows XP coz this is Polish XP and Group of Admin called that "Administratorzy" can you fix that ? :x thanks :P
Link to comment
Share on other sites

I can do it by changing the expressions but I'll need the polish Character Set to work with it.

I won't get that part done today. Perhaps we have someone who uses a polish system and also knows Regular Expressions that can jump in before I get to working on it.

Do you know what character ranges we are working with in the ascii set?

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I can do it by changing the expressions but I'll need the polish Character Set to work with it.

I won't get that part done today. Perhaps we have someone who uses a polish system and also knows Regular Expressions that can jump in before I get to working on it.

Do you know what character ranges we are working with in the ascii set?

yes that one: ą , ę , ś , ć , ó , ł , ż , ź, ń.

Edited by Hunterpl
Link to comment
Share on other sites

Okay, we can work with that but like I said it won't be today. I'm getting really busy right now.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Okay, we can work with that but like I said it won't be today. I'm getting really busy right now.

okay i will w8 for that no problem :x so good night :P , and my Question is possible is add preview window with select Skin theme ?

Edited by Hunterpl
Link to comment
Share on other sites

Try changing these 2 functions and see if it works for you. I don't work in Polish so it's a bit difficult for me to test.

Func _ValidUser($s_UserName)
    ;; Allow only a-z, A-Z, 0-9,  and spaces in the username.  This can be easily changed to allow all characters
    If StringRegExp($s_UserName, "(?i)[^a-z0-9\s\300-\377]") Then
        GUICtrlSetData($In_UserName, StringTrimRight(GUICtrlRead($In_UserName), 1))
        GUICtrlSetState($In_UserName, $GUI_FOCUS)
        Return False
    EndIf
    Return StringRegExp($s_UserName, "(?i)^[a-z0-9\s\300-\377]{4,20}");; Change the 20 to a lower value to reduce the maximum number of characters, Increase the 4 to Increase the minimum
EndFunc

Func _ValidPass($s_Password)
    ;;Check for invalid characters
    If StringRegExp($s_Password, "(?i)[^a-z0-9\300-\377]") Then
        MsgBox(4096, "Error", "Invalid password character" & @CRLF & "Please try again.")
        GUICtrlSetData($In_Password, StringTrimRight(GUICtrlRead($In_Password), 1))
        GUICtrlSetState($In_Password, $GUI_FOCUS)
        Return False
    EndIf
    Return StringRegExp($s_Password, "(?i)^[a-z0-9\300-\377]{6,20}");; Can be modified the same as the Valid User function.
EndFunc

EDIT:

Because of page encoding issues I can't get the list of special characters you sent to work properly for me so here is what you do;

any special characters you want to accept should be added to all of the expressions right after the \377. This should work fine for anyone using the same encoding as you. If you are working in SciTE then you will also have to check the encoding there, File>Encoding> select the proper one.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Try changing these 2 functions and see if it works for you. I don't work in Polish so it's a bit difficult for me to test.

Func _ValidUser($s_UserName)
    ;; Allow only a-z, A-Z, 0-9,  and spaces in the username.  This can be easily changed to allow all characters
    If StringRegExp($s_UserName, "(?i)[^a-z0-9\s\300-\377]") Then
        GUICtrlSetData($In_UserName, StringTrimRight(GUICtrlRead($In_UserName), 1))
        GUICtrlSetState($In_UserName, $GUI_FOCUS)
        Return False
    EndIf
    Return StringRegExp($s_UserName, "(?i)^[a-z0-9\s\300-\377]{4,20}");; Change the 20 to a lower value to reduce the maximum number of characters, Increase the 4 to Increase the minimum
EndFunc

Func _ValidPass($s_Password)
    ;;Check for invalid characters
    If StringRegExp($s_Password, "(?i)[^a-z0-9\300-\377]") Then
        MsgBox(4096, "Error", "Invalid password character" & @CRLF & "Please try again.")
        GUICtrlSetData($In_Password, StringTrimRight(GUICtrlRead($In_Password), 1))
        GUICtrlSetState($In_Password, $GUI_FOCUS)
        Return False
    EndIf
    Return StringRegExp($s_Password, "(?i)^[a-z0-9\300-\377]{6,20}");; Can be modified the same as the Valid User function.
EndFunc

EDIT:

Because of page encoding issues I can't get the list of special characters you sent to work properly for me so here is what you do;

any special characters you want to accept should be added to all of the expressions right after the \377. This should work fine for anyone using the same encoding as you. If you are working in SciTE then you will also have to check the encoding there, File>Encoding> select the proper one.

the creator cant make account did you change group ENG: Administrator to PL: "Administratorzy" ? i just went in panel control with users and nothing there is only mine no account what i created by creator something is wrong.
Link to comment
Share on other sites

Right now I'm hopelessly lost with this. I'll have to sit and study it all over again.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...