PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

auto local admin login by using .REG files

 
 
=?Utf-8?B?QmVuIEhhcnQsIENFTVZLLUlNLUM=?=
Guest
Posts: n/a
 
      8th Oct 2004
Hi, Im trying to configure a Norton Ghost task to push out a couple of .reg
files, apply them then reboot the pc. Upon rebooting, the pc will
automatically login using the local Administrator credentials. Which I
already have a .reg file that does set the DefaultUserName and
DefaultPassword to what I want, but here's my problem. Since every computer
name is different, I need a way to apply the correct domain(pc name) into the
Logon To: field. I have found that under:
HKCU\Software\Microsoft\Windows\ShellNoRoam=hostname...so what Im thinking if
maybe I could write a batch file to somehow pull the value of the ShellNoRoam
key and place it into HKLM\Software\Microsoft\Windows
NT\CurrentVersion\AutoLogon-AltDefaultDomainName key.

I have found that I could use "regedit /e File_Name.reg
HKCU/Soft/Micro/Win/blah_blah to export a certain registry key. But I
cannot for the life of me figure out how to apply what I've exported back
into the registry under a different key name.

Can anyone help me on this?

The ultimate goal is to be able to pull down a users data/files into a
Desktop DNA image, then push out a standard ghost image, then reapply the DNA
file..all totally automatic. This issue with auto login is my first hurdle.

Thanks to anyone that can shed some light!!!
 
Reply With Quote
 
 
 
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a
 
      8th Oct 2004
Ben Hart, CEMVK-IM-C wrote:

> Hi, Im trying to configure a Norton Ghost task to push out a couple of .reg
> files, apply them then reboot the pc. Upon rebooting, the pc will
> automatically login using the local Administrator credentials. Which I
> already have a .reg file that does set the DefaultUserName and
> DefaultPassword to what I want, but here's my problem. Since every computer
> name is different, I need a way to apply the correct domain(pc name) into the
> Logon To: field. I have found that under:
> HKCU\Software\Microsoft\Windows\ShellNoRoam=hostname...so what Im thinking if
> maybe I could write a batch file to somehow pull the value of the ShellNoRoam
> key and place it into HKLM\Software\Microsoft\Windows
> NT\CurrentVersion\AutoLogon-AltDefaultDomainName key.
>
> I have found that I could use "regedit /e File_Name.reg
> HKCU/Soft/Micro/Win/blah_blah to export a certain registry key. But I
> cannot for the life of me figure out how to apply what I've exported back
> into the registry under a different key name.
>
> Can anyone help me on this?

Hi

I suggest you use a VBscript (.vbs) for this:

'--------------------8<----------------------

Set oWshNet = CreateObject("WScript.Network")
Set oShell = CreateObject("WScript.Shell")

' get computer name
sComputerName = oWshNet.ComputerName

oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" _
& "\Winlogon\AltDefaultDomainName", sComputerName

'--------------------8<----------------------

WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scr...r/default.mspx
 
Reply With Quote
 
=?Utf-8?B?QmVuIEhhcnQsIENFTVZLLUlNLUM=?=
Guest
Posts: n/a
 
      8th Oct 2004


"Torgeir Bakken (MVP)" wrote:

> Ben Hart, CEMVK-IM-C wrote:
>
> > Hi, Im trying to configure a Norton Ghost task to push out a couple of .reg
> > files, apply them then reboot the pc. Upon rebooting, the pc will
> > automatically login using the local Administrator credentials. Which I
> > already have a .reg file that does set the DefaultUserName and
> > DefaultPassword to what I want, but here's my problem. Since every computer
> > name is different, I need a way to apply the correct domain(pc name) into the
> > Logon To: field. I have found that under:
> > HKCU\Software\Microsoft\Windows\ShellNoRoam=hostname...so what Im thinking if
> > maybe I could write a batch file to somehow pull the value of the ShellNoRoam
> > key and place it into HKLM\Software\Microsoft\Windows
> > NT\CurrentVersion\AutoLogon-AltDefaultDomainName key.
> >
> > I have found that I could use "regedit /e File_Name.reg
> > HKCU/Soft/Micro/Win/blah_blah to export a certain registry key. But I
> > cannot for the life of me figure out how to apply what I've exported back
> > into the registry under a different key name.
> >
> > Can anyone help me on this?

