[python-win32] rename computer

cd christophedeze at wanadoo.fr
Mon Dec 19 15:26:17 CET 2011




thanks
it works
but I prefere to use a builtin" system call or somethings like this, in order to avoid invalid hostname.
I hope wmi can valid hostname for me





> Message du 19/12/11 14:31
> De : "Scott Leerssen" 
> A : "cd" 
> Copie à : 
> Objet : Re: [python-win32] rename computer
> 
> 
> On Dec 19, 2011, at 6:57 AM, cd wrote:
> 
> > hello
> > I didn't find any example of howto rename a windows computer with python ?
> > 
> > i've tried with wmi unsuccessfully ....
> > 
> > thanks for any halps 
> > 
> > Christophe
> 
> I do it by setting the following registry values:
> 
> 'HKLM\\System\\CurrentControlSet\\Control\\ComputerName\\ComputerName',
> 'ComputerName',
> 
> 'HKLM\\System\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName',
> 'ComputerName',
> 
> DHCP might set the following for you, but if you are using static addressing, you'll want to set them as well:
> 
> 'HKLM'\\System\\CurrentControlSet\\Services\\Tcpip\\Parameters',
> 'Hostname',
> 
> 'HKLM\\System\\CurrentControlSet\\Services\\Tcpip\\Parameters',
> 'NV Hostname',
> 
> 
> 


More information about the python-win32 mailing list