-
-
Notifications
You must be signed in to change notification settings - Fork 989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nmap: Extract and install npcap #260
Conversation
The uninstall need privileges. nmap uninstaller won't uninstall npcap so there is no problem before. By the way, could anyone have a look at ScoopInstaller/Scoop#3567 ? With sudo it works. Will it be fixed or we need to use sudo instead? |
In my opinion, if an app needs elevation to install/uninstall, it should depend on sudo, and then use it to install the app. See https://github.com/lukesampson/scoop-extras/blob/e73c63bfbe3f369a126c4c74fd9baf8e7ff08281/bucket/pritunl-client.json#L16 for an example. |
See ScoopInstaller/Extras#2464, you could use |
I suggest But this param was fixed in ScoopInstaller/Scoop#3547 and not be merged into |
@niheaven It works well, thanks. If it can be write as
it would be better 😂 |
Wow, right, I'll do this works in ScoopInstaller/Scoop#3502 |
Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think that RunAs usage is good for Main bucket. Will there be UAC popup? Will it fail if no administrator terminal / sudo is not used?
bucket/nmap.json
Outdated
"/S", | ||
"/D=$dir" | ||
] | ||
"script": "Invoke-ExternalCommand -FilePath \"$dir\\npcap.exe\" -ArgumentList \"/S /D=$dir\\npcap\" -RunAs | Out-Null" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unescaped dir after /D
"script": "Invoke-ExternalCommand -FilePath \"$dir\\npcap.exe\" -ArgumentList \"/S /D=$dir\\npcap\" -RunAs | Out-Null" | |
"script": "Invoke-ExternalCommand -FilePath \"$dir\\npcap.exe\" -ArgumentList \"/S /D=\"\"$dir\\npcap\"\"\" -RunAs | Out-Null" |
Try installation with single quotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't work with quotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nsis requires /D$dir
. It breaks with quotes. See ScoopInstaller/Scoop#2003
Co-Authored-By: Jakub Čábera <cabera.jakub@gmail.com>
@Ash258 RunAs shows a UAC pop. |
Now npcap will be installed in nmap directory.
Due to unknown reasons, uninstall will fail and need to uninstall manaully.Can be merged after ScoopInstaller/Scoop#3547