"Non proprio quello che stavo cercando, mi chiedevo se esisteva un modo per modificare effettivamente il testo di output del comando Pause, non solo una soluzione alternativa." - Hashim
Sì, è possibile! Ma devi essere consapevole che PAUSE è un comando interno del programma CMD.EXE, quindi, per modificare il messaggio che mostra PAUSE, devi modificare il file CMD.EXE. Per fare ciò, è necessario utilizzare un editor che può modificare i file binari. Ho usato XVI32 programma tramite questi passaggi:
1- Copy CMD.EXE file to a new folder created for this purpose: COPY %COMSPEC%
2- Edit the copy of CMD.EXE with XVI32.EXE program:
2.1- Locate the message you want. Messages are stored in 16-bits elements with the high byte equal zero. To locate a message:
2.1.1- In Search> Find> Text string> enter the message you want.
2.1.2- Convert Text -> Hex
2.1.3- Insert a zero after each letter-value
2.1.4- Press Ok
2.2- Modify the message for the new one. Modify existent letters only and keep zeros in place. Note that you can NOT extend any message.
2.3- End the edition and save the modified file.
Ora è possibile eseguire CMD.EXE per ottenere il messaggio PAUSA modificato. Ho fatto un test di questa procedura:
C:\DOCUME~1\Antonio\MYDOCU~1\My Webs\XVI32 Hex File Editor
>pause
Press any key to continue . . .
C:\DOCUME~1\Antonio\MYDOCU~1\My Webs\XVI32 Hex File Editor
>cmd
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\DOCUME~1\Antonio\MYDOCU~1\My Webs\XVI32 Hex File Editor
>pause
Oprime una tecla para seguir. .
Note per tutti che leggere questa risposta:
NOTA 1: Per favore, non inviare quel commento dicendo che la modifica di file CMD.EXE non deve mai essere fatto! Penso lo stesso. Ho appena postato questa risposta in modo che l'OP si rendesse conto di ciò che realmente chiedeva ...
NOTA 2: La revisione del file CMD.EXE con un editor di testo, come Blocco note, è molto interessante. Potresti visualizzare tutti i comandi interni, i dettagli interessanti (come = ExitCode e = ExitCodeAscii), tutti i messaggi di errore, ecc.Ad esempio, questi sono i comandi interni:
C O L O R T I T L E C H D I R C L S C M D E X T V E R S I O N
D E F I N E D C O P Y P A T H P R O M P T P U S H D P O P D
A S S O C F T Y P E D A T E D E L D I R E C H O E N D L O C A L
E R A S E E R R O R L E V E L E X I T E X I S T B R E A K F O R
G O T O I F K E Y S M K D I R M D N O T P A U S E R D
R E M M O V E R E N A M E R E N R M D I R S E T S E T L O C A L
S H I F T S T A R T T I M E T Y P E V E R I F Y V E R V O L = , ; +/[ ] " : . \
P A T H E X T P A T H P R O M P T
F O R/? I F/? R E M/?
% s % s
% s
/A /P : E O F
f d p n x s a t z D O
/L /D /F /R I N E L S E (% s) % s % s % s % s
% c % c % s % s & () [ ] { }^= ; ! % ' + , ` ~
Non proprio quello che stavo cercando, mi chiedevo se c'era un modo per modificare effettivamente il testo di output del comando Pause, non solo una soluzione alternativa. – Hashim
No, AFAIK non c'è modo di cambiare quel testo. –
KK, esattamente quello che ho paura di sentire. Grazie comunque del tuo aiuto, amico. :) – Hashim