Archived Forum Post

Index of archived forum posts

Question:

ChilKatZip: Passing environment variable %CD% to AutoRunParams isn't resolve it correctly in runtime

May 08 '13 at 08:53

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


Answer

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.


Answer

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


Answer

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).


Answer

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


Answer

Hello,

Just wondering if there are any updates?

Thanks


Answer

Any updates?


Answer

Hello.

I'm still wondering if there are any updates.

Thanks