Calling webpage with logon script, logon script wont close

  • Thread starter Thread starter gerryR
  • Start date Start date
G

gerryR

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
 
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"
intranet.companyname.com/timesheets
 
Perfect!

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

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.
 
Good to know, thanks again!

foxidrive said:
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,
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. :-)
 
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 said:
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 said:
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.
 
....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. :-)




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 said:
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 said:
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.
 
...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.    :-)

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 said:
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.    :-)
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
 
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 said:
...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. :-)




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 said:
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. :-)





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




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

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 said:
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. :-)
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
 
Except they won't start if quoted and title isn't specified.

--
..
--
Tim Meddick said:
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. :-)




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

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

This works to start notepad:

start "" "notepad"
 
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. :-)
 
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.
 
Back
Top