1

Closed

Using 7zSharp which spawns processes

description

If 7z is not on the target machine under program files, your first post suggests to set shellEngine.Seven7Location = @"\7-zip\7za.exe"; to point to the deviating location of the exe, but the GetShellProcess() Method in ShellEngine.cs ignores this and it doesn't use the assigned private field m_7zLocation so setting the location of the 7z.exe isn't working as expected.

Just change ShellEngine.cs line 50 from
process.FileName = @"C:\Program Files\7-Zip\7z.exe";
to
process.FileName = m_7zLocation;
and everything works fine with the exe in another location.

Tested on XP Pro 32 Bit and Vista Business 32 Bit

Another thing to consider might be using Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) instead of "C:\Program Files\" as default, because names vary depending on language of operating system. My German XP uses "C:\Programme\" as default while Vista is more english and sticks to "program files" in all languages, however.
 
btw: why is it called Seven7Location and not SevenZLocation? - ok, I'm getting nosy, nevermind, drank to muche coke ;)
Closed Jan 30, 2008 at 12:13 PM by schizoidboy
  • Fixed setting process location
  • Fixed Seven7Location name
  • Fixed default Program Files path to query Environment

comments