> Hi
>
> I suggest you use a VBscript (.vbs) for this:
>
> '--------------------8<----------------------
>
> Set oWshNet = CreateObject("WScript.Network")
> Set oShell = CreateObject("WScript.Shell")
>
> ' get computer name
> sComputerName = oWshNet.ComputerName
>
> oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" _
> & "\Winlogon\AltDefaultDomainName", sComputerName
>
> '--------------------8<----------------------
>
> WSH 5.6 documentation (local help file) can be downloaded from here
> if you haven't got it already:
> http://msdn.microsoft.com/downloads/list/webdev.asp
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scr...r/default.mspx
>


Thanks Torgier, But I must ask..where does this VBS put the value for
ComputerName? Is it imported straight into the registry?
 
Reply With Quote
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a
 
      9th Oct 2004
Ben Hart, CEMVK-IM-C wrote:

> "Torgeir Bakken (MVP)" wrote:
>>
>> I suggest you use a VBscript (.vbs) for this:
>>
>> '--------------------8<----------------------
>>
>> Set oWshNet = CreateObject("WScript.Network")
>> Set oShell = CreateObject("WScript.Shell")
>>
>> ' get computer name
>> sComputerName = oWshNet.ComputerName
>>
>> oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" _
>> & "\Winlogon\AltDefaultDomainName", sComputerName
>>
>> '--------------------8<----------------------

>
> Thanks Torgier, But I must ask..where does this VBS put the value for
> ComputerName? Is it imported straight into the registry?

Hi

The VBScript above writes the computer name (contained in the variable
sComputerName) to the registry value AltDefaultDomainName under the key
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scr...r/default.mspx
 
Reply With Quote
 
=?Utf-8?B?QmVuIEhhcnQsIENFTVZLLUlNLUM=?=
Guest
Posts: n/a
 
      10th Oct 2004


"Torgeir Bakken (MVP)" wrote:

> Ben Hart, CEMVK-IM-C wrote:
>
> > "Torgeir Bakken (MVP)" wrote:
> >>
> >> I suggest you use a VBscript (.vbs) for this:
> >>
> >> '--------------------8<----------------------
> >>
> >> Set oWshNet = CreateObject("WScript.Network")
> >> Set oShell = CreateObject("WScript.Shell")
> >>
> >> ' get computer name
> >> sComputerName = oWshNet.ComputerName
> >>
> >> oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" _
> >> & "\Winlogon\AltDefaultDomainName", sComputerName
> >>
> >> '--------------------8<----------------------

> >
> > Thanks Torgier, But I must ask..where does this VBS put the value for
> > ComputerName? Is it imported straight into the registry?

> Hi
>
> The VBScript above writes the computer name (contained in the variable
> sComputerName) to the registry value AltDefaultDomainName under the key
> HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scr...r/default.mspx
>


Ok Let me ask you this: Your answers and VB have helped me bypass this
problem, but now I have another smaller issue directly related to this one.
I have compiled into exe, and AutoIt script that only watches for one window,
then once it appears it emulates hitting the "ENTER" key to accept the
window. Now Im wonderig where I could place a reference to this exe to where
it will be ran before anyhting else! The window is part of a group policy
that is enforced through out the entire organization. It is a logon banner
with an OK button. Immediately after hitting Alt+Ctrl+Del to be prompted for
your user/pass, this banner pops up, you must hit OK in order to be promted
for username and password. I want this exe to runbefore then so it can be
"watching" for that logon banner and subsequently emulate the ENTER keystroke
so my local Admin logon will be 100% automatic.

Can you help me with this?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Local Users over Remote Admin Login bjackson1@gmail.com Windows XP Security 3 8th Feb 2007 04:37 AM
auto local admin login by using .REG files =?Utf-8?B?QmVuIEhhcnQsIENFTVZLLUlNLUM=?= Microsoft Windows 2000 Registry Archive 4 10th Oct 2004 07:39 PM
canot login as admin to local machine... =?Utf-8?B?YnVocmVu?= Windows XP Help 0 16th Sep 2004 12:18 AM
How to add/del files or registry in login script when user is not local admin. David Lewis Microsoft Windows 2000 2 15th Oct 2003 07:58 PM
re: Win2K Denying Local Admin Login (Help!) Todd Microsoft Windows 2000 Security 0 20th Aug 2003 08:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:41 PM.