programing

Windows 배치 파일에서 팝업/메시지 상자 표시

minimums 2023. 4. 18. 21:57
반응형

Windows 배치 파일에서 팝업/메시지 상자 표시

요? (「」와 )xmessageLinux ® bash - scripts linux linux linux linux linux linux linux linux linux linux linux linux?

우선 DOS는 이 솔루션과는 무관하며 Windows 명령줄 솔루션(다시 말해 DOS 없음, 순수 Windows, Window가 아닌 콘솔)이 필요합니다.

할 수도 있고 boflyn 메서드를 잘못 .net send ★★★★★★★★★★★★★★★★★」msgnet send는 오래된합니다.

net send localhost Some message to display

이것은 Messenger 서비스를 실행하는 것에 의해서도 다릅니다.

새로운 버전(XP 이후)의 경우:

msg "%username%" Some message to display

는 ""를 사용하여 됩니다.msg.exe요. ㄴ, ㄴ, ㄴ, ㄴ, ㄴ, ㄴ, ㄴ, ㄴ, ㄴ, ㄴ, ㄴ, ㄴ, 으로 덮어쓸 수 있어요./time:xx환합니니다다

매우 간단한 VBScript 파일을 만들고 CScript를 사용하여 명령줄 파라미터를 해석합니다.

요.MessageBox.vbs:

Set objArgs = WScript.Arguments
messageText = objArgs(0)
MsgBox messageText

당신은 그걸 이렇게 부르죠:

cscript MessageBox.vbs "This will be shown in a popup."

MsgBox 루트에 관심이 있는 경우는, 을 참조해 주세요.

약간의 플래시가 표시될 수 있지만 임시 파일은 필요하지 않습니다.(IIRC) IE5 시대로 거슬러 올라가야 합니다.

mshta javascript:alert("Message\n\nMultiple\nLines\ntoo!");close();

이 기능을 사용하는 경우 괄호에서 벗어나는 것을 잊지 마십시오.if:

if 1 == 1 (
   mshta javascript:alert^("1 is equal to 1, amazing."^);close^(^);
)

다른 명령 프롬프트 창이 나타납니다.

START CMD /C "ECHO My Popup Message && PAUSE"

시도:

Msg * "insert your message here" 

Windows XP 의 command.com 를 사용하고 있는 경우는, 메세지 박스가 열립니다.

새로운 cmd 창을 여는 것은 당신이 원하는 것이 아닌 것으로 알고 있습니다.VBScript를 사용하여 .bat 파일과 함께 사용할 수도 있습니다.다음 명령을 사용하여 bat 파일에서 엽니다.

cd C:\"location of vbscript"

이것에 의해, command.com 가 파일을 검색하는 디렉토리가 변경되어 다음의 행이 됩니다.

"insert name of your vbscript here".vbs

그런 다음 새 메모장 문서를 만들고 다음을 입력합니다.

<script type="text/vbscript">
    MsgBox "your text here"
</script>

그런 다음 이 파일을 .vbs 파일로 저장하고(파일 이름 끝에 ".vbs"를 붙임), 파일 이름 아래 드롭다운 상자에 "All Files"로 저장한 다음(.txt로 저장되지 않음) 저장을 클릭합니다.

몇 가지 방법이 있다.

1) IEXPRESS를 사용하여 작은 exe를 만들고 버튼 하나로 팝업을 만듭니다(두 가지 유형의 팝업 메시지를 더 만들있습니다).XP 이후의 모든 창에서 작동합니다.

;@echo off
;setlocal

;set ppopup_executable=popupe.exe
;set "message2=click OK to continue"
;
;del /q /f %tmp%\yes >nul 2>&1
;
;copy /y "%~f0" "%temp%\popup.sed" >nul 2>&1

