public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Wedge Jarrad <wedge.jarrad@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Windows hostname change fails in recent versions of Cygwin (since 1.7.28)
Date: Tue, 15 Apr 2014 00:06:00 -0000	[thread overview]
Message-ID: <CAKJ_xGue=Q6H+qVboF3CpSJX0C_yzJh1Dz4jSO5Y6FrTe-ZZJg@mail.gmail.com> (raw)
In-Reply-To: <2410568999.20140415032658@yandex.ru>

Thank you for the replies.

>>> The following command used to allow me to change the hostname of a Windows
>>> machine:
>>>
>>> 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.

ERROR:
Description = Invalid query

-Jarrad

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

      reply	other threads:[~2014-04-15  0:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 22:28 Wedge Jarrad
2014-04-14 22:39 ` Larry Hall (Cygwin)
2014-04-14 23:35   ` Andrey Repin
2014-04-15  0:06     ` Wedge Jarrad [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKJ_xGue=Q6H+qVboF3CpSJX0C_yzJh1Dz4jSO5Y6FrTe-ZZJg@mail.gmail.com' \
    --to=wedge.jarrad@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).