wayneh
06-25-2008, 11:41 AM
I'm trying to setup VP so that my clients can manually locate the folder where my app is installed.
Unfortunately, VP rarely finds the exe file, even though it exists in the folder.
So now, my clients can never use my patches, even though it works fine on my system.
This is quite aggravating as I am putting a lot of effort into this, and Indigo Rose is basically ignoring my requests for Support - too busy working on other products.
Here's my code on a Select Folder screen.
After the user browses for the folder where my app is installed, this code runs:
local SelectedFolder = SessionVar.Expand("%SelectedFolder%");
if Filename then
Debug.Print("Filename"..Filename.."\n");
end
if SelectedFolder then
Debug.Print("SelectedFolder"..SelectedFolder.."\n");
end
if AppFolder then
Debug.Print("AppFolder"..AppFolder.."\n");
end
g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", SelectedFolder);
if g_InstalledVersion then
Debug.Print("Installed version"..g_InstalledVersion.."\n");
end
--Debug.Print(VisualPatch.GetTargetVersion());
Debug.ShowWindow(true);
if g_InstalledVersion then
SessionVar.Set("%AppFolder%", SelectedFolder);
local ProgramIsClosed = g_EnsureProgramIsClosed(Filename, ProgramName);
if not ProgramIsClosed then
Application.Exit(EXIT_REASON_PROGRAM_IS_OPEN);
end
SessionVar.Set("%InstalledVersion%", g_InstalledVersion);
SessionVar.Set("%TargetVersion%", VisualPatch.GetTargetVersion());
local LogMsg = SessionVar.Expand("Success\tLocated installed version %InstalledVersion%: %AppFolder%\r\n");
VisualPatch.WriteToLogFile(LogMsg);
if g_InstalledVersion == VisualPatch.GetTargetVersion() then
-- The target version was found
Screen.Jump("Software is Current");
else
-- An out-of-date version was found
Screen.Jump("Ready to Patch");
end
else
local mymsg="The folder does not contain a valid version of "..ProgramName..". \n Please try again."
--local mymsg="The folder does not contain a valid version of "..SessionVar.Expand("%ProductName%")..". \n Please try again."
result = Dialog.Message("Notice", mymsg, MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end
Any help is appreciated....
Unfortunately, VP rarely finds the exe file, even though it exists in the folder.
So now, my clients can never use my patches, even though it works fine on my system.
This is quite aggravating as I am putting a lot of effort into this, and Indigo Rose is basically ignoring my requests for Support - too busy working on other products.
Here's my code on a Select Folder screen.
After the user browses for the folder where my app is installed, this code runs:
local SelectedFolder = SessionVar.Expand("%SelectedFolder%");
if Filename then
Debug.Print("Filename"..Filename.."\n");
end
if SelectedFolder then
Debug.Print("SelectedFolder"..SelectedFolder.."\n");
end
if AppFolder then
Debug.Print("AppFolder"..AppFolder.."\n");
end
g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", SelectedFolder);
if g_InstalledVersion then
Debug.Print("Installed version"..g_InstalledVersion.."\n");
end
--Debug.Print(VisualPatch.GetTargetVersion());
Debug.ShowWindow(true);
if g_InstalledVersion then
SessionVar.Set("%AppFolder%", SelectedFolder);
local ProgramIsClosed = g_EnsureProgramIsClosed(Filename, ProgramName);
if not ProgramIsClosed then
Application.Exit(EXIT_REASON_PROGRAM_IS_OPEN);
end
SessionVar.Set("%InstalledVersion%", g_InstalledVersion);
SessionVar.Set("%TargetVersion%", VisualPatch.GetTargetVersion());
local LogMsg = SessionVar.Expand("Success\tLocated installed version %InstalledVersion%: %AppFolder%\r\n");
VisualPatch.WriteToLogFile(LogMsg);
if g_InstalledVersion == VisualPatch.GetTargetVersion() then
-- The target version was found
Screen.Jump("Software is Current");
else
-- An out-of-date version was found
Screen.Jump("Ready to Patch");
end
else
local mymsg="The folder does not contain a valid version of "..ProgramName..". \n Please try again."
--local mymsg="The folder does not contain a valid version of "..SessionVar.Expand("%ProductName%")..". \n Please try again."
result = Dialog.Message("Notice", mymsg, MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end
Any help is appreciated....