;(echo(FinishMessage=%message2%)>>"%temp%\popup.sed";
;(echo(TargetName=%cd%\%ppopup_executable%)>>"%temp%\popup.sed";
;(echo(FriendlyName=%message1_title%)>>"%temp%\popup.sed"
;
;iexpress /n /q /m %temp%\popup.sed
;%ppopup_executable%
;rem del /q /f %ppopup_executable% >nul 2>&1

;pause

;endlocal
;exit /b 0


[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=1
HideExtractAnimation=1
UseLongFileName=0
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=N
InstallPrompt=%InstallPrompt%
DisplayLicense=%DisplayLicense%
FinishMessage=%FinishMessage%
TargetName=%TargetName%
FriendlyName=%FriendlyName%
AppLaunched=%AppLaunched%
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles
[SourceFiles]
SourceFiles0=C:\Windows\System32\
[SourceFiles0]
%FILE0%=


[Strings]
AppLaunched=subst.exe
PostInstallCmd=<None>
AdminQuietInstCmd=
UserQuietInstCmd=
FILE0="subst.exe"
DisplayLicense=
InstallPrompt=

2) 사용방법MSHTA또, XP 이후의 모든 Windows 머신에서도 동작합니다(OP에서는 「외부」언어는 필요 없습니다만, 여기서 JavaScript는 최소한으로 억제됩니다)...bat:

@if (true == false) @end /*!
@echo off
mshta "about:<script src='file://%~f0'></script><script>close()</script>" %*
goto :EOF */

alert("Hello, world!");

또는 한 줄:

mshta "about:<script>alert('Hello, world!');close()</script>"

또는

mshta "javascript:alert('message');close()"

또는

mshta.exe vbscript:Execute("msgbox ""message"",0,""title"":close")

3) 파라미터화된 것은 이쪽.bat/jscript로 보존할 가 있습니다).batOP 요청에도 불구하고 자바스크립트를 다시 사용하지만, 배트이기 때문에 걱정 없이 배트 파일이라고 할 수 있습니다.인기 있는 MSGBOX보다 조금 더 컨트롤이 가능한 POPUP을 사용하고 있습니다.위 예시와 같이 WSH를 사용하지만 MSHTA는 사용하지 않습니다.

 @if (@x)==(@y) @end /***** jscript comment ******
     @echo off

     cscript //E:JScript //nologo "%~f0" "%~nx0" %*
     exit /b 0

 @if (@x)==(@y) @end ******  end comment *********/


var wshShell = WScript.CreateObject("WScript.Shell");
var args=WScript.Arguments;
var title=args.Item(0);

var timeout=-1;
var pressed_message="button pressed";
var timeout_message="timed out";
var message="";

function printHelp() {
    WScript.Echo(title + "[-title Title] [-timeout m] [-tom \"Time-out message\"] [-pbm \"Pressed button message\"]  [-message \"pop-up message\"]");
}

if (WScript.Arguments.Length==1){
    runPopup();
    WScript.Quit(0);
}

if (args.Item(1).toLowerCase() == "-help" || args.Item(1).toLowerCase() == "-h" ) {
    printHelp();
    WScript.Quit(0);
}

if (WScript.Arguments.Length % 2 == 0 ) {
    WScript.Echo("Illegal arguments ");
    printHelp();
    WScript.Quit(1);
}

for (var arg = 1 ; arg<args.Length;arg=arg+2) {

    if (args.Item(arg).toLowerCase() == "-title") {
        title = args.Item(arg+1);
    }

    if (args.Item(arg).toLowerCase() == "-timeout") {
        timeout = parseInt(args.Item(arg+1));
        if (isNaN(timeout)) {
            timeout=-1;
        }
    }

    if (args.Item(arg).toLowerCase() == "-tom") {
        timeout_message = args.Item(arg+1);
    }

    if (args.Item(arg).toLowerCase() == "-pbm") {
        pressed_message = args.Item(arg+1);
    }

    if (args.Item(arg).toLowerCase() == "-message") {
        message = args.Item(arg+1);
    }
}

function runPopup(){
    var btn = wshShell.Popup(message, timeout, title, 0x0 + 0x10);

    switch(btn) {
        // button pressed.
        case 1:
            WScript.Echo(pressed_message);
            break;

        // Timed out.
        case -1:
           WScript.Echo(timeout_message);
           break;
    }
}

runPopup();

4) 및 1jscript.net/.bat로 보존할 가 있습니다)..bat에는 를 합니다.이번에는.NET 작은 합니다..exe" " " " " : "

