Re: Quotes and spaces within the AT command
- From: "Csaba Gabor" <Csaba@xxxxxx>
- Date: 21 Feb 2006 09:58:51 -0800
Clay, I appreciate your ideas - they were helpful. Now I've run into
an additional problem (unrelated to the original one) which I'm not
sure how to handle, detailed below.
Clay Calvert wrote:
On 20 Feb 2006 16:26:19 -0800, "Csaba Gabor" <danswer@xxxxxxxxx> wrote:....
Unfortunately, when I type AT to see what I got, it is something like:
1 Today 12:58 AM
C:\WINDOWS\system32\cmd.exe "/K SET MOZ_NO_REMOTE=1 && "c:\Program"
Files\Mozilla Firefox\Firefox.exe -p system
http://bugzilla.mozilla.org/attachment.cgi?id=212413
So the whole process falls over because of that space in Program Files.
The first option is to create a batch file to run the commands and
then schedule the batch file.
An impressive list of ideas. I'd rather not use a batch file here
because it would be cluttering up the drive and making drive
writeability assumptions. Unless there is a compelling reason (as in
there is no other way), I don't want to increase my file count. I hate
extra files.
preserve quotes within the AT command (I just don't understand how itFrom your response, I take it that nobody has actually managed to
could have been released without the developer putting it in).
Another option is to find out the "short path" to Firefox.exe and use
that as quotes aren't needed.
for /f %%a in ("c:\Program Files\Mozilla Firefox\Firefox.exe") do (
set FFsPath=%%~sa)
Then call AT with %FFsPath% instead of the full path to FireFox.
I settled on this idea, and it does the trick (but keep reading for the
follow on problem). To find the short names, I did (on my Win XP Pro
system):
dir /x
It turns out that Firefox requires one additional environment variable,
USERPROFILE. No problem, thinks I, and revamp the AT command thusly:
AT 12:09 /INTERACTIVE %comspec% "/K SET
USERPROFILE=C:\Docume~1\PeterG~1 & SET MOZ_NO_REMOTE=1 &
c:\Progra~1\Mozill~1\Firefox.exe -p system
http://bugzilla.mozilla.org/attachment.cgi?id=212413"
UNFORTUNATELY, Firefox does not see the USERPROFILE environment
variable even though it has been correctly written (actually, I could
have written it the long way, too, without quotes, and it would get
written, but Firefox exhibits the same problem - it just doesn't see
USERPROFILE set via AT in this way).
The observed behaviour is that Firefox comes up asking which profile
I'd like to use (since it doesn't see the directory set in
USERPROFILE). If I dismiss this new Firefox (by the way, this FF is
being run under SYSTEM), then the command window is still up, so I
check to make sure USERPROFILE is set with
SET USERPROFILE
Then I type in
SET USERPROFILE=C:\Docume~1\PeterG~1
and I can now invoke FF with no problem using the above
c:\Progra~1\Mozill~1\Firefox.exe -p system
http://bugzilla.mozilla.org/attachment.cgi?id=212413
So the issue appears to be that there are four different types of
Environment variables (System, Process, User, and Volatile), and FF is
looking for a different type than what I get when I issue the SET in
the vanilla fashion from the AT command.
My question is whether there is another way to set an environment
variable with the AT command (perhaps by something like where the
output of echo is evaluated?).
Thanks,
Csaba Gabor from Vienna
Here is my current awful, but working, method (it's awful because I
shouldn't have to invoke php. It's presumptious to suppose that
someone else will have it, even if it is great, free software):
AT 18:36 php -r
"putenv('USERPROFILE=C:\Docume~1\PeterG~1');putenv('MOZ_NO_REMOTE=1');system('c:\Progra~1\Mozill~1\Firefox.exe
-p system http://bugzilla.mozilla.org/attachment.cgi?id=212413');"
.
- References:
- Quotes and spaces within the AT command
- From: Csaba Gabor
- Re: Quotes and spaces within the AT command
- From: Clay Calvert
- Quotes and spaces within the AT command
- Prev by Date: Re: Problem With Runas.exe
- Next by Date: Re: Quotes and spaces within the AT command
- Previous by thread: Re: Quotes and spaces within the AT command
- Next by thread: Re: Quotes and spaces within the AT command
- Index(es):
Relevant Pages
|