We have a small batch script that disconnects all network drives then remaps
them again.
We want out timesheet page to open for everyone now and if I add the line
below to the bottom of the script it opens the page fine but the logon
script doesn't close. It only closes once the timesheet page is closed.
Any way to have the script exit once it opens the page?
net use t:\ \\server01\transfer
"c:\program files\internet explorer\iexplore.exe"
intranet.companyname.com/timesheets
Thanks for any help!
Gerry
>We have a small batch script that disconnects all network drives then remaps
>them again.
>
>We want out timesheet page to open for everyone now and if I add the line
>below to the bottom of the script it opens the page fine but the logon
>script doesn't close. It only closes once the timesheet page is closed.
>Any way to have the script exit once it opens the page?
>
>net use t:\ \\server01\transfer
try this:
start "" "c:\program files\internet explorer\iexplore.exe"
Thanks foxidrive, what do the two "" do to the command?
"foxidrive" <got...@woohoo.invalid> wrote in message
news:ofj2f555vejee8mo0...@4ax.com...
>Perfect!
>
>Thanks foxidrive, what do the two "" do to the command?
>> start "" "c:\program files\internet explorer\iexplore.exe"
>> intranet.companyname.com/timesheets
In NT and higher the first quotes are used as a title for the window itself
so if you didn't have "" or something like "My Window" before the quoted
command line then it would have used "c:\program files\internet
explorer\iexplore.exe" as the title for the windows and not executed it.
"foxidrive" <got...@woohoo.invalid> wrote in message
news:c9n2f594doklh9f0n...@4ax.com...
start "" "c:\program files\internet explorer\iexplore.exe"
intranet.companyname.com/timesheets
...the window-title will be governed by the html [web] page that is the target of the
iexplore.exe command (set with the html tagline: <TITLE> My Window </TITLE>).
As I said, I thought that the only relevance adding the "title" in the "start"
command is when calling up another command-prompt window...?
==
Cheers, Tim Meddick, Peckham, London. :-)
"foxidrive" <got...@woohoo.invalid> wrote in message
news:c9n2f594doklh9f0n...@4ax.com...
--
.
--
"Tim Meddick" <timme...@gawab.com> wrote in message
news:%23vBRTvX...@TK2MSFTNGP02.phx.gbl...
So the original command line quoted :
start "" "c:\program files\internet explorer\iexplore.exe"
intranet.companyname.com/timesheets
..really does not need the initial set of double-quotes, no?
==
Cheers, Tim Meddick, Peckham, London. :-)
<.> wrote in message news:eAlzF8XX...@TK2MSFTNGP06.phx.gbl...
Yes, but if there is a second quoted parameter following the
executable, the first string is taken to be a title and the second one
is taken as the executable - with obvious adverse results. It's just
seems advisable to put in the empty quotes as a habit to keep from
falling in the pit.
_____________________
Tom Lavedas
Try the command without the initial quotes
eg
start "notepad"
--
.
--
"Tim Meddick" <timme...@gawab.com> wrote in message
news:OeN8%232YXK...@TK2MSFTNGP02.phx.gbl...
Again - ONLY if the contents between the second set of quotes is CMD.EXE (or other
command-line executable) Window's applications are NOT affected by the "title"
parameter of the "start" command.
==
Cheers, Tim Meddick, Peckham, London. :-)
"Tom Lavedas" <tglb...@cox.net> wrote in message
news:8d16eaa1-40b0-4ab6...@j19g2000yqk.googlegroups.com...
--
.
--
"Tim Meddick" <timme...@gawab.com> wrote in message
news:eGYtk9a...@TK2MSFTNGP02.phx.gbl...
"Tim Meddick" <timme...@gawab.com> wrote in message
news:%23vBRTvX...@TK2MSFTNGP02.phx.gbl...
> foxidrive,
> surly, the [start "title" "command"] only applies to
> naming the title of a CMD.EXE window, not the title of a Window's
> application.
> When the batch-script quoted executes the line you suggested :
>
> start "" "c:\program files\internet explorer\iexplore.exe"
> intranet.companyname.com/timesheets
>
> ...the window-title will be governed by the html [web] page that is the
> target of the iexplore.exe command (set with the html tagline: <TITLE> My
> Window </TITLE>).
>
> As I said, I thought that the only relevance adding the "title" in the
> "start" command is when calling up another command-prompt window...?
>
> ==
>
> Cheers, Tim Meddick, Peckham, London. :-)
>
There was a discussion about this START syntax problem in the thread
"Opening Dual Windows in Batch Files" which started in this group at the end
of August. I did an extensive (but not exhaustive) analysis at the time, and
came to this conclusion (which seems to have been unchallenged so far...)
====================
I've tried to analyse the syntax for the START command, and I'll admit that
I've only tried unquoted and quoted strings - no unbalanced-quotes, embedded
quotes or alternative separators like semicolons or tabs. What I conclude is
this:
1. If there is a single argument, that argument will be executed, whether or
not it is quoted.
2. If the first argument is NOT quoted, then that first argument will be
executed with parameters of the remaining arguments
3. If the first argument IS quoted, then that will be used as the TITLE.
3a If the second argument is NOT quoted, then the second argument will be
executed with parameters of the remaining arguments
3b If the second argument IS quoted then an attempt will be made to execute
that part of the command-line AFTER the opening quote of the second argument
UP TO the final quote on the line, with parameter(s) of the remainder of the
line after the separator following the opening quote of the second argument
MINUS the final quote on the line.
This should all be clear, I hope - with the exception of 3b, which I'll
exemplify:
START "s tring1" "s tring2" "s tring3" "s tring4" parm5
Where there is a deliberate space between "s" and "tring"
will select (parameters delimited by [] for clarity)
[s tring1] as TITLE
[s] as executable
[tring2"] as executable's first parameter
["s tring3"] as executable's second parameter
["s tring4] as executable's third parameter
[parm5] as executable's fourth parameter
Note that the actual executable is that part before the space-separator; the
first parameter delivered has an unbalanced quote and the third parameter is
missing the closing quote.
Observe the response should the target executable ([s] in this case) not
exist - the executable reported as not existing is that command-line portion
up to the final quote, not simply to the first separator following the
opening quote on the second argument...!
==========================
HTH
>There was a discussion about this START syntax problem in the thread
>"Opening Dual Windows in Batch Files" which started in this group at the end
>of August. I did an extensive (but not exhaustive) analysis at the time, and
>came to this conclusion (which seems to have been unchallenged so far...)
>
>====================
>
>I've tried to analyse the syntax for the START command, and I'll admit that
>I've only tried unquoted and quoted strings - no unbalanced-quotes, embedded
>quotes or alternative separators like semicolons or tabs. What I conclude is
>this:
>
>1. If there is a single argument, that argument will be executed, whether or
>not it is quoted.
except this opens a cmd window and notepad is the window title.
start "notepad"
Hmm. I'd suggest that 'notepad.exe' and 'notepad.com' and 'notepad.bat' are
executables, but 'notepad' isn't.
>>>I've tried to analyse the syntax for the START command,
>>>1. If there is a single argument, that argument will be executed, whether or
>>>not it is quoted.
>>
>> except this opens a cmd window and notepad is the window title.
>>
>> start "notepad"
>
>Hmm. I'd suggest that 'notepad.exe' and 'notepad.com' and 'notepad.bat' are
>executables, but 'notepad' isn't.
This works to start notepad:
start "" "notepad"
So perhaps a single argument, if quoted, must have an explicit executable
extension to be executed?
From my own experiences (running on XP Pro. with cmd extensions enabled) the
following works to open notepad :
start "notepad"
and the initial "quotes" are not needed, as implied by yourself and others here.
As I said earlier, the only time the contents of the first set of "quotes" are taken
to be a window title is when the contents of the second set of quotes or a second
bare argument points to either CMD.EXE or other command-line application.
Where the contents of the second set of quotes or second bare argument points to a
valid Win32 application - then the first argument within "quotes" is IGNORED.
You seem to be having some different result....?
==
Cheers, Tim Meddick, Peckham, London. :-)
"foxidrive" <got...@woohoo.invalid> wrote in message
news:2vm5f5127alpjphfo...@4ax.com...
>We seem to be talking at cross-purposes at the moment...
Apparantly you are getting results that are not consistant with a standard
install.
>From my own experiences (running on XP Pro. with cmd extensions enabled) the
>following works to open notepad :
>
>start "notepad"
Command Extensions are enabled by default so that is not part of the issue.
Are you able to try a different XP box to check this behaviour?
Alternately can you install W2K/XP/Vista/W7 to a Virtual machine using one
of the free VM programs and verify it on there?
Win9x did not require the leading "" but AFAIK every standard Windows
install from at least W2K onward does require it.