From: Thomas Schweikle <tschweikle@bfs.de>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: installing/updating silently
Date: Thu, 20 Apr 2023 13:22:43 +0000 [thread overview]
Message-ID: <c7e8fae4-6a64-1691-69bf-45b31cdd7fb2@bfs.de> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 1527 bytes --]
Hi!
Trying to install or upgrade cygwin silently. Calling a newly downloaded
setup-x86_64.exe (Power Shell-snipplets):
$URL = "https://www.cygwin.com/setup-x86_64.exe"
$dlp = "C:\INSTALL\Apps\c\cygwin"
$nsf = "$dlp\setup-x86_64.new"
$isf = "$dlp\setup-x86_64.exe"
$isl = "$dlp\setup-x86_64.log"
$ise = "$dlp\setup-x86_64.err"
$cll = "$dlp\setup-x86_64.cll"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri $URL -OutFile $nsf
$ProgressPreference = 'Continue'
if (Test-Path -Path $isf -PathType Leaf) {
Remove-Item -Path $isf
}
Rename-Item -Path $nsf -NewName $isf
$SetupOpts = @{
FilePath = $isf
ArgumentList = @(
"--verbose",
"--delete-orphans",
"--upgrade-also",
"--quiet-mode",
"--wait",
"--no-desktop",
"--local-package-dir", "`"$localDir`"",
"--proxy", "`"<proxy>:8080`"",
"--root", "`"C:\cygwin`""
)
WindowStyle = "Hidden"
PassThru = $True
Wait = $True
RedirectStandardOutput = "$isl"
RedirectStandardError = "$ise"
}
$proc = Start-Process @SetupOpts
Setup starts, but then does nothing. It does create the logs, but they
do not contain anything. They stay empty. Anything missing from the options?
Calling the power shell script from an elevated prompt directly seems to
work as expected. It bails out if it is not an elevated prompt. Calling
it remotely it hangs and nothing happens. Any idea? Any hint?
--
Thomas
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2521 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 321 bytes --]
reply other threads:[~2023-04-20 13:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=c7e8fae4-6a64-1691-69bf-45b31cdd7fb2@bfs.de \
--to=tschweikle@bfs.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).