Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete a window from display 1

Status
Not open for further replies.

omegabeta

Programmer
Aug 20, 2003
148
RO
Hi,

In my script I made a copy operation but at the end I want the window to be deleted from display. I've tried with exit but it doesn't work.

oShell.run "cmd /k copy " & Source & "*.txt " & Dest,5
oShell.run "cmd /k exit"

Can someone tell me haw can I solve the problem ?

Thanks in advance
 
Remove the /k switch from your cmd call. Use /c instead.

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Hello omegabeta,

Methods are often one of these (not together):
[1] Put the instructions in a bat. Run the link of the bat where window close after finish checkbox is checked and host the application with cmd /k.
or
[2] Put the instructions in a bat and adding three lines at the end:
Code:
    cls
    @echo off
    exit
and then .run the batch file.
or
[3] After the .run on the batch file, make another .run with the utility kill.exe coming from the resource kit or equivalence with
Code:
oShell.run "kill /f winoa386.mod"
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top