Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calling webpage with logon script, logon script wont close

10 views
Skip to first unread message

gerryR

unread,
Nov 4, 2009, 4:00:14 AM11/4/09
to
Hi

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

foxidrive

unread,
Nov 4, 2009, 4:49:22 AM11/4/09
to
On Wed, 4 Nov 2009 09:00:14 -0000, "gerryR" <ger...@NOWAY.com> wrote:

>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"

gerryR

unread,
Nov 4, 2009, 5:13:58 AM11/4/09
to
Perfect!

Thanks foxidrive, what do the two "" do to the command?

"foxidrive" <got...@woohoo.invalid> wrote in message
news:ofj2f555vejee8mo0...@4ax.com...

foxidrive

unread,
Nov 4, 2009, 5:56:12 AM11/4/09
to
On Wed, 4 Nov 2009 10:13:58 -0000, "gerryR" <ger...@NOWAY.com> wrote:

>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.

gerryR

unread,
Nov 4, 2009, 6:30:45 AM11/4/09
to

Good to know, thanks again!

"foxidrive" <got...@woohoo.invalid> wrote in message

news:c9n2f594doklh9f0n...@4ax.com...

Tim Meddick

unread,
Nov 4, 2009, 1:22:34 PM11/4/09
to
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. :-)


"foxidrive" <got...@woohoo.invalid> wrote in message

news:c9n2f594doklh9f0n...@4ax.com...

.

unread,
Nov 4, 2009, 1:45:36 PM11/4/09
to
The FIRST quotes the Start command finds will be used as the title for a new
command prompt window whether one is being created or not.

--
.
--
"Tim Meddick" <timme...@gawab.com> wrote in message
news:%23vBRTvX...@TK2MSFTNGP02.phx.gbl...

Tim Meddick

unread,
Nov 4, 2009, 3:31:02 PM11/4/09
to
...but if there are only one set of quotes - the start command will try to execute
it - not assume it's a title.

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...

Tom Lavedas

unread,
Nov 4, 2009, 3:47:25 PM11/4/09
to
On Nov 4, 3:31 pm, "Tim Meddick" <timmedd...@gawab.com> wrote:
> ...but if there are only one set of quotes - the start command will try to execute
> it - not assume it's a title.
>
> 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 messagenews:eAlzF8XX...@TK2MSFTNGP06.phx.gbl...

> > The FIRST quotes the Start command finds will be used as the title for a new
> > command prompt window whether one is being created or not.
>
> > --
> > .
> > --
> > "Tim Meddick" <timmedd...@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.    :-)
>
> >> "foxidrive" <got...@woohoo.invalid> wrote in message
> >>news:c9n2f594doklh9f0n...@4ax.com...
> >>> On Wed, 4 Nov 2009 10:13:58 -0000, "gerryR" <ger...@NOWAY.com> wrote:
>
> >>>>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.

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

.

unread,
Nov 4, 2009, 6:43:26 PM11/4/09
to
Yes it does. If you remove them then the exe becomes the window title.

Try the command without the initial quotes

eg

start "notepad"

--
.
--
"Tim Meddick" <timme...@gawab.com> wrote in message

news:OeN8%232YXK...@TK2MSFTNGP02.phx.gbl...

Tim Meddick

unread,
Nov 4, 2009, 7:31:53 PM11/4/09
to

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...

.

unread,
Nov 4, 2009, 7:42:44 PM11/4/09
to
Except they won't start if quoted and title isn't specified.

--
.
--


"Tim Meddick" <timme...@gawab.com> wrote in message

news:eGYtk9a...@TK2MSFTNGP02.phx.gbl...

billious

unread,
Nov 4, 2009, 9:03:08 PM11/4/09
to
> "foxidrive" <got...@woohoo.invalid> wrote in message
> news:c9n2f594doklh9f0n...@4ax.com...
>> On Wed, 4 Nov 2009 10:13:58 -0000, "gerryR" <ger...@NOWAY.com> wrote:
>>
>>>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.
>>
>

"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


foxidrive

unread,
Nov 5, 2009, 1:54:51 AM11/5/09
to
On Thu, 5 Nov 2009 10:03:08 +0800, "billious" <billio...@hotmail.com>
wrote:

>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"

billious

unread,
Nov 5, 2009, 7:57:21 AM11/5/09
to

"foxidrive" <got...@woohoo.invalid> wrote in message
news:bft4f5plpg9l3trua...@4ax.com...

Hmm. I'd suggest that 'notepad.exe' and 'notepad.com' and 'notepad.bat' are
executables, but 'notepad' isn't.


foxidrive

unread,
Nov 5, 2009, 9:08:15 AM11/5/09
to
On Thu, 5 Nov 2009 20:57:21 +0800, "billious" <billio...@hotmail.com>
wrote:


>>>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"


billious

unread,
Nov 5, 2009, 11:36:12 AM11/5/09
to

"foxidrive" <got...@woohoo.invalid> wrote in message
news:2vm5f5127alpjphfo...@4ax.com...

So perhaps a single argument, if quoted, must have an explicit executable
extension to be executed?

.

unread,
Nov 5, 2009, 2:50:38 PM11/5/09
to
start "c:\windows\system32\notepad.exe"
doesn't work either
--
.
--
"billious" <billio...@hotmail.com> wrote in message
news:naCdnR4AYfxiY2_X...@westnet.com.au...

Tim Meddick

unread,
Nov 6, 2009, 11:33:12 AM11/6/09
to

We seem to be talking at cross-purposes at the moment...

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...

foxidrive

unread,
Nov 6, 2009, 12:19:02 PM11/6/09
to
On Fri, 6 Nov 2009 16:33:12 -0000, "Tim Meddick" <timme...@gawab.com>
wrote:

>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.

0 new messages