@if (@X)==(@Y) @end /****** silent jscript comment ******

@echo off
::::::::::::::::::::::::::::::::::::
:::       compile the script    ::::
::::::::::::::::::::::::::::::::::::
setlocal


::if exist "%~n0.exe" goto :skip_compilation

:: searching the latest installed .net framework
for /f "tokens=* delims=" %%v in ('dir /b /s /a:d /o:-n "%SystemRoot%\Microsoft.NET\Framework\v*"') do (
    if exist "%%v\jsc.exe" (
        rem :: the javascript.net compiler
        set "jsc=%%~dpsnfxv\jsc.exe"
        goto :break_loop
    )
)
echo jsc.exe not found && exit /b 0
:break_loop



call %jsc% /nologo /out:"%~n0.exe" "%~f0" 
::::::::::::::::::::::::::::::::::::
:::       end of compilation    ::::
::::::::::::::::::::::::::::::::::::
:skip_compilation

::
::::::::::
"%~n0.exe" %*
::::::::
::
endlocal
exit /b 0

****** end of jscript comment ******/

import System;
import System.Windows;
import System.Windows.Forms

var arguments:String[] = Environment.GetCommandLineArgs();
MessageBox.Show(arguments[1],arguments[0]);

5) 마지막에 팝업을 생성하는 powershell에 대한 단일 호출(명령줄 또는 powershell이 설치되어 있는 경우 배치에서 호출할 수 있습니다.

powershell [Reflection.Assembly]::LoadWithPartialName("""System.Windows.Forms""");[Windows.Forms.MessageBox]::show("""Hello World""", """My PopUp Message Box""")

6) 여기서 볼 수 있는 dbenham의 접근법

start "" cmd /c "echo(&echo(&echo              Hello world!     &echo(&pause>nul"

7) 시스템 트레이 알림의 경우 다음을 시도해 볼 수 있습니다.

call SystemTrayNotification.bat  -tooltip warning -time 3000 -title "Woow" -text "Boom" -icon question

이렇게 하면 배치 파일이 VBS 스크립트를 만들고 팝업을 표시합니다.실행 후 배치 파일은 해당 중간 파일을 삭제합니다.

MSGBOX를 사용하는 장점은 MSG.exe는 그다지 많지 않지만, 실제로는 커스터마이즈(제목, 아이콘 변경 등)할 수 있다는 것입니다.

echo MSGBOX "YOUR MESSAGE" > %temp%\TEMPmessage.vbs
call %temp%\TEMPmessage.vbs
del %temp%\TEMPmessage.vbs /f /q

창을 만들기 전에 어셈블리를 로드할 필요는 없지만 @npocmaka가 여기에 게시한 PowerShell MessageBox 명령어보다 상당히 느리게(~+50%) 실행되는 PowerShell 변종입니다.

powershell (New-Object -ComObject Wscript.Shell).Popup("""Operation Completed""",0,"""Done""",0x0)

마지막 파라미터를 "0x0"에서 아래 값으로 변경하여 대화상자에 아이콘을 표시할 수 있습니다(자세한 내용은 팝업 방법 참조).

        이제 그만 0x10 정지
        물음표 0x20 물음표
        느낌표 0x30 느낌표
        정보 마크 0x40 정보 마크

Microsoft TechNet 기사 PowerTip: PowerShell을 사용하여 팝업 창을 표시합니다.

echo X=MsgBox("Message Description",0+16,"Title") >msg.vbs

–0('+' 기호 앞)이 아닌 0,1,2,3,4의 임의의 숫자를 입력할 수 있습니다.각 숫자의 의미는 다음과 같습니다.

0 = Ok Button  
1 = Ok/Cancel Button  
2 = Abort/Retry/Ignore button  
3 = Yes/No/Cancel  
4 = Yes/No  

– 16 대신 16, 32, 48, 64('+' 기호 뒤에 있음)의 임의의 숫자를 입력할 수 있습니다.각 숫자의 의미는 다음과 같습니다.

16 – Critical Icon  
32 – Warning Icon  
48 – Warning Message Icon   
64 – Information Icon  

메시지 * "여기에 메시지 삽입"

정상적으로 동작합니다.메모장에 .bat 파일로 저장하거나 포맷이 "모든 파일"로 설정되어 있는지 확인합니다.

msg * /time:0 /w Hello everybody!

이 메시지는 [OK](확인)을 클릭할 때까지 계속 대기하며(기본적으로는 1분) Windows 8.1에서는 정상적으로 동작합니다.

이를 수행하려면 메시지 상자를 표시하고 배치 파일에서 이를 실행하는 작은 프로그램이 필요합니다.

