Passing Command line arguments to .exe generated after build - electron.net

I have a desktop App.exe built using Electron.Net. If I pass parameters along with "electronize start", these argument values are ignored. Even after build, I am not able to pass parameters as command line arguments to .exe from command prompt.
In command prompt, when I run App.exe with command line arguments it does not accept the parameters being passed to it. Only the const parameters - which are existing in main.js is available. Since main.js is getting auto-generated after each "electronize start", changes made in main.js get replaced. Sample command below:
Example: App.exe hello 123
electronize start hello 123
The requirement is to retrieve parameters given by the user in command prompt to .exe file. Thanks in Advance.

Please submit a Feature Request via Issue on the GitHub Page. Thank you!
https://github.com/ElectronNET/Electron.NET

Related

calling shell command from peoplecode

I am getting error when calling OS command for Peoplecode using EXEC function.
The call is like this
CommitWork();
&ShellCommand = "/path/mytest.sh param1 param2";
&ReturnCode = Exec(&ShellCommand, %Exec_Synchronous + %FilePath_Absolute);
The &ShellCommand is built using the path, executable and parameters
to be passed as shown above. That command works fine when executed
independently.
I keep getting error 255. Is there anything about the syntax? Does anybody have a tested or working example or any suggestion?
Thank you guys for responding. The command was running fine from shell scripts but not from Peoplesoft. It turned out that the current folder on the application server was not correct. So I added a CD command as the first line in the shell script to change current folder to the correct folder. That worked.
Thanks again.
the syntax looks correct.
I use similar code to call bat files.
Exec("C:\windows\system32\cmd.exe /c C:\Test\mybat.bat param1 param2", %Exec_Synchronous+%FilePath_Absolute);
Have you tried with an absolute path instead of a relative path?
error code 255 seems to be an out of range error code.
see http://tldp.org/LDP/abs/html/exitcodes.html
I would check the assumptions that you're making.
Is the same username running the shell script, your username vs the app server username?
Is the environment set up the same way for the app server username vs your username?
file permissions

teamcity how to see the final output of command line build step custom script

Given a Command line build step, with the following custom script:
msdeploy -verb:sync -source:package='%teamcity.build.projectid%\%WebProjectName%.csproj.zip'
how can i see what the variables ended up being replaced with?
I don't see any "verbose logging" option that holds the final output for debugging the build server anywhere
There's Parameters tab (accessible like http://teamcity/viewLog.html?buildId=BUILD_ID&tab=buildParameters where BUILD_ID should be replaced with id of the given build) in Build overview.
There're parameters values as they were resolved when build started.
This page is also accessible via popup displayed at the end of a build status text in build results row in Build Configuration Overview or Project view.
There is a file in [tempdirectory]\agentTmp called build.start.properties.gz open with something like winrar or 7zip and there is a file called build.start.properties.
In there you will be able to see the parameters used for the build like %teamcity.build.projectid%
In case anyone else comes here, the reson you are probably looking for that file is that your script isnt working, I would suggest you change
-source:package='%teamcity.build.projectid%\%WebProjectName%.csproj.zip'
"%WebProjectName%"
and include double quotes around your variables, if WebProjectName contains spaces your script might not work.
If your custom script is running in Unix-like environment you can use shell command set -x to print each command before execution
Full explanation here https://stackoverflow.com/a/2853811/2584381
If you are running on Windows, your command step has an implicit #echo off at the start.
To get full info in the logs, add
echo on
to the top of your command script.

run DXL script on the background (command line) : DXL/DOORS

I am trying to start a dxl script with command line. But i am getting lots of warnings and errors.
When I try this script on doors gui , it works fine but when i try on this command line without gui, it doesn't.
Here is the image of warnings :
Here is the commandline script :
"%ProgramFiles%\IBM\Rational\DOORS\9.3\bin\doors.exe" -d 36677#bie -u "xxx yyy" -P don -b "d:\workset\mc\addins\Devel\exporterRTF.dxl"
Why it doesn't work with commandline ? Any help, idea etc is appreciated.
EDIT :
this is a link which i try to run : myprogram.dxl
this is a link which is imported in my running script include in myprogram.dxl
this is a link which is secondly imported in my running script include in myprogram.dxl
There are other settings you need to run in Batch mode (pulled from the DOORS help):
Runs Rational DOORS in batch mode. Rational DOORS starts without the GUI (it suppresses the login screen and the database explorer), runs the specified DXL program, and then stops.
In batch mode you normally need other switches like -user, -password and -project to log in and specify the current project.
The parameter of the -batch switch specifies the file that contains the DXL program that you want to run in batch mode.
You probably need a current project specified. Also you may need to add a command at the end of your script to exit DOORS if you don't want the session to stay open.
The errors that you list seem like regular DXL errors, so if you need more assistance than this, you will need to post some of the code.
EDIT:
If you put all of the files into one does it run? Another option may be to include the Addins path on your command line. I believe the issue is that the batch mode is not recognizing the included files as part of the same scope.

Is it possible to run a batch file as part of the Run command (i.e. F5)?

I'd like to execute a batch file when I run the solution which will prepare the environment that I'm deploying to. I want this to run first thing when I hit F5 before anything else happens. Is this possible? If so, how?
In the project's property pages, under Debugging tab, set the proper value for Command option. Default value is $(TargetPath), which will run the output executable. Just specify your batch file there.
You will have to run the executable on your own in this case. I suggest passing $(TargetPath) as a parameter to your batch script and then executing the parameter.

how to debug VC++ program, input file not open while debuging

i am using Visual studio 8. i pass command line argument to my program when i execute the program using exe file it works fine but when i use to debugg. it is unable to open the input file which i have given it in the form of command line argument. although i have given the command line argument in the Project->properties->debug->command line arguments....
e.g
"program.exe" input_file output_file
input file contains data which i have to use in the calculation if i am unable to debug it. how can i remove the errors in my program
reply me
thanks
You may need to specify the working directory on that same property page in order to have your debug executable run in the same directory as your input file. Right now it's probably not able to pass your file because it can't find it.
You should not include "program.exe" in the command line arguments.

Resources