public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Achim Gratz <Stromeko@NexGo.DE>
To: cygwin@cygwin.com
Subject: Re: cygstart --directory switch is ignored when using --action=runas
Date: Mon, 06 Oct 2014 10:42:00 -0000	[thread overview]
Message-ID: <loom.20141006T120610-567@post.gmane.org> (raw)
In-Reply-To: <CAF3aVt-BBe90bAm9wQU1_JcOSeqEqGFAPJJ1-MsM5sKHqmGhMA@mail.gmail.com>

Marcin Kurczewski <rr- <at> sakuya.pl> writes:
> >It seems the --directory switch is ineffective when used with --action=runas
> >when using cygstart. For example:
> >
> >cygstart --action=runas --directory=`cygpath -wa $PWD` cmd.exe /k dir
> >
> >The expected output is the contents of the working directory of the
> >cygwin shell the command was run from.

No, the expected output is exactly what you get unless you already are
running this command from an elevated prompt (which would be a pointless
exercise).  An administrative CMD starts in a freshly created administrative
context separate from your user context and most settings in your user
context (including the current working directory) are not carried over.  If
you want it to have a specific working directory you'll have to CD (mapped
drives only) or PUSHD (also accepts UNC paths).


Regards,
Achim.


--
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

      parent reply	other threads:[~2014-10-06 10:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06  9:03 Marcin Kurczewski
2014-10-06  9:17 ` Marco Atzeri
2014-10-06 10:42 ` Achim Gratz [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=loom.20141006T120610-567@post.gmane.org \
    --to=stromeko@nexgo.de \
    --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).