Hola, quiero saber el PATH del Winzip, porqué estoy utilizando la siguiente instrucción para actualizar el ejecutable. Ya tengo instalado en mi aplicación un componente zip, pero para actualizar el ejecutable, es necesario hacerlo con una aplicación externa, pues primero se cierra el ejecutable y se activa la instrucción, hay un hilo en este foro "
actualización aplicaciones" donde explico como lo hago.
La instrucción funciona correctamente, siempre que el WINZIP esté instalado en 'C:\Archivos de programa\WinZip\WINZIP32.EXE' pero mejor sería asegurarse donde está realmente instalado.
He visto en Internet un script, que hace esto, no sé si sabré adaptarlo a Delphi6.
Código:
**
* Script: findZip.js
* Purpose: Finds the path of WinZip if present on yoursystem.
* Author: Daren Thiel (converted to js from newsgroup post).
* Date: 16 May 1999
* Web: http://www.winscripter.com
* Note: Rename this script findZip.js
* Copyright 1999 Daren Thiel **/
// Create a shell objectvar
ws = new ActiveXObject( "WScript.Shell" );
// Store the registry key we are looking for in a variable.
// You can also plug this value directly into regRead()
var key = "HKCR\\WinZip\\shell\\open\\command\\";
// Find the value stored for this key.
// If you get an error here you probably don't have
WinZip.var zip = ws.regRead( key );
// The key is store with a '%1' at the end. We should
// strip this off to get the path to winzip.var
zip = zip.substring( 0, zip.indexOf( " " ) );
// Tell them what you found.
WScript.Echo( zip );
Un saludo.
Jose Manuel.