» Site Navigation |
|
|
» Stats |
Members: 9,498
Threads: 11,753
Posts: 55,312
Top Poster: Nick (4,981)
|
| Welcome our newest member, Junior |
» March 2010 |
| S |
M |
T |
W |
T |
F |
S |
| 28 |
1
|
2
|
3
|
4
|
5
|
6
|
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
|
28
|
29
|
30
|
31
| 1 | 2 | 3 |
|
 |
08-01-2007, 06:14 PM
|
#1 (permalink)
|
Status: Altiris Admin
Join Date: 07-20-2007
Location: NYC
Posts: 30
|
Script to change 'Log on to' ?
Is there a way to change the 'Log on to' of a group of computers from COMPNAME (this computer) to the domain?
Users are not able to log in because they are logging into the local computer instead of logging into the DOMAIN.
|
|
|
08-01-2007, 07:56 PM
|
#2 (permalink)
|
Status: Super Altiris Admin
Join Date: 01-23-2006
Location: Anchorage, Alaska, USA
Posts: 817
|
Copy this text into notepad and save it with a .reg extension.
Code:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"=""
"DefaultDomainName"="<domain-name-here>"
Use a Run Script job to call the file.
|
|
|
08-01-2007, 07:59 PM
|
#3 (permalink)
|
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,981
|
Sticky
__________________
Scire potentia est (knowledge is power)
|
|
|
08-01-2007, 08:13 PM
|
#4 (permalink)
|
Status: Super Altiris Admin
Join Date: 01-23-2006
Location: Anchorage, Alaska, USA
Posts: 817
|
My first sticky! 
|
|
|
08-01-2007, 08:19 PM
|
#5 (permalink)
|
Status: Altiris Admin
Join Date: 07-20-2007
Location: NYC
Posts: 30
|
Quote:
|
Originally Posted by jenifer.arnold
My first sticky! 
|
LOL, Congrats and Thanks! 
|
|
|
10-11-2007, 01:58 PM
|
#6 (permalink)
|
Status: Junior Altiris Admin
Join Date: 10-11-2007
Location: USA
Age: 33
Posts: 6
|
Logon As.. Reset
Ok, here goes Post #1.
Here is an alternative I deploy using Altiris DC as a vbScript job.
Code:
' Reset Default Logon to most Receintly Accessed Profile
'vbscript
'** Written by:
'** Dane Jones
'** Description:
'** This script will reset the default logon screen to display the most reciently access profile/user.
'** This was written for remote administrators to be able to quickly reset the logon after loggin on as the Administrator.
'** You can add additional accounts to ignore on line 74.
'** Define Variables
Dim WshShell' As WScript.Shell
Dim UserName' As String
Dim IsVerbose_STATIC' As Boolean
'** Declare Constants
Const KeyPath = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\"' As String
Const DomainName = "<YourDomain>"
'** Create Objects
Set WshShell = CreateObject("WScript.Shell")
'** Guess the User's Name
UserName = GuessName
'** Display Dialog
If IsVerbose Then _
UserName = InputBox("Please enter username.", "Logon Reset", UserName)
If UserName = "" Then WScript.Quit 1
'** Set User Name
WshShell.RegWrite KeyPath & "AltDefaultUserName", UserName, "REG_SZ"
WshShell.RegWrite KeyPath & "DefaultUserName", UserName, "REG_SZ"
'** Set Domain
WshShell.RegWrite KeyPath & "AltDefaultDomainName", DomainName, "REG_SZ"
WshShell.RegWrite KeyPath & "DefaultDomainName", DomainName, "REG_SZ"
'** Hide Logon Options
WshShell.RegWrite KeyPath & "ShowLogonOptions", 0, "REG_DWORD"
'** Close
If IsVerbose Then _
MsgBox "User's Domain Information Set",,"Logon Reset"
'** Function to Guess User Name
Function GuessName()' As String
Dim fso' As Scripting.FileSystemObject
Dim Profiles' As SubFolders
Dim Profile' As Folder
Dim Candidate' As Array
Dim NTUserDate' As Date
Const NTUSerDAT_Name = "NTUSER.DAT"' As String
Const ProfilePath = "C:\Documents and Settings\"' As String
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FolderExists(ProfilePath) Then
GuessName = ""
Exit Function
End If
Set Profiles = fso.GetFolder(ProfilePath).SubFolders
'** Define Candidate Structure
Candidate = Array(DateValue("Jan 1, 1980"), "")
'** Search Profiles
For Each Profile In Profiles
Select Case UCase(Profile.Name)
'** Ignore Special Accounts
Case "ADMINISTRATOR", "ALL USERS", "DEFAULT USER", "LOCALSERVICE", "NETWORKSERVICE"
'** Do Nothing
Case Else
NTUserDate = Profile.Files(NTUSerDAT_Name).DateLastModified
'Set NTUserDAT = Profile.Files(NTUSerDAT_Name)
If NTUserDate > Candidate(0) Then
Candidate(0) = NTUserDate
Candidate(1) = Left(UCase(Profile.Name), 2) & Mid(Replace(LCase(Profile.Name),"." & LCase(DomainName),""), 3)
End If
End Select
Next
'** Return Guess
Debug.WriteLine "Guessed Name: " & Candidate(1)
GuessName = Candidate(1)
End Function
'** Process Any Command Line Switches
Function IsVerbose()' As Boolean
If IsEmpty(IsVerbose_STATIC) Then
IsVerbose_STATIC = False
If WScript.Arguments.Count > 0 Then _
If UCase(WScript.Arguments.Item(0)) = "-V" Then _
IsVerbose_STATIC = True
End If
IsVerbose = IsVerbose_STATIC
End Function
|
|
|
 |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|