프롬프트를 표시하는 콘솔창을 열 수는 있지만 cmd.exe와 친구만 사용하여 GUI 메시지박스를 얻을 수 없습니다.AFIK 。

@Fowl의 답변에 따라 다음을 사용하여 타임아웃을 10초 동안만 표시되도록 개선할 수 있습니다.

mshta "javascript:var sh=new ActiveXObject( 'WScript.Shell' ); sh.Popup( 'Message!', 10, 'Title!', 64 );close()"

자세한 내용은 여기를 참조하십시오.

dll 함수를 user32.dll에서 호출할 수 있습니다.

Rundl32.exe user32.dll, MessageBox (0, "text", "titleText", {most like most messagebox e.t.c} 추가 플래그)

내 폰에서 타이핑하는거, 날 판단하지마...그렇지 않으면 나는 여분의 깃발을 링크할 것이다.

여기서 msgbox.exe라는 유틸리티를 사용하고 있습니다.http://www.paulsadowski.com/WSH/cmdprogs.htm

Zenity를 사용하면 download.gnome.org에 일반 릴리스를 게시할 수 있습니다.Zenity를 사용하면 명령줄 및 셸 스크립트에서 대화 상자를 실행할 수 있습니다.자세한 내용은 위키피디아에서도 확인할 수 있습니다.

크로스 플랫폼이지만 최근 win32 빌드를 찾을 수 없었습니다.안타깝게도 placella.com은 오프라인 상태가 되었습니다.v3.20(2016년 3월 이후)의 Windows instra는 여기에서 찾을 수 있습니다.

배치 파일을 실행 파일로 변환(랩핑)하면 이 응용 프로그램이 이를 수행할 수 있습니다.


  1. 단순한 메시지 상자

    %extd% /messagebox Title Text
    

  1. 오류 메시지 상자

    %extd% /messagebox  Error "Error message" 16
    
  2. 다시 시도 취소 메시지 상자

    %extd% /messagebox Title "Try again or Cancel" 5
    

4) "Never ask me again" 메시지 상자

%extd% /messageboxcheck Title Message 0 {73E8105A-7AD2-4335-B694-94F837A38E79}

여기와 다른 투고에서 좋은 답변을 바탕으로 정리한 배치 스크립트입니다.

타이틀 타임아웃 및 sleep을 설정하여 후자의 스케줄과 새로운 행의 \n 스케줄을 설정할 수 있습니다.

popup.bat 이름을 지정하여 Windows 경로 폴더에 저장하면 PC에서 글로벌하게 작업할 수 있습니다.

예를들면popup Line 1\nLine 22행 팝업박스가 표시됩니다(타입).popup /?용도의 경우)

여기 코드가 있습니다.

<!-- : Begin CMD
@echo off
cscript //nologo "%~f0?.wsf" %*
set pop.key=[%errorlevel%]
if %pop.key% == [-1] set pop.key=TimedOut
if %pop.key% == [1]  set pop.key=Ok
if %pop.key% == [2]  set pop.key=Cancel
if %pop.key% == [3]  set pop.key=Abort
if %pop.key% == [4]  set pop.key=Retry
if %pop.key% == [5]  set pop.key=Ignore
if %pop.key% == [6]  set pop.key=Yes
if %pop.key% == [7]  set pop.key=No
if %pop.key% == [10] set pop.key=TryAgain
if %pop.key% == [11] set pop.key=Continue
if %pop.key% == [99] set pop.key=NoWait
exit /b 
-- End CMD -->

