Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31598
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <tolidtm@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; '"win32"': 0.09; 'effect.': 0.09; 'success:': 0.09; 'cc:addr:python-list': 0.10; 'oct': 0.16; 'posted.': 0.16; 'rights,': 0.16; 'subject:Change': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'admin': 0.18; 'windows': 0.19; 'module': 0.19; 'import': 0.21; 'received:209.85.214.174': 0.21; 'ctypes': 0.22; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'url:mailman': 0.29; 'url:python': 0.32; 'url:listinfo': 0.32; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'url:org': 0.36; 'test': 0.36; 'thank': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'received:209.85.214': 0.39; 'hello,': 0.39; 'header:Received:5': 0.40; 'help': 0.40; 'url:mail': 0.40; 'success': 0.63; 'skip:w 60': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ASPpTuTD6SUp/2wvVzKRl1wcYIGuBjZ/YEV3WcCdcjY=; b=AR61AkK+ZASrXjNXdOHvo8qcFd4wS5n9m8wlkBHoa2uyZPOGZsh5sZfXS5BVxfFlmD dbVcW/yR8AuZRA0YoRCMfUOf2i5zHNueQ4gBmudslR95na1F1aD9pZxeOKlv+mir5jxm /uTGJzEQ5aswi0idE5TuGvRtnHGwMhoQRLPpHpHGGzue5tzm+PrfAX5ZbzKP9FNp9aBd DtsY7XC+8vmypD07crMPQl7/dKpsrzHHG4XRkhHux0eUw/EfsQ1y0Hp8Yq/pTQ0XQPR1 gMWCjRJBinuv6W8Y51pl7HfVDWnwdSf8jDMEhsJGG915ZgZ6uT9YRz4CPwh1bmDwSpxC gN+A== |
| MIME-Version | 1.0 |
| In-Reply-To | <CALwzidnMxbp5vOXN7BTdTEb=swd8nLcETugvyr--ZTj7A1=cTQ@mail.gmail.com> |
| References | <CAKhY55NpUnZ3PdZczo2kv-DezMsz0TjWAvPST5cRZyAY30MPaA@mail.gmail.com> <CALwzidnMxbp5vOXN7BTdTEb=swd8nLcETugvyr--ZTj7A1=cTQ@mail.gmail.com> |
| Date | Thu, 18 Oct 2012 08:41:00 +0200 |
| Subject | Re: Change computername |
| From | Anatoli Hristov <tolidtm@gmail.com> |
| To | Ian Kelly <ian.g.kelly@gmail.com> |
| Content-Type | text/plain; charset=UTF-8 |
| Cc | Python <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2406.1350542463.27098.python-list@python.org> (permalink) |
| Lines | 32 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1350542463 news.xs4all.nl 6985 [2001:888:2000:d::a6]:51653 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:31598 |
Show key headers only | View raw
Thank you,
I will test this, will keep you posted.
Anatoli
On Wed, Oct 17, 2012 at 7:47 PM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> On Wed, Oct 17, 2012 at 8:07 AM, Anatoli Hristov <tolidtm@gmail.com> wrote:
>> Hello,
>>
>> Can you please help me out how can I change the computername of
>> windows XP with or without the "WIN32" module ?
>
> Untested:
>
> from ctypes import *
>
> ComputerNamePhysicalDnsHostname = 5
>
> computer_name = u'COMPUTER'
>
> success = windll.kernel32.SetComputerNameExW(ComputerNamePhysicalDnsHostname,
> computer_name)
> if success:
> print("Name changed")
> else:
> print("Failed")
>
> The process will need admin rights, and the computer will need to be
> rebooted before the change will take effect.
> --
> http://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Change computername Anatoli Hristov <tolidtm@gmail.com> - 2012-10-18 08:41 +0200
csiph-web