login about faq

The self-extracting exe from ckzip c++ WriteExe allows command-line arguments but these are ignored on Japanese Windows. Ran a test.exe from a Japanese Windows command prompt code page 932(shift_jis):

test.exe -ap "<autorunparams>"

test.exe -unzipdir "<unzipdirectorypath>"

The test.exe ran as though no arguments were entered. Tried a change to chcp 20127 (US-ascii) but that didn't help. The test.exe arguments work OK on US-EN Windows.

asked Mar 31 '17 at 10:48

JerryQ's gravatar image


Reply from Chilkat support:

The .exe that produced by WriteExe is a Win32 program (written in VC6) that accepts the command line args through WinMain (in lpCmdLine):

int CALLBACK WinMain( In HINSTANCE hInstance, In HINSTANCE hPrevInstance, In LPSTR lpCmdLine, In int nCmdShow );

English chars, even on a Japanese computer, should pass without problems. lpCmdLine is assumed to be a us-ascii string (not Unicode) terminated by a null (LPSTR is just a "const char *"). If the issue has to do with passing non-English chars, then you could encode the params using some encoding such as quoted-printable, url-encoding, base64, etc. (and then decode in your test.exe app after receiving the args).


answered Apr 06 '17 at 10:53

JerryQ's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Mar 31 '17 at 10:48

Seen: 677 times

Last updated: Apr 06 '17 at 10:53

powered by OSQA