Indigo Rose Software

Go Back   Indigo Rose Software Forums > Old Versions > Visual Patch 2.0

 
 
Thread Tools Display Modes
  #1  
Old 10-14-2006
AXXESS's Avatar
AXXESS AXXESS is offline
Forum Member
 
Join Date: Nov 2001
Posts: 498
Patches Installing to %AppFolder%\AutoPlay\AutoPlay

I am patching an AMS6 project with three versions 1.0.0.2, 1.0.0.3, and 1.0.0.4. The destination folder indicated for the files is %AppFolder%\AutoPlay\Foldername.

When testing the patch, the patch files are being installed to %AppFolder%\AutoPlay\AutoPlay (the patch file is creating another AutoPlay folder within the first one). Of course, the patch files are not usable in that location or accessible via the menu.

Obviously I am missing something, but if I am specifying the destination as listed above, why is another AutoPlay folder being created by the patch?

Here's the Startup Code in VP:
Quote:
--------------------------------------------------------------
-- 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.
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\\MYPROJECT\\");
local ValueName = "Location";
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: 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: 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.cdd";
local tbFolders = {};
tbFolders[1] = SessionVar.Expand("%ProgramFilesFolder%\\My Project");
tbFolders[2] = 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 Project");
-- (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
I have also checked to make sure that I do not have a second AutoPlay folder embedded within the AMS6 build. Why would the patch file create a second, embedded AutoPlay folder...?

What am I missing?
  #2  
Old 10-14-2006
AXXESS's Avatar
AXXESS AXXESS is offline
Forum Member
 
Join Date: Nov 2001
Posts: 498
OK, I am now believing that this is happening because the autorun.cdd (target) file is within the AutoPlay folder...
  #3  
Old 10-14-2006
AXXESS's Avatar
AXXESS AXXESS is offline
Forum Member
 
Join Date: Nov 2001
Posts: 498
OK, got it! The key file for each version was set to autorun.cdd. I changed the keyfile for each version to autorun.exe (outside the AutoPlay folder), and all is working great. I had also forgotten about the available Patch Log. The Patch Log confirmed it was locating the keyfile under the AutoPlay folder. Note to others with issues... make use of the logfiles.... they are very useful.

I do enjoy these conversations with myself....
  #4  
Old 10-16-2006
Lorne's Avatar
Lorne Lorne is offline
Indigo Rose Staff Member
 
Join Date: Feb 2001
Location: Indigo Rose Software
Posts: 2,588
No problem. Glad you could help!
__________________
--[[ Indigo Rose Software Developer ]]
  #5  
Old 10-22-2006
AXXESS's Avatar
AXXESS AXXESS is offline
Forum Member
 
Join Date: Nov 2001
Posts: 498
I am welcome!

Sometimes.... you just have to figure it out.
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing fonts ByronFS Setup Factory 7.0 Discussion 5 05-08-2006 01:23 PM
Frequently Asked Questions Ted Sullivan Visual Patch 2.0 0 04-08-2005 03:49 PM
RE: Disabling Cancel ButtonWhen Installing Files Onto PC ebanguero Setup Factory 6.0 1 01-03-2003 03:56 PM
INFO: Installing the Microsoft Access Runtime Engine Support Setup Factory 6.0 Knowledge Base 0 10-11-2002 02:01 PM
How do I change the 'Installing Files' screen hank Setup Factory 6.0 3 08-07-2002 03:19 PM


All times are GMT -6. The time now is 03:38 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software