I have written nsis script for my java project. I have successfully created a exe file using this nsis script. Final step of my installation process is installing my application as windows service using a batch file. I have installed successfully through command line using following code
"c:\program Files\program Files\test\bin\prunsrv.exe" //IS//servicename --Startup=auto --Jvm="Auto" --Classpath="%CLASSPATH%" --StartMode=jvm --StartClass=com.class.name --StartParams start --StopMode=jvm --StopClass=com.class.name --StopParams stop
same commands I have executed through nsis script is not working well. I have tried the following code
Exec '"$INSTDIR\bin\prunsrv.exe" //IS//servicename --Startup=auto --Jvm="Auto" --Classpath="%CLASSPATH%" --StartMode=jvm --StartClass=com.class.name --StartParams start --StopMode=jvm --StopClass=com.class.name --StopParams stop'
$INSTDIR refer to this directory c:\program Files\test.
Use ExpandEnvStrings to expand %classpath% before the exec...
Related
Need to run build script in both the environment (windows and Linux).Build script is pointing to the powershell.exe path in window environment and working fine. But at the same time, same build script is not getting the powershell path and throwing error.
Executing task in folder root: PowerShell /home/userName/FolderName/Assetmonitor/scripts/build/client/build-client-dev.ps1 <
The terminal process failed to launch: Path to shell executable "PowerShell" does not exist.
It sounds like your script is trying to call the PowerShell executable, but "powershell" (technically powershell.exe) only exists on Windows and is the executable for powershell 5.x and earlier. The executable for PowerShell 7, which is the only version I'm familiar with that's available on Linux, is named "pwsh"(pwsh.exe on Windows).
I would recommend either: 1) installing PowerShell 7 on your Windows boxes and changing the script to call for pwsh instead of "PowerShell" (remember that Linux is case-sensitive), or 2) creating a symbolic link to somewhere in your existing $PATH environment variable (like /usr/local/bin/) that points "PowerShell" to wherever your PowerShell 7 is installed on Linux.
The default path to the actual pwsh program, if you use the latest build files from Microsoft, is /opt/microsoft/powershell/7/pwsh, but that's already symlinked to /usr/bin/pwsh so you could link there instead:
sudo ln -s /opt/microsoft/powershell/7/pwsh /usr/local/bin/PowerShell
I want to execute this script pm2 start d:\nodejs\ecosystem.config.js using .bat file
(I'm on windows 10)
but when I execute .bat file, it didn't work
I can't find any clues on any web, google
node d:\nodejs\ecosystem.config.js
Above command should execute the javascript file if the node is installed in the PC.
I'm wondering how to start "Xilinx SDK Eclipse GUI" (XSDK) directly from the command line?
Currently, I'm launching XSDK by first launching "vivado", and then going to the "File->Launch SDK" menu. However, this is a bit cumbersome to always open Vivado first, just to open "Xilinx SDK". What I want to do, is launch "Xilinx SDK" directly from my Git bash Shell under windows 10 and then open the previous project under "project_1.sdk" and to continue with what I was working on last time.
My Git Bash Setup:
#~/.bashrc:
export PATH=/c/Xilinx/Vivado/2017.3/bin:$PATH
export PATH=/c/Xilinx/SDK/2017.3/bin:$PATH
Then:
$ xsdk -workspace your_project_dir.sdk &
Also:
$ xsdk -h
Display Options:
-help
Help -- just display this message and quit.
-version
Display Version and quit.
-batch
SDK Tcl Batch Mode.
-wait
Wait for SDK to complete.
Options:
-workspace <Workspace location>
Specify the Workspace directory for SDK projects
-hwspec <hardware specification file>
Specify the XML file to load.
-bit <bitstream file>
Specify the Bitsteam file to use for programming FPGA
-bmm <bmm file>
Specify the BMM file to use for BRAM initialization
-batch -source <tcl script file>
Specify tcl Script file to executee all commands in SDK batch mode
{-lp <repository_path>}
Add <repository_path> to the list of Driver/OS/Library search directories.
-eclipseargs <eclipse arguments>
Any other arguments that should be passed to Eclipse.
This should follow all other SDK arguments.
-vmargs <java vm arguments>
Any other arguments that should be passed to Java VM.
This should follow all other SDK arguments.
Also useful:
SDK Command Line Batch Mode
The Eclipse/SDK can be launched in these two other ways
(1) Launch from the Vivado TCL Command Line:
Going from Vivado to SDK often has these steps
- File > Export (Hardware)
- File > Launch SDK
Each of these commands prints information in blue text in the Tcl Console.
Those commands can be copied into a tcl script and run from Tcl Console.
By default Tcl runs from this folder
C:\Users\WinUserName\AppData\Roaming\Xilinx\Vivado
If the script is placed there (e.g. zz1.tcl, or just zz1)
Then it can be run from the Tcl Console as
source zz1.tcl
That will execute the commands in zz1.tcl -> export hardware and launch the SDK
(2) Or, run Eclipse/SDK from Windows, then select the SDK folder:
The SDK can be run directly and can be found here:
C:\Xilinx\SDK\2019.1\bin\xsdk.bat
When it runs it will ask for a Workspace
Click [Browse] and navigate to the .SDK folder in the Vivado project
It will open and run as usual, without Vivado running, etc
Note: I have noticed that Vivado/SDK can be temperamental about how and when project folder contents are changed. Including if the SDK is launched and another SDK is already running in that folder. In some cases, the easiest recovery is to rename the ~corrupt SDK folder, create a new HelloWorld project, get HelloWorld running, and then update files into the new folder.
I have a .iss file created in Inno Script Studio. It has a pre-compilation step which is a feature specific to Inno Script Studio. I can run my .iss file from a Command Prompt window (which is running cmd.exe, right?). The command looks like,
"\Program Files (x86)\Inno Script Studio\isstudio.exe" -compile myscript.iss
If instead, I run /c/system/windows32/cmd from a Git bash window and then try the same command I get an error popup with 'I/O Error 6'. Why? Through experimentation the problem seems to be with the myscript.iss argument: if I leave off that argument the isstudio simply complains that the argument is missing.
I have tried various escaping and quoting changes to the command but nothing fixes it. I tried running cmd in a fresh environment with env -i. I have tried providing the full path to the file using a DOS style path with C: and backslashes.
And I tried creating a .bat file with the above command in it: same error.
I am doing an upgrade for the existing exe file using installshield. when installing the update , in files in use dialog I select the option to automatically close and restart the application instead of the other option to reboot the system.
But I get an extra window which tells me to restart the system again after installation is complete. How to disable this window? Please help :)
You can try to run the installation silently with REBOOT=ReallySuppress (update the paths). Please note that I haven't had the chance to test all these command lines:
msiexec.exe /I "C:\IsWiX.msi" /QN /L*V "C:\msilog.log" REBOOT=ReallySuppress
/I is for install
/QN is silent mode
/L* is verbose logging
If you have an EXE file instead of an MSI file I would extract the MSI to an administrative image (file extract from setup.exe basically) using the following command:
setup.exe /a
Then specify an extract location for the files in the EXE file. You can also run it directly with the Installshield command lines for EXE files. Something like:
Setup.exe /v"REBOOT=ReallySuppress /qn"
Or silently with logging:
Setup.exe /v"/l*v c:\test.log REBOOT=ReallySuppress /qn"
There are also some simplified command line macros from Microsoft. Most of the time these can be used. Other times you need the full command line interface.