|
#1
|
|||
|
|||
|
Hi.
I can't make my patch work because VisualPatch.CheckFolderVersion fails on me. The patch contains two versions (1.0 & 1.1) is was built by using a wizard. I checked and rechecked the following: - version 1.0 and its key file already installed on machine - the registry key / value specified in patch to located installed version actually exist on target machine and point correctly to installed version executable (key file) - compared MD5 values of key file for 1.0 in patch to MD5 of already installed version of executable to make sure they are the same I still can't make it work because VisualPatch.CheckFolderVersion returns nil! I even tried to supply hard coded application path to the function, to no avail. The application is installed in C:\Program Files\MyCompany\MyProduct I'm using the latest version of Visual Patch 3.0 Please help! |
|
#2
|
||||
|
||||
|
Can you post your script so we can see exactly what it does?
Does the patch succeed if you copy it into the application folder and run it from there?
__________________
--[[ Indigo Rose Software Developer ]] |
|
#3
|
|||
|
|||
|
Below is the code for locating the application using registry/current folder.
The code correctly retrieves accurate path from registry and current folder; however, VisualPatch.CheckFolderVersion() fails in both places. I copied the patch in the AppFolder and manually ran it. Here is the script excerpt from OnStartup: -------------------------------------------------------------- -- Locate installed version -------------------------------------------------------------- -- Define a global variable that will indicate the name -- of the installed version on the user's system. A nil value -- indicates that an installed version has not been found. g_InstalledVersion = nil; -- Location method: Current folder -- Check whether the software is installed in the folder -- that the patch was run from. if not g_InstalledVersion then g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", _SourceFolder); if g_InstalledVersion then SessionVar.Set("%AppFolder%", _SourceFolder); end end -- Location method: Registry key -- Read a folder path from the Registry. if not g_InstalledVersion then local MainKey = HKEY_LOCAL_MACHINE; local SubKey = SessionVar.Expand("Software\\MyCompany\\MyApp"); local ValueName = "Program Directory"; local FolderPath = Registry.GetValue(MainKey, SubKey, ValueName); g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", FolderPath); if g_InstalledVersion then SessionVar.Set("%AppFolder%", FolderPath); end end -------------------------------------------------------------- -- Ensure that installed software is not running -------------------------------------------------------------- -- If we located an out-of-date version, make sure the installed -- software is not running. if g_InstalledVersion then local Filename = SessionVar.Expand("MyApp.exe"); local ProgramName = SessionVar.Expand("MyApp"); -- (g_EnsureProgramIsClosed is defined in _Global_Functions.lua) local ProgramIsClosed = g_EnsureProgramIsClosed(Filename, ProgramName); if not ProgramIsClosed then Application.Exit(EXIT_REASON_PROGRAM_IS_OPEN); end end |
|
#4
|
||||
|
||||
|
What are the source and destination paths set to in the design environment for your key files in version 1.0 and 1.1?
__________________
--[[ Indigo Rose Software Developer ]] |
|
#5
|
|||
|
|||
|
Lorne,
your question pointed me to the right direction which allowed me to fix the problem. When I specified the 1.1 version using a Wizard, it mirrored my source location and inserted a destination location as %AppFolder%\subfolder\MyApp.exe This forced the patch to look for MyApp.exe in the subfolder instead of %AppFolder% I changed the destination path of MyApp.exe to %AppFolder% and everything worked fine! Thanks! |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| register dll fails on win98 | mackscynox | Setup Factory 6.0 | 1 | 04-11-2006 02:57 PM |
| Update fails after downloading the TS3 file. | DaveCR | TrueUpdate 2.0 | 1 | 11-07-2005 08:42 AM |
| User was able to detect that there's an update, but fails to download from the HTTP | Elleah | TrueUpdate 2.0 | 8 | 06-15-2005 01:15 PM |
| Why TU2 fails to connect, when server can be accessed via IE? | Elleah | TrueUpdate 2.0 | 10 | 06-15-2005 08:31 AM |
| Bug? - Language file fails to load with Windows 98 | rball | AutoPlay Media Studio 4.0 | 1 | 05-13-2003 05:58 AM |
All times are GMT -6. The time now is 08:26 PM.








Linear Mode

