|
#1
|
||||
|
||||
|
IR guys, wondering what the most common issue you find users have if they are having difficulties building patches.
I have built successful patches for projects that I have only 2 versions of (i.e., 1.0.0.0 and 1.0.0.1), but it seems when I attempt to build a patch and include three versions, the patch either a) cant locate the software, or b) tells me that I have the latest version installed when I only have 1.0.0.0. I am looking at a registry key, specifically, and even when it indicates 1.0.0.0 it tells me that the 1.0.0.2 is installed. When this happens, I am launching the patch file from the same directory that the AutoPlay files to be updated are installed in... Being fairly new at VP, I'm sure that I am missing something. I know that the selected key files can have a huge impact. I have selected key files that are unique to each version. Autoplay.cdd seems to be a good one. The MD5 and CRC values confirm this. Also, when building a full history patch, how does this work between three versions? For instance, if the user has 1.0.0.1 installed, do they receive all the files needed to get to 1.0.0.2 from 1.0.0.0? I'm thinking this is the case... However, going from 1.0.0.0 to 1.0.0.1 is about 29mb, from 1.0.0.1 to 1.0.0.2 is about 2.4mb, so I'm thinking that incremental patches may be the way to go based on the installed version... AND... ( ).... is there a best practice to use in TU2 to have the proper incremental patch applied?Also, an "faq" section for VP2 may be a good idea to include on the support site... currently only version 1 is there. |
|
#2
|
||||
|
||||
|
This was the FAQ for 2.0 here:
http://visualpatch.com/site/visual-p...ite-papers.php We figured anyone with more specific questions would ask here. But anyhow what sort of stuff would you like to see added? |
|
#3
|
||||
|
||||
|
Kinda like the one here:
knowledgebase Not the pre-sales stuff, but an in-depth faq section based on inquires of customers through direct support requests, etc. Anyway, any thoughts on the ??s ? So far VP2 is looking great, and I'm sure I have overlooked something...
|
|
#4
|
||||
|
||||
|
OK, I think that will happen at some point, as things move along more stuff will be added to the support site. The dev guys will be back in on Monday, I'm sure they'll have some answers.
|
|
#5
|
||||
|
||||
|
Quote:
![]() Quote:
Move the patch file out of that directory, and it will see the version in the Registry. If you want, you can disable the local folder check, or make it so the Registry check happens first, by simply rearranging the On Startup script a little bit. Quote:
Quote:
You can save a lot of bandwidth by taking advantage of TU2 -- it essentially nullifies one of the main disadvantages of the incremental patch strategy, which is that it can be more complicated for the user. But with TU2 making the decisions automatically, a user never has to figure out which file they need to download for the version they have.
__________________
--[[ Indigo Rose Software Developer ]] |
|
#6
|
||||
|
||||
|
The odd thing is, is that I was able to successfully build a patch going from 1.0.0.0 to 1.0.0.1 and 1.0.0.1 to 1.0.0.2, but not the full history patch.
Testing the full history patch indicates that the software cannot be found, even though I have not changed the script from my initial builds. The registry key is still in place, but it is not seeing it. I have moved the patch file in and out of the folder, no difference. I have changed the detection order. No difference. I meant I must be missing something, because it did work before, and now it does not. Code:
--------------------------------------------------------------
-- Check for administrative privileges
--------------------------------------------------------------
-- Make sure that the user has administrative privileges on the system.
-- (g_IsUserAdmin is defined in _Global_Functions.lua)
if not g_IsUserAdmin() then
if not _SilentPatch then
local Title = SessionVar.Expand("%WindowTitle%");
local Message = SessionVar.Expand(VisualPatch.GetLocalizedString("MSG_SYSREQ_ADMIN"));
local DlgResult = Dialog.Message(Title, Message, MB_OKCANCEL, MB_ICONEXCLAMATION);
if DlgResult == IDCANCEL then
Application.Exit(EXIT_REASON_USER_NOT_ADMIN);
end
else
-- Since it is a silent patch, fail
Application.Exit(EXIT_REASON_USER_NOT_ADMIN);
end
end
--------------------------------------------------------------
-- 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.
-- Remove the following block comment to enable this script
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\\MYPRODUCT");
local ValueName = "Data";
local FolderPath = Registry.GetValue(MainKey, SubKey, ValueName);
g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", FolderPath);
if g_InstalledVersion then
SessionVar.Set("%AppFolder%", FolderPath);
end
end
-- Location method: File search
-- Search the user's system for a file that is known to
-- exist in the software's application folder.
if not g_InstalledVersion then
local TargetFileName = "autorun.exe";
local tbFolders = {};
tbFolders[1] = SessionVar.Expand("%ProgramFilesFolder%\\My Product");
tbFolders[2] = SessionVar.Expand("%ProgramFilesFolder%\\My Product Inc.");
tbFolders[3] = SessionVar.Expand("%ProgramFilesFolder%");
-- Insert other folders here...
local CheckFixedDrives = true;
local CheckNetworkDrives = false;
-- (g_FindApplicationOnSystem is defined in _Global_Functions.lua)
g_InstalledVersion = g_FindApplicationOnSystem("%AppFolder%", TargetFileName, tbFolders, CheckFixedDrives, CheckNetworkDrives);
end
--------------------------------------------------------------
-- Ensure that installed software is not running
--------------------------------------------------------------
-- If we located an out-of-date version, make sure the installed
-- software is not running.
-- Remove the following block comment to enable this script
if g_InstalledVersion then
local Filename = SessionVar.Expand("autorun.cdd");
local ProgramName = SessionVar.Expand("My Product");
-- (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
--------------------------------------------------------------
-- Set session variables
--------------------------------------------------------------
-- Set session variables that will be used in the log file
-- and in the user interface.
if g_InstalledVersion then
SessionVar.Set("%InstalledVersion%", g_InstalledVersion);
SessionVar.Set("%TargetVersion%", VisualPatch.GetTargetVersion());
end
--------------------------------------------------------------
-- Log result
--------------------------------------------------------------
-- Make a log file entry with the result.
if g_InstalledVersion then
local LogMsg = SessionVar.Expand("Success\tLocated installed version %InstalledVersion%: %AppFolder%\r\n");
VisualPatch.WriteToLogFile(LogMsg);
else
local LogMsg = SessionVar.Expand("Error\tCould not locate software on system\r\n");
VisualPatch.WriteToLogFile(LogMsg);
end
--------------------------------------------------------------
-- Select start screen
--------------------------------------------------------------
-- Decide which "Before Patching" screen to show.
if g_InstalledVersion then
if g_InstalledVersion == VisualPatch.GetTargetVersion() then
-- The target version was found
Screen.SetStartScreen("Software is Current");
else
-- An out-of-date version was found
Screen.SetStartScreen("Ready to Patch");
end
else
-- No version was found
Screen.SetStartScreen("Cannot Locate Software");
end
|
|
#7
|
||||
|
||||
|
What does the log indicate?
Which version of the files do you actually have installed?
__________________
--[[ Indigo Rose Software Developer ]] |
|
#8
|
||||
|
||||
|
When I am attmpting to apply the history patch to bring the installed version up to 1.0.0.2, I have 1.0.0.0 installed.
Here is the pertinent log info: Code:
[09/19/2005 20:30:07] Success Patch started: C:\Documents and Settings\User1\Desktop\test\fullhistorypatch.exe [09/19/2005 20:30:07] Notice Patch engine version: 2.0.1.0 [09/19/2005 20:30:07] Notice Product: MY PRODUCT [09/19/2005 20:30:07] Success Language set: Primary = 9, Secondary = 1 [09/19/2005 20:30:07] Success Include script: _Global_Functions.lua [09/19/2005 20:30:07] Notice Start project event: Global Functions [09/19/2005 20:30:07] Success Run project event: Global Functions [09/19/2005 20:30:07] Notice Start project event: On Startup [09/19/2005 20:30:07] Error Script: On Startup, Line 49 (1605) [09/19/2005 20:30:07] Error Script: On Startup, Line 86 (1002) [09/19/2005 20:31:17] Error Could not locate software on system [09/19/2005 20:31:17] Success Run project event: On Startup [09/19/2005 20:31:17] Success Display screen: Cannot Locate Software [09/19/2005 20:31:18] Success Delete image file: C:\DOCUME~1\User1\LOCALS~1\Temp\_ir_vp2_temp_0\IRIMG1.JPG [09/19/2005 20:31:18] Success Delete image file: C:\DOCUME~1\User1\LOCALS~1\Temp\_ir_vp2_temp_0\IRIMG2.JPG [09/19/2005 20:31:18] Notice Exit patch process (Return code: 1210) Code:
local FolderPath = Registry.GetValue(MainKey, SubKey, ValueName); Code:
-- (g_EnsureProgramIsClosed is defined in _Global_Functions.lua) |
|
#9
|
|||
|
|||
|
I have only created one single VP20 project so I’m a real newbie to VP. The interesting point with this thread is the three versions issue and the Registry read method; exactly like MY project. I haven’t noticed any problem at all, but “the wizard did the entire job” (almost) so I don’t remember much of the challenges!
AXXESS, your script generates the error codes 1605 "Could not get the specified value's data." 1002 "The specified path was not found." What values do you have in SubKey and ValueName? Could it be that simple that you have forgotten the double backslashes in SubKey? I would suggest to add VisualPatch.WriteToLogFile() to test the values (please forgive me; I’m new to VP20…) |
|
#10
|
||||
|
||||
|
That's a good guess. Adding some temporary actions to output those values before line 49 would be a good idea.
__________________
--[[ Indigo Rose Software Developer ]] |
|
#11
|
||||
|
||||
|
OK, just testing this out, I ran the 1.0.0.1 incremental patch, works fine. So I am attempting to apply the full history patch to go from 1.0.0.1 to 1.0.0.2.
Added the VisualPatch.WriteToLogFile() actions here: Code:
-- 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\\MYPRODUCT\\");
local ValueName = "Data";
local FolderPath = Registry.GetValue(MainKey, SubKey, ValueName);
VisualPatch.WriteToLogFile("Stated Variables are: "..FolderPath.."t\r\n", true);
patch = VisualPatch.GetTargetVersion();
VisualPatch.WriteToLogFile("Patching to: "..patch.."t\r\n", true);
g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", FolderPath);
if g_InstalledVersion then
SessionVar.Set("%AppFolder%", FolderPath);
end
end
Code:
[09/20/2005 09:52:21] Success Patch started: C:\Documents and Settings\User1\Desktop\test\fullhistorypatch.exe [09/20/2005 09:52:21] Notice Patch engine version: 2.0.1.0 [09/20/2005 09:52:21] Notice Product: MY PRODUCT [09/20/2005 09:52:21] Success Language set: Primary = 9, Secondary = 1 [09/20/2005 09:52:21] Success Include script: _Global_Functions.lua [09/20/2005 09:52:21] Notice Start project event: Global Functions [09/20/2005 09:52:21] Success Run project event: Global Functions [09/20/2005 09:52:21] Notice Start project event: On Startup [09/20/2005 09:52:21] Stated Variables are: 1.0.0.1t [09/20/2005 09:52:21] Patching to: 1.0.0.2t [09/20/2005 09:52:21] Error Script: On Startup, Line 86 (1002) [09/20/2005 09:52:26] Error Could not locate software on system [09/20/2005 09:52:26] Success Run project event: On Startup [09/20/2005 09:52:26] Success Display screen: Cannot Locate Software [09/20/2005 09:53:13] Success Delete image file: C:\DOCUME~1\User1\LOCALS~1\Temp\_ir_vp2_temp_0\IRIMG1.JPG [09/20/2005 09:53:13] Success Delete image file: C:\DOCUME~1\User1\LOCALS~1\Temp\_ir_vp2_temp_0\IRIMG2.JPG [09/20/2005 09:53:13] Notice Exit patch process (Return code: 1210) |
|
#12
|
||||
|
||||
|
Quote:
![]() Are you sure there isn't a mistake in your Registry actions? It looks like you're overwriting the install folder value in the Registry with the current version. Note that the default script in Visual Patch wants to read your software's location from the Registry. It will use the key files and MD5s and such to determine the version. (This is actually taken care of by the VisualPatch.CheckFolderVersion action.) You can script a different version checking behavior if you want, e.g. just read the installed version directly from the Registry...although that won't be as foolproof as checking the key files etc.
__________________
--[[ Indigo Rose Software Developer ]] |
|
#13
|
||||
|
||||
|
Quote:
Code:
local MainKey = HKEY_LOCAL_MACHINE;
local SubKey = SessionVar.Expand("SOFTWARE\\MYPRODUCT\\");
local ValueName = "Data";
local FolderPath = Registry.GetValue(MainKey, SubKey, ValueName);
|
|
#14
|
||||
|
||||
|
Quote:
__________________
--[[ Indigo Rose Software Developer ]] |
|
#15
|
||||
|
||||
|
So I should have had Setup Factory specifically write the %AppFolder% to the registry?
If that is the case, then I am wondering why the incremental patches do work... Currently I have SUF writing the version to HKEY_LOCAL_MACHINE\\MYPRODUCT\\DATA .... |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Verify Flash Player installed and correct version | Geoffh | AutoPlay Media Studio 4.0 | 1 | 07-10-2003 06:52 AM |
| IE version detection | blazm | AutoPlay Media Studio 4.0 | 2 | 05-12-2003 11:53 AM |
| HOWTO: Detect Acrobat Version | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-22-2002 05:01 PM |
| INFO: Moving from the Trial Version to Commercial Version | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-07-2002 09:52 AM |
| Quicktime version detection | Mark MacKenzie | Setup Factory 6.0 | 4 | 01-19-2001 10:26 AM |
All times are GMT -6. The time now is 10:21 PM.






).... is there a best practice to use in TU2 to have the proper incremental patch applied?
Linear Mode

