# BUG: MSGBOX after DETACH returns early with 0 on Win7

#### jabelli

I noticed the MSGBOXs in one of my batch files closing on their own, and investigated the problem. I have reduced a demonstration to the simplest method:

(detach dir) & MSGBOX OK OK & echo %_?

TCC 10.00.75 Windows 7 [Version 6.1.7600]

#### rconn

jabelli wrote:

> I noticed the MSGBOXs in one of my batch files closing on their own, and investigated the problem. I have reduced a demonstration to the simplest method:
>
> (detach dir) & MSGBOX OK OK & echo %_?

It's a (known) Windows 7 bug. If MS doesn't fix in in the Windows 7
release I'll try to hack around it.

Rex Conn
JP Software

#### jabelli

It's a (known) Windows 7 bug. If MS doesn't fix in in the Windows 7 release I'll try to hack around it.
Sorry; I didn't state that this is RTM (from MSDN), not the RC. I suppose they may patch it before October 22; I'll keep an eye on it. Is there a KB# associated with the issue?

In the mean time, is there anything I can add to the batch file as a temporary workaround?

#### rconn

jabelli wrote:

> ---Quote (Originally by rconn)---
> It's a (known) Windows 7 bug. If MS doesn't fix in in the Windows 7 release I'll try to hack around it.
> ---End Quote---
> Sorry; I didn't state that this is RTM (from MSDN), not the RC. I suppose they may patch it before October 22; I'll keep an eye on it.
>
> In the mean time, is there anything I can add to the batch file as a temporary workaround?

You can put a short delay after the DETACH; i.e., something like:

(detach dir) & delay 10 10 & msgbox ok ok

Rex Conn
JP Software

Replies
1
Views
169
Replies
0
Views
199
Replies
5
Views
326
Replies
7
Views
492
Replies
2
Views
825
Replies
14
Views
948
Replies
6
Views
631
Replies
8
Views
639
Replies
1
Views
540
Replies
6
Views
991
Replies
2
Views
752
Replies
7
Views
1K
Replies
3
Views
1K
Replies
6
Views
1K
Replies
11
Views
2K
Replies
2
Views
1K
Replies
4
Views
2K
Replies
4
Views
1K
Replies
6
Views
1K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
6
Views
1K
Replies
4
Views
1K
Replies
1
Views
986
Replies
3
Views
986
Replies
6
Views
2K
Replies
7
Views
1K
Replies
4
Views
1K
Replies
12
Views
2K
Replies
3
Views
1K
Replies
7
Views
1K
Replies
8
Views
2K
Replies
2
Views
2K
Replies
4
Views
2K
Replies
4
Views
1K
Replies
15
Views
2K
Replies
8
Views
2K
Replies
8
Views
2K
Replies
4
Views
2K
Replies
9
Views
2K
Replies
4
Views
2K
Replies
3
Views
1K
Replies
1
Views
1K
Replies
17
Views
2K
Replies
3
Views
2K
Replies
1
Views
1K
Replies
2
Views
2K
Replies
4
Views
2K
Replies
1
Views
1K
Replies
1
Views
1K