I am trying to install a windows service on a remote machine. The service is implemented using TopShelf. I am running the following psexec command:
psexec \\remoteServerName "C:\PathToExe\TopShelfServiceName.exe" "install"
The error I am receiving is:
ERROR - The service terminated abnormally
Topshelf.HostConfigurationException: The service was not properly configured:
[Failure] Command Line An unknown command-line option was found: ARGUMENT: "install"
It appears that I am not running the TopShelf installer, rather executing my exe and passing "install" which is not a valid argument.
Any help is appreciated!
I don't think you need quotes around "install":
psexec \\remoteServerName "C:\PathToExe\TopShelfServiceName.exe" install
Related
I do have following setup:
a win PC with gitlab-runner installed (working)
a powershell script running on the same PC is starting an application
a gitlab server to connect this local PC and starting the powershell script
Now when starting the powershell script directly from the local PC, the application starts and terminates after done - working as expected. When starting the same powershell script with the gitlab server (yml-file) then I can see that the application has been started (new process in taskmanager) but it is not running as well it never terminates.
When manually end the task I see that gitlab terminates again.
Question:
what could be the root cause?
is it possible to run the powershell script with gitlab-runner? I think there is a way with the command "exec". How does the command looks like when calling the powershell script?
is it possible to run the application not in the background in order to see whats going on?
others?
thanks in advance
I think there is a bug with the gitlab runner on windows.
No matter which shell you configure in the config.toml the runner
will always use cmd.exe for an exec local run.
Specify the --shell argument to override the default cmd.exe shell:
> gitlab-runner exec shell your_job --shell pwsh
If you run this locally in your project, it outputs to .builds/, so add this to your .gitignore because git will see it and think you might want to add a submodule.
I would like to set up an X11 Server so that I can run graphical Linux applications using the Windows Subsystem for Linux (WSL 2). I have tried following the instructions on this site.
The command
choco install vcxsrv
completed successfully. But I cannot see how to start XLaunch (VcXsrv).
I already have Cygwin/X X Server installed on my machine and I am still able to launch that successfully. But when I try the following command,
PS C:\WINDOWS\system32> vcxsrv
I get the following error message,
vcxsrv : The term 'vcxsrv' is not recognized as the name of a cmdlet, function, script file, or operable program.
I have spent quite a bit of time trying to figure out how to start XLaunch (VcXsrv) without any success.
Try to look on default folder installation:
"C:\Program Files\VcXsrv\xlaunch.exe"
Try this command to run VcXsrv
xfsettingsd --sm-client-disable; xfce4-panel --sm-client-disable --disable-wm-check &
or
C:\Program Files\VcXsrv\xlaunch.exe
Refer the following link to understand VcXsrv installation and it's usage,
Running WSL GUI Apps on Windows 10
tronbox unbox metacoin
Downloading...
Unpacking...
Setting up...
Error: Command failed: bash post-unpack.sh && rm post-unpack.sh && npm install
'bash' is not recognized as an internal or external command,
operable program or batch file.
at ChildProcess.exithandler (child_process.js:289:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
I have tried the command tronbox unbox metacoon in windows 10.
How to solve the above mentioned error? Same error is coming on trying command tronbox init. What can be the possible reasons for this bash error?
'bash' is not recognized as an internal or external command,
operable program or batch file'
This error comes when you try to run a shell script directly in window's command prompt.
If this error comes while unboxing metacoin DApp of tron, there is nothing to worry about. Metacoin DApp will be unboxed properly in your specified directory.
In case of IDEs Truffle or Tronbox, Shell scripts are basically used for running some javascript file. So, if you using truffle or tronbox on Windows, you can run javascript file direclty without running shell script for it first.
Solution for running javascript directly from window's command Prompt:-
Open shell script in an editor and try to locate the name of the javascript file in it. Now you can run this javascipt file directly from window's command prompt.
You need to use the following command in Window's command prompt (pre-requisite:- node.js is installed in your system:-
node filename.js
I have tried this for both the IDEs, truffle and tronbox. It works just fine.
I've installed CYGWIN on my windows server,
And now I'm trying to run it as a service so it will be running on every system startup, This is the command I tried but I get the error:
C:\cygwin64\bin>C:\cygwin64\bin\cygrunsrv.exe -I CYGWIN_SSHD -path C:\cygwin64\b
in\cygstart.exe
/usr/bin/cygrunsrv: Trailing commandline arguments not allowed
Try `/usr/bin/cygrunsrv --help' for more information.
Can anyone tell me what am I doing wrong?
I figured it out, To install Cygwin as a service I needed to run "ssh-host-config" insert all the needed definitions and this will install it as a service called "CYGWIN sshd".
I have ssh on to a ubuntu box and run the following:
rabbitmq-server –detached
Which I believe should give me the command prompt back and run rabbit in the background, howerver it justs hangs:
Is this a powershell issue?
PowerShell is a component of Microsoft Windows, it has a command-line shell and a scripting environment. So I don't think you question is relative to PowerShell.