<job><script language="VBScript">
'on error resume next
q   =""""
qsq =""" """
Set objArgs = WScript.Arguments
Set objShell= WScript.CreateObject("WScript.Shell")
Popup       =   0
Title       =   "Popup"
Timeout     =   0
Mode        =   0
Message     =   ""
Sleep       =   0
button      =   0
If objArgs.Count = 0 Then 
    Usage()
ElseIf objArgs(0) = "/?" or Lcase(objArgs(0)) = "-h" or Lcase(objArgs(0)) = "--help" Then 
    Usage()
End If
noWait = Not wait() 
For Each arg in objArgs
    If (Mid(arg,1,1) = "/") and (InStr(arg,":") <> 0) Then haveSwitch   =   True
Next
If not haveSwitch Then 
    Message=joinParam("woq")
Else
    For i = 0 To objArgs.Count-1 
        If IsSwitch(objArgs(i)) Then 
            S=split(objArgs(i) , ":" , 2)
                select case Lcase(S(0))
                    case "/m","/message"
                        Message=S(1)
                    case "/tt","/title"
                        Title=S(1)
                    case "/s","/sleep"
                        If IsNumeric(S(1)) Then Sleep=S(1)*1000
                    case "/t","/time"
                        If IsNumeric(S(1)) Then Timeout=S(1)
                    case "/b","/button"
                        select case S(1)
                            case "oc", "1"
                                button=1
                            case "ari","2"
                                button=2
                            case "ync","3"
                                button=3
                            case "yn", "4"
                                button=4
                            case "rc", "5"
                                button=5
                            case "ctc","6"
                                button=6
                            case Else
                                button=0
                        end select
                    case "/i","/icon"
                        select case S(1)
                            case "s","x","stop","16"
                                Mode=16
                            case "?","q","question","32"
                                Mode=32
                            case "!","w","warning","exclamation","48"
                                Mode=48
                            case "i","information","info","64"
                                Mode=64
                            case Else 
                                Mode=0
                        end select
                end select
        End If
    Next
End If
Message = Replace(Message,"/\n", "°"  )
Message = Replace(Message,"\n",vbCrLf)
Message = Replace(Message, "°" , "\n")
If noWait Then button=0

Wscript.Sleep(sleep)
Popup   = objShell.Popup(Message, Timeout, Title, button + Mode + vbSystemModal)
Wscript.Quit Popup

Function IsSwitch(Val)
    IsSwitch        = False
    If Mid(Val,1,1) = "/" Then
        For ii = 3 To 9 
            If Mid(Val,ii,1)    = ":" Then IsSwitch = True
        Next
    End If
End Function

Function joinParam(quotes)
    ReDim ArgArr(objArgs.Count-1)
    For i = 0 To objArgs.Count-1 
        If quotes = "wq" Then 
            ArgArr(i) = q & objArgs(i) & q 
        Else
            ArgArr(i) =     objArgs(i)
        End If
    Next
    joinParam = Join(ArgArr)
End Function

Function wait()
    wait=True
    If objArgs.Named.Exists("NewProcess") Then
        wait=False
        Exit Function
    ElseIf objArgs.Named.Exists("NW") or objArgs.Named.Exists("NoWait") Then
        objShell.Exec q & WScript.FullName & qsq & WScript.ScriptFullName & q & " /NewProcess: " & joinParam("wq") 
        WScript.Quit 99
    End If
End Function

Function Usage()
    Wscript.Echo _
                     vbCrLf&"Usage:" _
                    &vbCrLf&"      popup followed by your message. Example: ""popup First line\nescaped /\n\nSecond line"" " _
                    &vbCrLf&"      To triger a new line use ""\n"" within the msg string [to escape enter ""/"" before ""\n""]" _
                    &vbCrLf&"" _
                    &vbCrLf&"Advanced user" _
                    &vbCrLf&"      If any Switch is used then you must use the /m: switch for the message " _
                    &vbCrLf&"      No space allowed between the switch & the value " _
                    &vbCrLf&"      The switches are NOT case sensitive " _
                    &vbCrLf&"" _
                    &vbCrLf&"      popup [/m:""*""] [/t:*] [/tt:*] [/s:*] [/nw] [/i:*]" _
                    &vbCrLf&"" _
                    &vbCrLf&"      Switch       | value |Description" _
                    &vbCrLf&"      -----------------------------------------------------------------------" _
                    &vbCrLf&"      /m: /message:| ""1 2"" |if the message have spaces you need to quote it " _
                    &vbCrLf&"                   |       |" _
                    &vbCrLf&"      /t: /time:   | nn    |Duration of the popup for n seconds " _
                    &vbCrLf&"                   |       |<Default> untill key pressed" _
                    &vbCrLf&"                   |       |" _
                    &vbCrLf&"      /tt: /title: | ""A B"" |if the title have spaces you need to quote it " _
                    &vbCrLf&"                   |       | <Default> Popup" _
                    &vbCrLf&"                   |       |" _
                    &vbCrLf&"      /s: /sleep:  | nn    |schedule the popup after n seconds " _
                    &vbCrLf&"                   |       |" _
                    &vbCrLf&"      /nw /NoWait  |       |Continue script without the user pressing ok - " _
                    &vbCrLf&"                   |       | botton option will be defaulted to OK button " _
                    &vbCrLf&"                   |       |" _
                    &vbCrLf&"      /i: /icon:   | ?/q   |[question mark]"  _
                    &vbCrLf&"                   | !/w   |[exclamation (warning) mark]"  _
                    &vbCrLf&"                   | i/info|[information mark]"  _
                    &vbCrLf&"                   | x/stop|[stop\error mark]" _
                    &vbCrLf&"                   | n/none|<Default>" _
                    &vbCrLf&"                   |       |" _
                    &vbCrLf&"      /b: /button: | o     |[OK button] <Default>"  _
                    &vbCrLf&"                   | oc    |[OK and Cancel buttons]"  _
                    &vbCrLf&"                   | ari   |[Abort, Retry, and Ignore buttons]"  _
                    &vbCrLf&"                   | ync   |[Yes, No, and Cancel buttons]" _
                    &vbCrLf&"                   | yn    |[Yes and No buttons]" _
                    &vbCrLf&"                   | rc    |[Retry and Cancel buttons]" _
                    &vbCrLf&"                   | ctc   |[Cancel and Try Again and Continue buttons]" _
                    &vbCrLf&"      --->         | --->  |The output will be saved in variable ""pop.key""" _
                    &vbCrLf&"" _
                    &vbCrLf&"Example:" _
                    &vbCrLf&"        popup /tt:""My MessageBox"" /t:5 /m:""Line 1\nLine 2\n/\n\nLine 4""" _
                    &vbCrLf&"" _
                    &vbCrLf&"                     v1.9 By RDR @ 2020"
    Wscript.Quit
