Re: Quotes and spaces within the AT command



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.

From your response, I take it that nobody has actually managed to
preserve quotes within the AT command (I just don't understand how it
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');"

.



Relevant Pages

  • Re: Quotes and spaces within the AT command
    ... Then call AT with %FFsPath% instead of the full path to FireFox. ... Firefox does not see the USERPROFILE environment ... being run under SYSTEM), then the command window is still up, so I ... Environment variables, and FF is ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Quotes and spaces within the AT command
    ... No problem, thinks I, and revamp the AT command thusly: ... Firefox does not see the USERPROFILE environment ... It's not clear to me why that echo is making the ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Alt-F2 then Synaptic launches firefox
    ... Debian Sid machine, running linux 2.6.10-1-386 and KDE 3.3.2. ... then I get firefox launching the page as mentioned. ... This seems to happen, exactly the same, when any command that is not ... > able to reproduce the problem. ...
    (Debian-User)
  • Re: [opensuse] 10.3 No Java Runtime for Firefox?
    ... to try the following command: ... When I restarted Firefox, my missing java plugin was back and happy. ... I tried the above command doesn't work as normal user which ... I'm certain Novell will push out a patch ASAP. ...
    (SuSE)
  • Re: fluxbox
    ... I mean the command line you get with CTRL-ALT-F1 etc. ... inside an Xterm, Konsole, Console or whatever running under fluxbox, ... start firefox in that case by ...
    (Ubuntu)