"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?