Calling Flash Magic from command line with parentheses in path - command-line

I need to program my microcontroller via Flash Magic command line.
Command is:
COM(6, 115200)
DEVICE(LPC2368, 4.000000, 0)
HARDWARE(BOOTEXEC, 50, 100)
ERASE(DEVICE, PROTECTISP)
HEXFILE(C:\Program Files (x86)\myfile.hex, NOCHECKSUMS, NOFILL, PROTECTISP).
When using any different path without parentheses, this goes perfectly well.
But when "(x86)" is involved I get an error:
ERROR: Invalid parameters for HEXFILE directive: HEXFILE(C:\Program
Files
(x86)
I tried surrounding the path with quotes or double quotes but I get the same error.
Does anyone know how to correctly pass a path argument with parentheses?

For those having the same problem:
there is no workaround with versions <12 of Flash Magic, but fortunately version 12 resolves this issue.

Related

Folder name with space issue

How do I handle a folder name containing spaces in Perl? For example C:\Sample Picture\Data.
I wrote this
use File::Glob ':glob';
$indir = "C:\\Sample Picture\\Data\\";
#flist = bsd_glob( $indir.'*');
This is throwing an error
The syntax of the command is incorrect.
The error message The syntax of the command is incorrect comes from the Windows command line, not from Perl
The issue is not to do with File::Glob, but with whatever you are doing with the contents of #flist. It's my guess that you're using backticks or system to rename one or more of the files or directories. This will fail if you use paths that contain spaces without enclosing the complete path in double quotes
If you need any more help then you must show the relevant part of your code

vmoptions classpath with non-ascii characters

I'm adding the following line -classpath/p ${installer:sys.userHome}/.comput/updates/latest.jar to the vmoption file. (Tried both options: via installer 'Add VM option' action and via launcher config).
Works pretty fine with ASCII user name (with spaces as well), but fails with non-ascii user names (I'm testing with Russian). The vmoption file looks fine to me: the path is correct and has the right encoding: CP 1251 for my case:
However the path passed to JVM seems to have incorrectly decoded characters: On the attached screen you may see the actual path passed to JVM (checked via YourKit) from Install4J launcher:
and you may also compare it with the screen when the non-ascii path is passed via command prompt:
The only workaround I have found is to substitute the path with 8.3 Windows path, but converting to it on pure Java seems very error prone to me.
Appeciate your help very much!

WinDbg script not working

I often need to type in a bunch of .srcpath+, .sympath+, and .exepath+ to load paths in order to debug a crash dump. I like to put these settings into a script file so to make my life easier. From the command I tried:
$$>< E:\Supports\envs.wdb
I got errors:
The filename, directory name, or volume label syntax is incorrect
for each line I added in the script. But If entered the lines manually, everything was fine.
I also tried to run windbg.exe -c "$$>< E:\Supports\envs.wdb", and I got the same errors.
Any helps would be greatly appreciated.
Btw, I like to put each path in a separate line so I can quickly edit paths in the script using block mode. With mainactual's help, debugging a crash dump becomes very quick for me. :)
Path commands are bit tricky since the syntax is
.srcpath[+] [directory [; ...]]
which makes command
.srcpath C:\Foo
.srcpath+ C:\Bar
to be interpreted as a single line command
.srcpath C:\Foo;.srcpath+ C:\Bar
To work around this, use "-marks
.srcpath "C:\Foo"
.srcpath+ "C:\Bar"
or
.srcpath "C:\Foo;C:\Bar"
And notice also that you don't need "-marks for white space:
.srcpath "C:\Foo Bar;C:\Bar"

Difference between calling command line directly or from makefile

I have a confusing problem concerning mingw make and windows command line (Win7):
I have a makefile which shall call a vbs file to convert .vds files to .png files. here is the code of the makefile (without the defined variables, you can see the result in the picture below).
VSD2PNG: $(VISIO_OUTPUT)
#echo *** converting visio files to png files finished
define vsd_rule
$(1): $(call FILTER_FUNCTION,$(basename $(notdir $(1))),$(VISIO_FILES))
$(VSD_SCRIPT) $$< $(VISIO_OUTPUT_DIR)
endef
$(foreach file,$(VISIO_OUTPUT),$(eval $(call vsd_rule,$(file))))
leads to
As you can see, the command should call .\tools\visio\convert(.vbs) with two arguments (input file & output directory). Surprising is that the same command executed in windows command line works fine. I tried some modifications to solve the problem (unsuccessfully):
adding file extension to vbs-script leads to error 193, but I cannot find out, what that means.
calling the script without any arguments should lead to a runtime-error in the script, but that leads to make error -1 again (or with file extension 193).
using absolute path for script
Does anybody know more about the differences between calling a script directly from command line or from makefile, which should usually lead to the command line?

Xcopy: invalid number of parameters or file not found error

From inside a .bat file, I m issuing this command
xcopy\s Folder1\folder2\folder3\blah-blah Folder1\temp\folder2\folder3
But I get the error:
The system cannot find the path specified.
I tried copying the same line to command line and tried it:
Then, I get the error, xcopys command not found.
If I try to use xcopy instead of xcopy/s, I get error:
File not found - Folder1folder2folder3blah-blah
If I use xcopy command with backward slash on command line: Invalid number of parameters.
I tried enclosing paths in quotes, but it does not help.
My file names don't have spaces in them but they do have -
I have checked the path of source and destination and they exist
Any help will be appreciated.
Thanks
I guess you're running under windows, so you have to use forward slashes for arguments.
xcopy/s is something very different from xcopy\s. The later searches for an application called s in a subfolder called xcopy. To further avoid confusion, separate the program from its argument(s) with spaces.