sc RUN refuses 64 bit exe
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
sc RUN refuses 64 bit exe
A simple
run "path to 64.exe";
is producing a "system cannot find the specified file", which proves wrong as "path to 64.exe" on AB finds it normally.
Elevated instance of XY.
Any hints?
run "path to 64.exe";
is producing a "system cannot find the specified file", which proves wrong as "path to 64.exe" on AB finds it normally.
Elevated instance of XY.
Any hints?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
admin
- Site Admin
- Posts: 66351
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: sc RUN refuses 64 bit exe
D:\soft\TypingAssistant_USB_7_0\Typing Assistant64.exe
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
admin
- Site Admin
- Posts: 66351
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: sc RUN refuses 64 bit exe
Code: Select all
...Typing Assistant64.exe
^
Code: Select all
run '"D:\soft\TypingAssistant_USB_7_0\Typing Assistant64.exe"';Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
admin
- Site Admin
- Posts: 66351
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: sc RUN refuses 64 bit exe
Next version will show an improved error message that will immediately point to such quoting mistakes...
FAQ | XY News RSS | XY X
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: sc RUN refuses 64 bit exe
Do I really need to put it under 'single"double"' quotes? Never had this problem, before... (And yes, now I see it's not a x64.exe related problem... And since I never needed to run .exes from paths having spaces, until today, I was unaware of such requirement - thinking double quotes were enough to deal with this)
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
PeterH
- Posts: 2827
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: sc RUN refuses 64 bit exe
The 1st operand of the run command is "what to run" - this includes the program *and* it's operands. I.e. "D:\soft\TypingAssistant_USB_7_0\Typing Assistant64.exe" /onceSkyFrontier wrote:Do I really need to put it under 'single"double"' quotes?
In this example you see that program and operand are separated by blank.
In your case the blank wrongly separates a command (up to the blank) from an operand (behind the blank) - which is obviously wrong. So you have to specify the program in double quotes. (This is Windows syntax!)
All this is a string - and to specify a string in XY you have to quote it.
Imagine you would want to start your program with the operand /once! You would specify:
run '"D:\soft\TypingAssistant_USB_7_0\Typing Assistant64.exe" /once';
Here you see that outer (here: single) and inner (here: double) quotes are not on the same level.
As outer quotes you also could use double quotes - but then you'd have to double the inner double quotes - the result is identical:
run """D:\soft\TypingAssistant_USB_7_0\Typing Assistant64.exe"" /once";
-
Stef123
Re: sc RUN refuses 64 bit exe
Glad to see I am not the only who trips up on this.
Important side note that only registered with me after re-reading SC help several times over again: You cannot use single quotes if you pass parameters that need to be resolved, such as
And these are easy (!) examples. When running an app.exe by passing it (and it's parameters) to console.exe things get nested even further. I use many such calls because XY has become my central dashboard and launchpad. And yet I still find it impossible to construct my terms inside SC. Without the color-highlighting of external editors I'd be lost. But that means pasting back and forth between XY and the external editor to step-run and debug.
Important side note that only registered with me after re-reading SC help several times over again: You cannot use single quotes if you pass parameters that need to be resolved, such as
Code: Select all
run """D:\..blahblah\Typing Assistant64.exe"" /once ""<curitem>\""";
openwith ("""path_to_ArchiveHandler"" x -- <items> ""<curpath>""", m) ;
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: sc RUN refuses 64 bit exe
Hi, Peter. Thanks for the explanation.
What's new to me here is: if I don't have any explicit parameter, I thought the outer single quote wasn't necessary at all. Depending on what Don will do about, I'll have a good bunch of run-related scripts to revise anytime soon. :sigh:
What's new to me here is: if I don't have any explicit parameter, I thought the outer single quote wasn't necessary at all. Depending on what Don will do about, I'll have a good bunch of run-related scripts to revise anytime soon. :sigh:
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
Stef123
Re: sc RUN refuses 64 bit exe
If I am to believe my own notes/ help compilation, the SC engine strips off outer double quotes. So your call would actually pass "Assistant64.exe" as a parameter because it is preceded by a space.SkyFrontier wrote:What's new to me here is: if I don't have any explicit parameter, I thought the outer single quote wasn't necessary at all.
-
admin
- Site Admin
- Posts: 66351
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: sc RUN refuses 64 bit exe
Sigh. Non-programmers...
Man, this is all totally normal, simple, and non-confusing. If you find your lines hard to read break them up into variables:
Etc.
Man, this is all totally normal, simple, and non-confusing. If you find your lines hard to read break them up into variables:
Code: Select all
$app_quoted = quote("D:\soft\TypingAssistant_USB_7_0\Typing Assistant64.exe");
run "$app_quoted /once";FAQ | XY News RSS | XY X
-
Stef123
Re: sc RUN refuses 64 bit exe
Sigh. Programmers...
Meaning to make things easier by introducing yet another complication - variables. Well, glad I have read far enough in SC help to not get thrown off by it
Meaning to make things easier by introducing yet another complication - variables. Well, glad I have read far enough in SC help to not get thrown off by it
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: sc RUN refuses 64 bit exe
Here's another method without using variables:
Code: Select all
run <<<#CMD
"D:\soft\TypingAssistant_USB_7_0\Typing Assistant64.exe"#CMD ;Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
PeterH
- Posts: 2827
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: sc RUN refuses 64 bit exe
Programmers - yes, but...
If you want to specify some "text" to be used in XY, be it for a variable, or for some operand, this is a string.
To define where the string stops and starts you have to surround it by quotes.
Numbers *can* be just seen as numbers and specified unquoted, or can be quoted. The result is the same.
Now compare:As the results of the lines are different, *you* have to tell XY by use of quotes *what* you want. So (exact) quoting makes sense.
And it can't be helped: you must use the rules of XY to be able to tell it what you want. Else you won't achieve what you want.
Though it's true: it's getting a bit harder if you need quotes *inside* of a string.
If you want to specify some "text" to be used in XY, be it for a variable, or for some operand, this is a string.
To define where the string stops and starts you have to surround it by quotes.
Numbers *can* be just seen as numbers and specified unquoted, or can be quoted. The result is the same.
Now compare:
Code: Select all
$var = 5; // might also be "5" or '5'
echo 3 + $var;
echo "3 + $var";
echo '3 + $var';And it can't be helped: you must use the rules of XY to be able to tell it what you want. Else you won't achieve what you want.
Though it's true: it's getting a bit harder if you need quotes *inside* of a string.
XYplorer Beta Club