This is the mail archive of the
mailing list for the Cygwin project.
Re: Windows hostname change fails in recent versions of Cygwin (since 1.7.28)
- From: Wedge Jarrad <wedge dot jarrad at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 14 Apr 2014 17:06:40 -0700
- Subject: Re: Windows hostname change fails in recent versions of Cygwin (since 1.7.28)
- Authentication-results: sourceware.org; auth=none
- References: <CAKJ_xGsTh4agckE4LXozZhbEHYmRffy6HWNDYMEJ8ZfkDC=26Q at mail dot gmail dot com> <534C63A5 dot 9040704 at cygwin dot com> <2410568999 dot 20140415032658 at yandex dot ru>
Thank you for the replies.
>>> The following command used to allow me to change the hostname of a Windows
>>> wmic computersystem where name=\"$COMPUTERNAME\" call rename name=newname
>>> With new installs of Cygwin this seems to have stopped working...
>> OK maybe I'm just missing something but what part of the above uses Cygwin?
> Shell prompt.
> The user were able to execute specific command with previous versions of
> Cygwin1.dll, but unable now.
Yes, exactly. The goal is to be able to SSH to the machine and run the command
but the same error occurs when running from a local Cygwin terminal.
> @Wedge, there was some changes around handling '=', which is SUDDENLY
> considered a separator character (that is, on par with space) for CMD.exe
> batch files parameters.
> I can't recall the exact dates, sorry.
Ok, that being the case what do I need to do to make the command execute
properly? Escaping? Quotes somewhere? I'm at a bit of a loss.
> Also, is the escaping of quotation marks around computer name necessary?
> Try without them.
Seems to be necessary. I get the following error when executing without quotes
and with un-escaped quotes. Even if I hard-code the current hostname rather
than using the $COMPUTERNAME variable.
Description = Invalid query
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple