nsh | A command-line shell like fish , but POSIX | Command Line Interface library
kandi X-RAY | nsh Summary
kandi X-RAY | nsh Summary
A command-line shell that focuses on productivity and swiftness featuring:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nsh
nsh Key Features
nsh Examples and Code Snippets
Community Discussions
Trending Discussions on nsh
QUESTION
I have created an installer using NSIS package to install my own software along with some 3rd party softwares such as Notepad++ and winPython. Batch scripts are being run to install notepad++ and winPython. The winPython which is packaged into the installer is in a zipped format "winPython3940.7z". This is being unzipped into a folder as a part of the installer using the following .nsh
script.
ANSWER
Answered 2022-Feb-25 at 18:44That message is not coming from NSIS, it must be from something inside your batch file, perhaps 7-Zip.
There is no reason to use a batch file to delete something, just use NSIS:
QUESTION
I'm trying to compile a script, perfectly working with NSIS installing version, by NSIS partable version but it doesn't work.
Other .nsh
files, also natively available in Include
folder of NSIS portable version, called by the script are working well. The web downloaded zipdll.nsh
file, added in a second time into the Include
folder of NSIS portable version, is at moment the only file called by the script that doesn't work!
The compiler gets back the following message:
...ANSWER
Answered 2022-Jan-04 at 15:25That file contains multiple languages but is not valid UTF-8 so you have to force the codepage:
QUESTION
I'm trying to put various images (as icons) in a single custom page using nsDialogs.
This example i provided do that, but it only shows the first image. But if i comment/delete the code for the first image, shows the second one, if i do the same with the second one, it shows the third, and so on.
Screenshot: Custom page with the code provided: Only one icon is shown when are set four with the same code.
For me i am missing something but i have searched for a example of using NSD_CreateIcon/NSD_SetIcon to help with this with any luck. Also i tried to use NSD_CreateBitmap/NSD_SetBitmap instead, but i have the same issue (and i want the icons better because they have transparency).
Here is the code:
...ANSWER
Answered 2021-Dec-20 at 00:04- You are missing a Pop after nsDialogs::Create.
- There is no px suffix.
- You are missing the last parameter when creating the controls.
QUESTION
I am generating a link using NSIS installer. My program did not work correctly when starting from the Desktop shortcut. So I created another shortcut by right-clicking on the desktop. The program worked. The difference is that the NSIS generated shortcut property "Start in" had c:\MyProgram\x86. The Windows generated shortcut property "Start In" just had c:\MyProgram. Is there a way from within the NSIS installer to set the property "Start in" to exclude the \x86? Here is the line that generates the shortcut:
...ANSWER
Answered 2021-Dec-15 at 21:55First of all, if your application relies on the working directory ("Start in") to be set to the same folder as the .exe then it is broken. The working directory can be anything if the user invokes your application with "Open with" or from a terminal. Don't read/load anything relative to .\
in your application other than filenames passed as command line parameters.
Why does your shortcuts working directory end with \x86? Because you asked it to!
From the CreateShortcut documentation:
$OUTDIR is stored as the shortcut's working directory property. You can change it by using SetOutPath before creating the shortcut or use /NoWorkingDir if you don't need to set the working directory property.
From your example $OUTDIR is set by SetOutPath "c:\test22\x86\"
. To set a specific directory for the shortcut, use SetOutPath
before CreateShortcut
.
QUESTION
I'm doing my first NSIS script but i found a bump in the road. In fact i think is hard to explain only in the title, (maybe someone can help with that to) so let me explain fully:
I'm creating a installer that uses a few custom pages because i want the user select some options first (it uses nsDialogs), and depending of that do some tweaks in the with installation path (mostly autodetect it because it could depend to other things). All of this is working fine.
In some cases of that options, between checking if some files exists, it hash a file to look if the file is the one it expects (because it's going to patch it with a delta later). I used Crypto plugin or MD5 plugin, both are fine and both do what i want, but they hang the installer for a while (a second or so), i suppose because the file is a little big (it's about more than 100MB) and near that is the issue.
Normally in these cases, you select the option, goes to the next (custom) page, and in the creator function of the custom page autodetects the folder, and it directly do the file checks and when is checking the file hash, it hangs for a second and continues, but all this time hanged it only shows a blank page, because it didn't reach yet in the creator function the nsDialogs::Show instruction to show the window content. In that page you can change the folder, and if it's the case, once is changed it runs the checks again (it's a dedicated function that was called in both cases) and hangs again for a bit, but then the window shows everything and i can set a text to say something (in fact, it is what i did first), but with that automatic first time i can't do this.
That's the point: how to show something to the user to aware them about the installer is doing the hash calculations, instead showing only a blank window.
What I have tried or thought to do:
- With nsDialogs, because it did the calculations first and didn't reach the nsDialogs::Show until later, i can't display anything in the window at that point (or, at least, is what i read in all the documentation i found about that). And, like the documentation says and it was tested, everything you put after the nsDialogs::Show instruction is executed when you push the next or back button.
- Seeing that with nsDialogs at first not seems the way to go, i was searching if it's possible to show a window above the installation window (something like a MessageBox) and close it automatically, before and after the hash calculation respectively, showing only a text with a "Please wait" or kind of. But i didn't find a way to do it.
- Maybe with a timer and do the checks a few miliseconds after could be done, but it seems to me a very cheap way to do it with some issues waiting to happen, mostly because depends of the machine speed, something i could do only in a last resort if it makes to show first the window with nsDialogs::Show, and later execute the check files with a timer. But, i want to do the checks as the folder is set because that function enables the "Next" button and i want that as soon as is possible, and adding timers to this doesn't look right.
- Or is other more stylish way to do this but i didn't figure it out yet.
if it is not well understood the topic, i could add a little example tomorrow created from scratch to show this, because my main test is so big that is not point to paste all of that here.
Thanks!
EDIT:
This is the original example with the issue (Don't forget to add a path to a big file as marked):
...ANSWER
Answered 2021-Dec-15 at 02:51You are not really supposed to do heavy work on the custom pages. You can use the BgWorker plug-in to do background work. Combine that with a timer hack and you get this:
QUESTION
I'm working with an electron application that is built via electron-builder. When I generate the installer and begin installing with it, I see that the cancel button is disabled.
I've looked around at some electron builder documentation and done a few google searches but I seem to be coming up blank here.
edit: Discovered that I can use build/installer.nsh to actually modify UI elements, now I'm just wondering, how do I gain access to the button to enable / disable it, the examples I've seen use an .ini file to store options or something similar, but I'm getting recommendations to use nsDialogs.
Is nsDialogs something that's already readily accessible to me or do I need to import something into my installer.nsh file to use nsDialogs?
And by that token, how would I access the cancel button in nsDialogs?
Is there a configurable value that enables me to... enable that cancel button so users can choose to cancel during installation?
Thanks!
...ANSWER
Answered 2021-Nov-30 at 00:39NSIS installers do not support canceling the installation when you enter the InstFiles page (or any page after it). This is by design because of how the scripting language works.
If you don't mind hacks you can call the uninstaller when the user clicks cancel during the install phase:
QUESTION
I am trying to connect to multiple switches via telnet and get an output with CPU usage. One thread works and shows the proper CPU Usage. The second thread does not do anything. How do I get two threads working with the same command as the first.
...ANSWER
Answered 2021-Oct-05 at 02:26You create connection to only one switch
QUESTION
First, Forgive me for my poor English~ Hello, I need finish this question: If user installed my application, update to application, I want to the install program no show the MUI_PAGE_DIRECTORY, if people never installed, can show MUI_PAGE_DIRECTORY. But Found out I couldn't do it when I write install.nsh. such as
...ANSWER
Answered 2021-Jul-14 at 15:42To skip a page, call Abort
in the page pre callback. I have no idea how you do this in Electron builder but in normal NSIS you do this:
QUESTION
I wrote a shell script which checks if a remote server is reachable. If it is reachable, it runs via ssh a command at a different server. After that, it does some rsync tasks.
Everything works well, so I wrote a plist-files to run the whole staff every 4 hours.
What's work:
- The script is triggered as expected (I saw it at stdout-file).
- launchctl start myjob works fine too (I saw it at stdout-file).
My problem:
If the job starts during the macbook sleeps, the ping works well, but the ssh command doesn't come back. The command is executed at the server, but the script stops there. If I kill the process with the ssh-command the script finish well.
What can I do to get more information. What could be the error? What could be another solution (Timemachine is not an option, because I want a general readable backup)?
Mac OS BigSur 11.4 M1-Chip
Here my plist-files
...ANSWER
Answered 2021-Jul-03 at 10:35I switch to a different approach. I install sleepwatcher which notify if a macbook is wake up. Furthermore, I combined this with a script which ensures that not on every wake up the backup is running. Here the script
QUESTION
After bumping the node version on my Firebase project from node 10 to node 14 in my package.json, like so:
...ANSWER
Answered 2021-Jun-07 at 13:13After looking at the Cloud Build from the Google Cloud Console, I've noticed that the following error:
2021-06-07T03:28:00.714478581ZStep #4 - "builder": src/cloud_functions/userInfo/https/onCall/uploadAvatar.ts(4,19): error TS7016: Could not find a declaration file for module 'sharp'. '/workspace/node_modules/sharp/lib/index.js' implicitly has an 'any' type.
To fix this, I simply added the following code in the tsconfig.json:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nsh
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page