Après moultes recherches sur le net , je n'arrive pas à trouver l'endroit ou est stoquée l'image ou logo de la session de l'utilisateur.
Et ce aussi bien du coté du VB que de autoit.
Je cherche à automatiser la création de login / password pour créer des installations par défaut pour des PC .
Voici un début de code récupéré sur le net pour la partie création login.
Code : Tout sélectionner
Func CreateAccount($strUserName,$strFullName,$strPassword,$strGroup)
ToolTip ( "$strUserName="&$strUserName&@CRLF&"$strFullName="&$strFullName&@CRLF&"$strPassword="&$strPassword&@CRLF&"$strGroup="&$strGroup , 10 , 10 , "Création User" , 2 , 1)
; RETRIEVE Computer Name
Dim $objNetwork, $strComputerName
$objNetwork = ObjCreate("WScript.Network")
local $strComputer = $objNetwork.ComputerName
local $objUser = ObjGet("WinNT://" & $strComputer & "/" & $strUserName)
If @error then
; Code To add User
local $objSystem = ObjGet("WinNT://" & $strComputer)
local $objUser = $objSystem.Create("user", $strUserName)
$objUser.FullName = $strFullName
$objUser.SetPassword ($strPassword)
;~ Pour Info Voici les différents flags en hexa.
;~ 0x2 Account Disabled
;~ 0x10 Account Locked out
;~ 0x20 Password Not Required
;~ 0x40 Cannot Change Password
;~ 0x10000 Password Never Expires
;~ 0x800000 Password Expired
$objUser.userFlags = 0x10000
$objUser.SetInfo
; Code to add User to Group
local $objGroup = ObjGet("WinNT://" & $strComputer & "/" & $strGroup)
$objGroup.Add("WinNT://" & $strUserName)
Else
MsgBox(0,"Error", "Found :" & $strUserName)
$objUser.FullName = $strFullName
$objUser.SetPassword ($strPassword)
$objUser.SetInfo
EndIf
EndFunc
Cordialement.


