[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

OT - Batch file : how to close it?

a

8/8/2011 12:06:00 AM

because xp has not "msconfig.exe"
but only the old dos "ipconfig.exe"

and because typing the related parameters
in the old dos black window is boring
I created a batch file

but... it doesn't close the black dos window.

How to close it?

note:
I don't want to right click on the created .bat file
and set the automated closure by there;
I want do that programmatically

note2:
I'm testing it on win98
and hope it will work on xp

-------- here the simple code: ----------------
cd c:\windows
ipconfig /release_all
ipconfig /renew_all
exit
-----------------------------
16 Answers

ralph

8/8/2011 4:35:00 AM

0

On Mon, 08 Aug 2011 02:05:53 +0200, a <a@inwind.it> wrote:

>because xp has not "msconfig.exe"
>but only the old dos "ipconfig.exe"
>
>and because typing the related parameters
>in the old dos black window is boring
>I created a batch file
>
>but... it doesn't close the black dos window.
>
>How to close it?
>
>note:
>I don't want to right click on the created .bat file
>and set the automated closure by there;
>I want do that programmatically
>
>note2:
>I'm testing it on win98
>and hope it will work on xp
>
>-------- here the simple code: ----------------
>cd c:\windows
>ipconfig /release_all
>ipconfig /renew_all
>exit
>-----------------------------

The key is you need to launch a cmd (the Windows Command Interpreter)
with the "/C" option.
[ Type "cmd /?" in DOS Window to see all the options. ]

The easiest solution, allowing you to 'click something', is simply
creating a Shortcut and provide a command string such as "cmd /c
my.bat"

-ralph

Jeff Johnson [MVP: VB]

8/8/2011 6:58:00 PM

0

"a" <a@inwind.it> wrote in message
news:cj9u37lr26egd6vj6lu405cj6c7je0v3pq@4ax.com...

> because xp has not "msconfig.exe"

Huh? Since when does XP (I assume you mean Windows XP) not have
msconfig.exe?


a

8/8/2011 9:10:00 PM

0

On Mon, 8 Aug 2011 14:57:45 -0400, "Jeff Johnson" <i.get@enough.spam>
wrote:

>"a" <a@inwind.it> wrote in message
>news:cj9u37lr26egd6vj6lu405cj6c7je0v3pq@4ax.com...
>
>> because xp has not "msconfig.exe"
>
>Huh? Since when does XP (I assume you mean Windows XP) not have
>msconfig.exe?
>

yes, sorry,

i was meaning it misses the windows interface
related to the ipconfig.exe
(in short I need the "release all" and "renev all" buttons)



a

8/9/2011 12:07:00 AM

0


>>I created a batch file
>>
>>but... it doesn't close the black dos window.
>>
>>How to close it?

>
>The key is you need to launch a cmd (the Windows Command Interpreter)
>with the "/C" option.
>[ Type "cmd /?" in DOS Window to see all the options. ]
>
>The easiest solution, allowing you to 'click something', is simply
>creating a Shortcut and provide a command string such as "cmd /c
>my.bat"
>
>-ralph

No way

the

Command /C C:\Windows\Desktop\my.bat

doesn't close the black dos window.


Notes:
- in w98 we have to use command.exe and not cmd.exe
- I checked it out and the only suitable parameter command.exe offers is
/C and nothing else


-mhd

8/9/2011 3:07:00 AM

0

a <a@inwind.it> wrote:

>
>No way
>
>the
>
>Command /C C:\Windows\Desktop\my.bat
>
>doesn't close the black dos window.
>


Last line should be
CLS

-mhd

Dee Earley

8/9/2011 7:46:00 AM

0

On 08/08/2011 22:10, a wrote:
> On Mon, 8 Aug 2011 14:57:45 -0400, "Jeff Johnson"<i.get@enough.spam>
> wrote:
>> "a"<a@inwind.it> wrote in message
>> news:cj9u37lr26egd6vj6lu405cj6c7je0v3pq@4ax.com...
>>
>>> because xp has not "msconfig.exe"
>>
>> Huh? Since when does XP (I assume you mean Windows XP) not have
>> msconfig.exe?
>
> yes, sorry,
>
> i was meaning it misses the windows interface
> related to the ipconfig.exe
> (in short I need the "release all" and "renev all" buttons)

Isn't the "Right click, repair" on the network interface easier?

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

a

8/9/2011 1:38:00 PM

0

On Mon, 08 Aug 2011 23:06:49 -0400, -mhd <not_real@invalid.com> wrote:

>a <a@inwind.it> wrote:
>
>>
>>No way
>>
>>the
>>
>>Command /C C:\Windows\Desktop\my.bat
>>
>>doesn't close the black dos window.
>>
>
>
>Last line should be
>CLS
>
>-mhd

Yes, it works!!

so, this is it:

Command /C C:\Windows\Desktop\my.bat
cls




Dee Earley

8/9/2011 1:44:00 PM

0

On 09/08/2011 14:37, a wrote:
> Command /C C:\Windows\Desktop\my.bat
> cls

Err...

Is that in a batch file?
Why don't you just put the cls inside the my.bat file?
(Or better still use the built in "repair" feature of Windows XP)


--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

a

8/9/2011 1:46:00 PM

0


>> yes, sorry,
>>
>> i was meaning it misses the windows interface
>> related to the ipconfig.exe
>> (in short I need the "release all" and "renev all" buttons)
>
>Isn't the "Right click, repair" on the network interface easier?


Uh!

I can't test it right now, but it seems
to do what I was searching for.
But, after having reading this
http://forums.techarena.in/windows-xp-support/...
(third poster called 'Vangiuard') I'm not so sure indeed.

I didn't go deeper on this.


Dee Earley

8/9/2011 2:41:00 PM

0

On 09/08/2011 14:45, a wrote:
>>> yes, sorry,
>>>
>>> i was meaning it misses the windows interface
>>> related to the ipconfig.exe
>>> (in short I need the "release all" and "renev all" buttons)
>>
>> Isn't the "Right click, repair" on the network interface easier?
>
> Uh!
>
> I can't test it right now, but it seems
> to do what I was searching for.
> But, after having reading this
> http://forums.techarena.in/windows-xp-support/...
> (third poster called 'Vangiuard') I'm not so sure indeed.

As they say, it won't help a screwy device but it DOES do a DHCP
release/renew which is all you said you were trying to do.

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)