Jump to content

Win 7: Change Computer Name


rscl
 Share

Recommended Posts

Hello,

I am trying to address a situation wherein a Non-Admin user can change his PC's IP Address, Gateway, Computer Name, Computer Full Name, Computer Description without having to give him the administrator password.

I have managed a script which prompts the user for IP & Gateway.

The script then sets the the IP & G/w using Administrator password hard coded inside the script.

I provide a compiled version of this script to the users.

I have not been successful in changing the `Computer Name`, `Computer Full Name`, `Computer Description` via AutoIT Script.

Can help or pointer is appreciated.

Best regards,

Sanjay

PS: I understand the security aspects & have decided to use this method to manage my network.

Link to comment
Share on other sites

you can just set the registry keys via runas REG Delete/Add commands in the same manner supplying credentials.

(from skinnywhiteguys script) these are the keys that need altered

RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Computername\Computername", "Computername", "REG_SZ", $CompName)
    RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername", "Computername", "REG_SZ", $CompName)
    RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "Hostname", "REG_SZ", $CompName)
    RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "NV Hostname", "REG_SZ", $CompName)
    RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AltDefaultDomainName", "REG_SZ", $CompName)
    RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultDomainName", "REG_SZ", $CompName)
    RegWrite ("HKEY_USERS\.Default\Software\Microsoft\Windows Media\WMSDK\General", "Computername", "REG_SZ", $CompName)
Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...