Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > Clickable .BAT files?

Reply
Thread Tools

Clickable .BAT files?

 
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      01-14-2010
A friend of mine is having an odd problem where his Windows XP machine seems
to spontaneously connect to his dialup account.

I’ve been trying to figure out an easy way he can execute the following
command

netstat -an >Desktop\netstat.dat

and send me the resulting netstat.dat file. When I tried putting it into a
file called “netstat.bat” on his desktop, and double-clicked it, all it
seemed to do was open a window showing the command line, without actually
executing it.

Does Windows have the equivalent of .desktop files?
 
Reply With Quote
 
 
 
 
Gordon
Guest
Posts: n/a
 
      01-14-2010
On 2010-01-14, Lawrence D'Oliveiro <_zealand> wrote:
> A friend of mine is having an odd problem where his Windows XP machine seems
> to spontaneously connect to his dialup account.
>
> I?ve been trying to figure out an easy way he can execute the following
> command
>
> netstat -an >Desktop\netstat.dat
>
> and send me the resulting netstat.dat file. When I tried putting it into a
> file called ?netstat.bat? on his desktop, and double-clicked it, all it
> seemed to do was open a window showing the command line, without actually
> executing it.
>
> Does Windows have the equivalent of .desktop files?


Lawrence, I am having a problem. There is a fable about a shepherd who cried
wolf.

So check the permissions of the file, yes
 
Reply With Quote
 
 
 
 
Dave Taylor
Guest
Posts: n/a
 
      01-14-2010
Lawrence D'Oliveiro <_zealand> wrote in news:hiltea
$8en$:

> Does Windows have the equivalent of .desktop files?
>


No.
Use the UNC path of the destination or the explicit path.
ie. %HOMEPATH%/Desktop should work

--
Ciao, Dave
 
Reply With Quote
 
Ted
Guest
Posts: n/a
 
      01-14-2010
On Jan 14, 2:53*pm, Lawrence D'Oliveiro <l...@geek-
central.gen.new_zealand> wrote:
> A friend of mine is having an odd problem where his Windows XP machine seems
> to spontaneously connect to his dialup account.
>
> Ive been trying to figure out an easy way he can execute the following
> command
>
> * * netstat -an >Desktop\netstat.dat
>
> and send me the resulting netstat.dat file. When I tried putting it into a
> file called netstat.bat on his desktop, and double-clicked it, all it
> seemed to do was open a window showing the command line, without actually
> executing it.
>
> Does Windows have the equivalent of .desktop files?


In Windows XP: I've just tried putting this command

echo abcdef > test.txt

into a file called test.bat on the desktop. Double-clicking it
created a file called test.txt, on the desktop, with the expected
contents.



 
Reply With Quote
 
Ted
Guest
Posts: n/a
 
      01-14-2010
On Jan 14, 10:01*pm, Ted <ted.8...@gmail.com> wrote:
> On Jan 14, 2:53*pm, Lawrence D'Oliveiro <l...@geek-
>
> central.gen.new_zealand> wrote:
> > A friend of mine is having an odd problem where his Windows XP machine seems
> > to spontaneously connect to his dialup account.

>
> > Ive been trying to figure out an easy way he can execute the following
> > command

>
> > * * netstat -an >Desktop\netstat.dat

>
> > and send me the resulting netstat.dat file. When I tried putting it into a
> > file called netstat.bat on his desktop, and double-clicked it, all it
> > seemed to do was open a window showing the command line, without actually
> > executing it.

>
> > Does Windows have the equivalent of .desktop files?

>
> In Windows XP: I've just tried putting this command
>
> echo abcdef > test.txt
>
> into a file called test.bat on the desktop. *Double-clicking it
> created a file called test.txt, on the desktop, with the expected
> contents.


But... doing the same with netstat -an > netstat.txt does just open a
command window with the command displayed. However an extra "1" has
crept in and it looks like this:

netstat -an 1>netstat.txt

I'm not sure whats going on here...


 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      01-14-2010
In message <6e4b431a-3cda-40b7-
ad4a->, Ted wrote:

> But... doing the same with netstat -an > netstat.txt does just open a
> command window with the command displayed. However an extra "1" has
> crept in and it looks like this:
>
> netstat -an 1>netstat.txt
>
> I'm not sure whats going on here...


