login about faq

Hello,

There is .NET/C# application.

I'm creating self extracting ChilkatZip. Trying to pass environment variable %CD% (current directory) to AutoRunParams property of ChilkatZip, which should be passed to autorun executable after extraction.

As ChilkatZip documentation says: "Environment variables are expanded (i.e. resolved) when the self-extracting EXE runs".

But when running the resulting self extracting ChilKatZip I have STRING value in the AutoRunParams = "%CD%", but not the current directory. The environment variable isn't resolved but putted as is.

BTW, environment variable (%TEMP%) for ChilkatZit.ExeUnzipDir property works fine.

If I'm launching self extracting ChilKatZip from cmd.exe with command line argument "-ap %CD%" - environment variable is resolved fine.

Could anyone help me with this issue? It's very important for me to find solution in nearest time.

Thanks

asked Feb 01 '13 at 05:53

budedub's gravatar image

budedub
1113

edited Feb 01 '13 at 06:00


I verified that there is a problem with it. Unfortunately, the fastest I can get a fix would be this weekend or possibly Monday. Please let me know what version of the .NET Framework you are using, and whether you need 32-bit, 64-bit, or both.

link

answered Feb 01 '13 at 17:18

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Thank you for fast reply.

We use .NET Framework 3.5. It would be great to have both 32 and 64 bit versions.

Will wait for your response. Thank you again.

(Feb 02 '13 at 03:07) budedub

Please try these new builds:

.NET 2.0/3.5 Framework, 32-bit: http://www.chilkatsoft.com/preRelease/ChilkatDotNet2.zip

.NET 2.0/3.5 Framework, 64-bit: http://www.chilkatsoft.com/preRelease/ChilkatDotNet2_x64.zip

link

answered Feb 04 '13 at 19:21

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Hello, I've just tested the 64-bit one and unfortunately it doesn't work. Still have %CD% instead of resolved current directory. Adding -ap %CD% in command line works fine as before.

(Feb 05 '13 at 04:07) budedub

Maybe this is because the environment variable CD is not really an environment variable? The "variables" %CD% (and for example the variable %RANDOM% as well) are implemented by CMD.EXE. Not by ShellExecute or CreateProcess.

Open a command prompt, type ECHO %CD% and it will show the directory as expected.

However, enter SET and you won't see CD in the list (nor will you see RANDOM).

link

answered Feb 05 '13 at 07:44

Gert's gravatar image

Gert ♦
629141824

See "Dynamic Variables" on http://ss64.com/nt/syntax-variables.html

link

answered Feb 05 '13 at 07:48

Gert's gravatar image

Gert ♦
629141824

If we look at the situation from this point of view:

%TEMP% is definitely Environment variable, it is resolved with ChilkatZip.ExeUnzipDir fine. But with ChilkatZip.AutoRunParams it still works incorrectly - isn't resolved.

(Feb 05 '13 at 09:08) budedub

Hello,

Just wondering if there are any updates?

Thanks

link

answered Feb 07 '13 at 02:24

budedub's gravatar image

budedub
1113

Any updates?

link

answered Feb 25 '13 at 06:50

budedub's gravatar image

budedub
1113

Hello.

I'm still wondering if there are any updates.

Thanks

link

answered May 08 '13 at 08:53

budedub's gravatar image

budedub
1113

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×9
×9
×6
×3
×2

Asked: Feb 01 '13 at 05:53

Seen: 2,913 times

Last updated: May 08 '13 at 08:53

powered by OSQA