Re: How to AUTOMATICALLY prepend/pass a "/U" switch to cmd.exe when executing a *.bat batch file ?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Thommy Kanther" <tho235@xxxxxxxxx> wrote in message
news:45fd03d5$0$20300$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
When a batch file should create Unicode output then a /U switch must be
used for
the processing cmd.exe. So I could execute a batch with

cmd.exe /U mybatchfile.bat

That works for the. moment.

However when I doubleclick a .bat file I have no possibility to pass the
/U flag.

How do I specify that every time I execute a .bat by doubleclicking the /U
should be
automatically taken? I don't want to create a second shortcut.

As a workaround I could accept that the /U flag is not only used for a
particular batch file
e.g. mybatchfile.bat but for ALL my batch files.

When I right click on the properties of C:\WINDOWS\system32\cmd.exe I
found no entry field
for entering this parameter. Can I specify it in the Registry ?

Thommy


Instead of getting your shortcut to invoke the batch file, get it to
invoke this command line:

%windir%\system32\cmd.exe /u /c c:\temp\test.bat


.



Relevant Pages

  • Re: Cant schedule a batch file to run in the XP Pro Scheduler
    ... Also look in Explorer and right-click the BAT file itself and check that all ... > a shortcut on the desktop or from the command window directly. ... > does NOT run fine is when I try to call the backup.bat batch file ... Why doesn't the XP task scheduler handle batch files? ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: question about BAT file creation
    ... I'm trying to create a BAT file which will change to each Temp folder ... drives are not directories. ... Assuming the batch file also does the deletions, ...
    (microsoft.public.windowsxp.general)
  • Launch a Batch Task from Outlook 2003 - Custom Actions ?
    ... I a trying to invoke a Batch task via a .BAT file based upon the ... I have tried using the MS CRARun.dll, written the Outlook Rule, changed ...
    (microsoft.public.outlook.program_vba)
  • Re: Word cannot be used as email editor(2003)
    ... On the question of creating a batch file: ... it is a simple matter to turn Outlook ... (e.g. Thnaks is not an English word.) ... How do i create a .bat file? ...
    (microsoft.public.word.application.errors)
  • Re: Task Scheduler job Hangs (rundll32 printui.dll,PrintUIEntry)
    ... I modified my batch file to include your recommendation. ... The bat file ... related to a batch job hanging when initiated via Task Scheduler. ... I take the same batch job and initiate it with the ...
    (microsoft.public.windows.server.general)