Exactly the same thing I saw.
 
Reply With Quote
 
Enkidu
Guest
Posts: n/a
 
      01-14-2010
Lawrence D'Oliveiro wrote:
> In message <6e4b431a-3cda-40b7-
> ad4a->, Ted wrote:
>
>> But... doing the same with netstat -an > netstat.txt does just open a
>> command window with the command displayed. However an extra "1" has
>> crept in and it looks like this:
>>
>> netstat -an 1>netstat.txt
>>
>> I'm not sure whats going on here...

>
> Exactly the same thing I saw.
>

You could try a bat file containing :

netstat -an &1>netstat.txt

Cheers,

Cliff

--

The Internet is interesting in that although the nicknames may change,
the same old personalities show through.
 
Reply With Quote
 
Ted
Guest
Posts: n/a
 
      01-14-2010
On Jan 15, 9:06*am, Enkidu <enkidu....@com.cliffp.com> wrote:
> Lawrence D'Oliveiro wrote:
> > In message <6e4b431a-3cda-40b7-
> > ad4a-6f95ef1f5...@j5g2000yqm.googlegroups.com>, Ted wrote:

>
> >> But... doing the same with netstat -an > netstat.txt does just open a
> >> command window with the command displayed. *However an extra "1" has
> >> crept in and it looks like this:

>
> >> netstat -an *1>netstat.txt

>
> >> I'm not sure whats going on here...

>
> > Exactly the same thing I saw.

>
> *>
> You could try a bat file containing :
>
> netstat -an &1>netstat.txt
>

That doesn't create an output file at all. There is something odd
about the netstat command. If you use another command, dir for
example, then it works as expected. If you open a command line window
and type in netstat -an>netstat.txt, then it also works as expected.
But clicking on a batch file containing netstat -an>netstat.txt just
copies the text of the command itself into the output file.
 
Reply With Quote
 
Jeff Miller
Guest
Posts: n/a
 
      01-14-2010

I doubt that this will be very helpful,
but you may be interested to know that
it works perfectly on my machine.

1. I created C:\test.bat with the single line:
netstat -an > netstat.txt

2. I moved test.bat onto the desktop.

3. I double-clicked on its icon.

4. The cmd window appeared very briefly,
and then netstat.txt appeared on the desktop,
with exactly the same contents as I got
running netstat from the command line.

A wild guess: it may have something to do
with the Edit options for cmd.exe. I have
Insert mode ticked, and
QuickEdit mode NOT ticked.

Good luck,
 
Reply With Quote
 
Nicolaas Hawkins
Guest
Posts: n/a
 
      01-15-2010
Ted <> wrote:

> On Jan 15, 9:06*am, Enkidu <enkidu....@com.cliffp.com> wrote:
>> Lawrence D'Oliveiro wrote:
>>> In message <6e4b431a-3cda-40b7-
>>> ad4a-6f95ef1f5...@j5g2000yqm.googlegroups.com>, Ted wrote:

>>
>>>> But... doing the same with netstat -an > netstat.txt does just open a
>>>> command window with the command displayed. *However an extra "1" has
>>>> crept in and it looks like this:

>>
>>>> netstat -an *1>netstat.txt

>>
>>>> I'm not sure whats going on here...

>>
>>> Exactly the same thing I saw.

>>
>> *>
>> You could try a bat file containing :
>>
>> netstat -an &1>netstat.txt
>>

> That doesn't create an output file at all. There is something odd
> about the netstat command. If you use another command, dir for
> example, then it works as expected. If you open a command line window
> and type in netstat -an>netstat.txt, then it also works as expected.
> But clicking on a batch file containing netstat -an>netstat.txt just
> copies the text of the command itself into the output file.


Try putting a space between the '-an' and the '>' so you have:
'netstat -an >netstat.txt' ?

--
- Nicolaas
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixed & Tiny clickable images Newbie4Ever Firefox 2 09-26-2005 09:42 AM
any clickable control Corno ASP .Net 1 09-06-2004 06:09 PM
clickable validator z. f. ASP .Net 1 07-14-2004 02:03 PM
DataGrid Clickable Columes Amir ASP .Net 3 01-19-2004 04:59 PM
Clickable bar graphs Andrew de la Harpe ASP .Net 3 11-03-2003 01:34 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57