Solved

Executing a batch file with Unicode

Posted on 2009-05-04
4
2,255 Views
Last Modified: 2012-05-06
I have the following batch to run Internet Explorer using RUNAS. I want to use Unicode characters to paint a box around some text echoed to the screen. I have tried Unicode, Unicode Big-Endian and UTF-8, but the output is hard to read. How do I set the displayed character set to be Unicode and not forced as ASCII, which looks terrible.


cmd /u /k
@echo off
echo     ****unicode characters here****
echo      DOMAIN\PWLAB password pattern is MmmYYYY (eg. May2009)
echo     ****unicode characters here****
runas /noprofile /env /user:domain\pwlab "C:\Program Files\Internet Explorer\iexplore.exe http://website/topologybuilderweb/MainForm.aspx"
pause

Open in new window

0
Comment
Question by:johndarby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 69

Expert Comment

by:Qlemo
ID: 24297730
Common method is to change the code page to a 1252 in DOS, and store the batch file in ASCII. To switch to the Windows Codepage, use
chcp 1252 >nul


0
 
LVL 1

Author Comment

by:johndarby
ID: 24298196
Thanks Qlemo. However, when I insert the suggested string, the screen output remains the ASCII view of the Unicode characters. Any idea what I am missing?
0
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 24299929
You can't use Unicode characters. All symbols have to be in the same codepage, and that codepage is to be set by chcp.

0
 
LVL 1

Author Closing Comment

by:johndarby
ID: 31577661
Thanks for your help.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question