RomanV
(RomanV)
April 14, 2016, 10:40pm
1
I just can’t get it to work… I always get “… is not recognized as an internal or external command
”
Tried double quoting, but couldn’t make it work…
this is the path of the .exe…
F:\@Hotel Control\impresoras fiscales\_DRIVER_ROMAN\_getlastnumber.exe B
What am i Doing wrong ?
TIA
R
find out the shell path with
dim f as FolderItem = GetOpenFolderItem("")
if f <> nil and f.Exists Then
MsgBox f.ShellPath
end if
RomanV
(RomanV)
April 14, 2016, 10:57pm
3
well… here’s the problem…
I get F:\@HOTEL~1\IMPRES~1\_DRIVE~1\_GETLA~1.EXE as the shellpath…
is it a xojo thing ? how do I fix it ?
Norman_P
(Norman P)
April 14, 2016, 11:41pm
6
[quote=259635:@Roman Varas]I just can’t get it to work… I always get “… is not recognized as an internal or external command
”
Tried double quoting, but couldn’t make it work…
this is the path of the .exe…
F:\@Hotel Control\impresoras fiscales\_DRIVER_ROMAN\_getlastnumber.exe B
What am i Doing wrong ?
TIA
R[/quote]
Have you trie quotes around the full path ?
send the command so it reads (including the quotes)
"F:\\@Hotel Control\\impresoras fiscales\\_DRIVER_ROMAN\\_getlastnumber.exe" B
RomanV
(RomanV)
April 14, 2016, 11:42pm
7
well I found a solution…
sh.Execute(chr(34)+“F:\@Hotel Control\impresoras fiscales\_DRIVER_ROMAN\_getlastnumber.exe”+chr(34), “B”)
I had done this in the past, the problem now, is that I am passing an argument to the exe (“B”) which was messing up with the path as I had wrote next to the filename inside the path… (as it is written in the command line) it like :
sh.Execute(chr(34)+“F:\@Hotel Control\impresoras fiscales\_DRIVER_ROMAN\_getlastnumber.exe B”+chr(34),)
Now it is corrected and it works… I wish I knew everything before trying to make it work…
RomanV
(RomanV)
April 14, 2016, 11:44pm
8
by the way… this forum really helps a lot… thanks!
Mike_D
(Mike D)
April 14, 2016, 11:53pm
10
On windows you can get the “Short Path” (which is all mangled to 8.3 format) or the “normal path” and I think the difference is .AbsolutePath vs. .ShellPath. And I think later versions of Xojo have .NativePath too.
Generally you want to avoid the short path but there may be some APIs or apps which need it.