Giving path with blank spaces to iis express fails - iis-express

When I run IISExpress from command line, a path like c:\site works fine.
But if I change it to:
H:\Users\Username\Document\Visual Studio 2010\Projects\TestIISExpress\TestIISExpress\bin\Debug\site
it fails i.e. it gives general error saying command line parameters switch needs - ,/ etc etc.
Anybody faced same issue? Does it works on yours?

I would believe if you have a path with spaces in it, you'd have to put it into double quotes:
"H:\Users\Username\Document\Visual Studio 2010\Projects\TestIISExpress\TestIISExpress\bin\Debug\site"
Does that help?

I have found, using IIS Express 8.0, that in order to provide a path switch that includes spaces the path must be preceded by a double quote, but there should be no terminating double quote, for instance:
"%ProgramFiles%\IIS Express\iisexpress.exe" -path:"c:\my site\
I have no explanation for this behaviour, I have found no documentation concerning this issue, and I do not know what program versions this applies to.

Related

Running command on windows does not allow quotations

when i run a command on windows 10 command line that requires a path as one of its params, it works if the path is NOT inside a quotation, but if a path has a space in it, i need to wrap it inside quotes so that it treats as one single path, but then it complains that the file in that path does not exists.
For example:
C:/PROJECTS/desktopfiles/public/libs/cpdf/win64/cpdf.exe C:/Users/john/Documents/cat.pdf C:/Users/john/Documents/my_dog.pdf -o C:/Users/john/Documents/cat_dog_Merged.pdf
The above works,
the below doesn't (because there is a space in my dog.pdf)
C:/PROJECTS/desktopfiles/public/libs/cpdf/win64/cpdf.exe C:/Users/john/Documents/cat.pdf C:/Users/john/Documents/my dog.pdf -o C:/Users/john/Documents/cat_dog_Merged.pdf
You could try to replace spaces with a question mark. The question mark is a wildcard to match "any single character", which would be a space in your case. Like this: my?dog.pdf. Just make sure that there is no other file matching this pattern. But the system should give you some error message then (which might or might not point to the root of the problem).
Another solution that comes to my mind is a batch file that renames the files in question automatically (replacing spaces with underscores) and renames them back after the pdf merge.

invalid character error on eclipse docker using xming on windows

Inavlid Character error in eclipse on docker
I have created a container using file similar to
https://github.com/batmat/docker-eclipse/blob/master/Dockerfile
on docker installed on windows 7.I did need to make a change of setting the locale first in dockerfile. I tried with both en_US.UTF8 and en_IN.UTF8.
When I start the container I am successfully able to open the eclipse in xming but eclipse is giving invalid character error on double quotes.(Probably on some other characters)
Is there any other change/setting I need to do?
This does not look like a file encoding problem (because the syntax error is not displayed at the first character), but that instead of ASCII quotation marks (") similar looking characters (e. g. ", ײ, ״, ʺ, etc.) were used.
Replace line 17 with the following line:
System.out.println("Hello There");
See also: Java Language Specification - 3.10.5. String Literals

What does this Windows bat command mean?

I read the following command from the batch file to run Maven on Windows mvn.bat:
if not "_%M2_HOME:~-1%"=="_\" goto checkMBat
And
if "%#eval[2+2]" == "4" goto 4NTArgs
What does this batch script mean?
ADD 1
As I tried, it seems _%M2_HOME:~-1% returns the _ plus the last 1 letter of the environment variable "_%M2_HOME%. But what's the name of this syntax?
%VAR:~-1% gets the last character in the envvar. The first snippet verifies that the envvar M2_HOME doesn't end with \. Note: Maven's docs say,
Note: For Maven 2.0.9, also be sure that the M2_HOME doesn't have a '\' as last character.
This might be related. They probably want to prepend M2_HOME to subdir names and always include a dirsep. The variable substitution in "_%...%" is unaffected by the initial underscore. Experessing it that way just ensures that the underscore is at the beginning of the output. I can't say for certain, but it may have been expressed that way to avoid a backslashed quote, e.g. "\".
The second is not any CMD/batch that I'm familiar with. The comment (assuming this comes from mvn.bat) says "4NT shell", which I take to mean that this batch file could be run in the Take Command Console which probably has extensions to MS CMD features. For example, %#eval[...] probably does numeric evaluation in 4NT. This would effectively be a check to see if the script were running in a 4NT shell.
The first one takes the last character of %M2_HOME%, adds an underscore to the front, and checks to see if the resulting string is _\ - in short, it checks that the last character of %M2_HOME% is a backslash by using substrings.
The second one is how you determine if 4NT is installed on your computer; if it is, there will be a variable function called #eval.
I found the explanation to "_%M2_HOME:~-1%" below link. It's a variable substring operation.
http://ss64.com/nt/syntax-substring.html

Illegal characters in path [Visual Basic]

I created a small program where a file dropped over the EXE triggers action on that file. It works fine as long as the path to the file does not contain spaces.
When there is a folder with spaces in the name, such as \Visual Studio 2013\file (actual path much longer), I get an 'Illegal characters in path'.
Under Unix, I would use backspace as escape character such as Visual\ Basic.
How can I manage spaces in path in Visual Basic ? Is there a marker to enter before space to avoid the eror, or is there something else ?
Thank you in advance for your help
Command() is an array of sting. When you pass the command line to your application it considers that spaces delimits new parameters unless you place them between double quotes.
Perhaps can you try with Command.ToString()

Installing emacs plugins on windows

I already looked through other topics, but I still couldn't find a solution. I'm trying to install "nxhtml" plugin for Emacs in windows 7. I already setup my "HOME" environment variable as "C:\". So, my .emacs.d folder is there, and I put the nxhtml in there and added the following line to my "_emacs.d" file, as the readme says:
(load "C:\.emacs.d\nxhtml\autostart.el")
But it doesn't load.
I also tried putting:
(add-to-list 'load-path "C:\.emacs.d\nxhtml")
(load "autostart.el")
But to no avail... can anyone shed some light here? tnx.
A number of points here:
Firstly, _emacs.d is not a default file name for your init file, ie emacs will not load it automatically. Try ~/.emacs.d/init.el, or ~/.emacs instead.
Secondly, Windows 7 has a feature where it prevents programs from writing to certain system directories, but for backwards compatibility for the many old programs that do this, rather than causing them to fail, it silently redirects the write elsewhere, in an application specific directory. C:\ is one of those directories, so setting your HOME to point there is asking for trouble.
Thirdly, see the other response about backslash being an escape character in Lisp strings.
\ is special in the (double-quote) read syntax for strings, as certain characters take on a new meaning when prefixed by a backslash (e.g. \n is a newline, \t is a tab, and \" is a double-quote character). When the following character does not have any special meaning in conjunction with the backslash, that character is used verbatim, and the backslash is ignored.
"C:\.emacs.d\nxhtml\autostart.el" is actually the string:
C:.emacs.d
xhtml^Gutostart.el
To include a \ in the string you need to write \\
However, although it will understand the backslashes, Emacs is nowadays consistent across all platforms in allowing / as a directory separator1; so just do that instead.
1 and the obsolete directory-sep-char variable has been removed entirely.

Resources