End Function

</script></job>

배트 파일:

@echo off
echo wscript.Quit((msgbox("question?",4+32+256, "title")-6) Mod 255) > %temp%\msgbox.vbs
start /wait %temp%\msgbox.vbs
rem echo wscript returned %errorlevel%
if errorlevel 1 goto error
echo We have Yes
goto end
:error
echo We have No
:end
del %temp%\msgbox.vbs /f /q

배치 서브루틴을 만듭니다.MSGBOX아래와 같이 전화하실 수 있습니다.

call :MSGBOX "Test-Message 1" "Test-Title 1"

네가 원하는 만큼 자주.

예를 들어 다음과 같습니다.

@ECHO OFF

:: call message box sub-routine
call :MSGBOX "Test-Message 1" "Test-Title 1"
call :MSGBOX "Test-Message 2" "Test-Title 2"

:END
EXIT /B


::::::::::::::::
:: sub-routines

:MSGBOX
:: 1. parameter: message
:: 2. parameter: title

:: find temporary name for VBS file
:uniqueLoop
set "uniqueFileName=%tmp%\msgbox~%RANDOM%.vbs"
if exist "%uniqueFileName%" goto :uniqueLoop

:: write to temporary VBS file, execute, delete file
echo msgbox"%~1",vbInformation , "%~2"> %uniqueFileName% 
%uniqueFileName% 
erase %uniqueFileName%
EXIT /B

msg * /server: 127.0.0.1 여기에 메시지를 입력합니다.

더 나은 옵션

set my_message=Hello world&& start cmd /c "@echo off & mode con cols=15 lines=2 & echo %my_message% & pause>nul"


설명:
lines=행의 양 + 1
cols=메시지 문자 수 + 3 (단, 최소는 다음과 같아야 합니다)15)

자동계산cols버전:

set my_message=Hello world&& (echo %my_message%>EMPTY_FILE123 && FOR %? IN (EMPTY_FILE123 ) DO SET strlength=%~z? && del EMPTY_FILE123 ) && start cmd /c "@echo off && mode con lines=2 cols=%strlength% && echo %my_message% && pause>nul"

VM 내에서 팝업만 표시하면 되므로 기술적으로 다음과 같은 코드가 있어야 합니다.

if %machine_type% == virtual_machine then
   echo message box code
else
   continue normal installation code

언급URL : https://stackoverflow.com/questions/774175/show-a-popup-message-box-from-a-windows-batch-file

반응형