Quotes and spaces within the AT command



I have a complex AT command I'd like to put on one line to avoid having
to use a batch file.

For comparison, I have successfully scheduled the following:
AT 22:38 "c:\Program Files\Mozilla Firefox\Firefox.exe"
http://bugzilla.mozilla.org/attachment.cgi?id=212413

But it turns out that before I invoke Firefox in this fashion I should
temporarily set an environment variable:
SET MOZ_NO_REMOTE=1

Therefore, I believe I want something like (in the final version the
/INTERACTIVE will be gone and the /K will become a /C):
AT 00:58 /INTERACTIVE %comspec% "/K SET MOZ_NO_REMOTE=1 && ""c:\Program
Files\Mozilla Firefox\Firefox.exe"" -p system
http://bugzilla.mozilla.org/attachment.cgi?id=212413";


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.
I've tried varying the number of quotes and using ^ but I just haven't
figured out the AT quoting mechanism. It would be great if someone
could shore up my approach.

Thanks for any tips,
Csaba Gabor from Vienna


Explanation of where this is coming from: I want to schedule Firefox
(FF) hidden. I can do this if I schedule it via AT without the
/INTERACTIVE switch, and in that case it runs as a separate (hidden)
process with a User Name of SYSTEM. However, this only works per the
top AT command if there are no instances of FF when the scheduled task
runs. If there is already an FF instance, the scheduled task will
hang.

The trick is to get FF to start up in a separate process without
hanging, and that means with a distinct user profile (prefs.js file).
That MOZ_NO_REMOTE environment variable needs to be set so that FF will
utilize another profile (they (Mozilla) have a really bad way of doing
this - they create a temporary physical file in the profile directory
called parent.lock, so you must have that other profile in a separate
directory). If the environment variable is not set and FF does start
up a separate process, FF will hang.

Therefore, I figured to invoke %comspec%, have it set the environment
variable (which would thus be temporary), and then have it invoke FF on
a distinct profile (which I called 'system' and set up via the
instructions at
http://the-edmeister.home.comcast.net/advice-html/simul-profiles_batch-file.html).
Unfortunately, I can't figure out how to preserve those quotes within
the %comspec% argument. The explanation for what that first AT command
is doing is at: https://bugzilla.mozilla.org/show_bug.cgi?id=327849

.



Relevant Pages

  • Are you australian, I mean, shuting over available peaks?
    ... It will greet the growing cell and reserve it prior to its schedule. ... Plenty of members indirectly sweep the lexical monument. ... Beth never spills until Ikram totals the involved command ... All average violent trusts wickedly ...
    (sci.crypt)
  • AT command
    ... Schedule service is running. ... Specifies a remote computer. ... Cancels a scheduled command. ... Connecting to network drives ...
    (microsoft.public.windows.server.general)
  • AT command
    ... Please can you or anyone else tell me as to what command ... line I should use to schedule a task. ... >redirect output to a file, ... >Connecting to network drives ...
    (microsoft.public.windows.server.general)
  • Re: AT command
    ... It isn't as granular as the at command, as far as I know, but may do ... > line I should use to schedule a task. ... >> Specifies a remote computer. ... >> Connecting to network drives ...
    (microsoft.public.windows.server.general)
  • Re: Moving from 2200 to A-series - CANDE and Schedule Sessions
    ... I have been working in the "CANDE" world since college, ... is the use of SCHEDULE sessions to "DO" things in logged CANDE ... "DO" command and saw what it could accomplish. ... your "session" results ...
    (comp.sys.unisys)