VBS  VBA Word  VBA Excel  VBA Access  VB 6.0  Registry key  Java Script  CMD  ASP 
 

  
Add Template to rightclick
AddGlobalGroupToLocal
AddToLocalAdm
AddWindowsPrinter
ArangeWindows
Caluclate
cert
ChPermisionOnFiles
Create entry in Saplogon.ini
DisarmScreensaver
Enumerate computer accounts
enumerate domains
Enumerate groups
Enumerate sorftware
Enumerate user accounts
Environment var
Get WSH Version
GetPCName
GetUserName
GroupMembership.vbs
Identify OS
ListAddRemovePrograms
Logoff
MapDrv
MonitorApp
Progress_bar
Read in file
ReadDiffOSRegKey
Reboot
Require a Password Change
SendMail
SetPassword
Start_serviceses
Track Script In Browser
UnlockUserAccount
UserIsLogedOnPCName
Write to Event Log
  Home    Logbook    Photos    Links    Tools    Scripts 

UnlockUserAccount

Checks if user account is locked, if it is the script asks you if you wish to unlock
'On Error Resume Next

Dim User
Dim UserName
Dim UserDomain
UserDomain = "CRB"
UserName = InputBox("Type UserName to se if the Account is locked", "Account Locked ?", "concwo")
if UserName <> "" then
	Set User = GetObject("WinNT://" & UserDomain & "/" & UserName & ",user")
	If User.IsAccountLocked = True then
		MsgBox Username & ": Account is Locked" 
		If Msgbox ("Unlockacount?",vbYesNo)=vbYes then
			User.IsAccountLocked = false
			User.SetInfo
		end if
	Else
		MsgBox Username & ": Account is Open"
	End If
end if 


			   


Bookmark this page Danmarks Meteorologiske institut Dansk Drageflyver Union Check out MySpace Looking for somthing?