Indigo Rose Software
  #1  
Old 08-25-2008
AHRIMANSEFID's Avatar
AHRIMANSEFID AHRIMANSEFID is offline
Forum Member
 
Join Date: Oct 2005
Posts: 8
Cool Installation Path

Hi
I want to set an installation path for my exe file. But I need to do this:
Before running installation I want the installer to check an adress in the registery which has installed before, so the installation shuold executed in the path that registery path specified.
Can anyone help me? Thanks.
Reply With Quote
  #2  
Old 08-25-2008
Ulrich's Avatar
Ulrich Ulrich is offline
Indigo Rose Staff Member
 
Join Date: Apr 2005
Location: Sao Paulo, Brazil
Posts: 823
This is easy. Before you show any further screens, fetch the current location of your product (if the key exists in the registry), and set the %AppFolder% session variable accordingly.

In this example, I will install something in the same folder where SUF 8.0 is installed. This code is located in the On Next handler of the Welcome to Setup screen.

Code:
if (Registry.DoesKeyExist(HKEY_CLASSES_ROOT, "Applications\\SUF80Design.exe")) then
    -- fetch the current installation location at the proper place
    program = Registry.GetValue(HKEY_CLASSES_ROOT, "Applications\\SUF80Design.exe\\shell\\open\\command", "", true)
    -- other operations
    path = String.Mid(program, 2, String.ReverseFind(program, "\\", false) - 1);
    -- set the destination folder
    SessionVar.Set("%AppFolder%", path);
end
-- advance to the next screen (with AppFolder properly set)
Screen.Next();
Ulrich
Reply With Quote
  #3  
Old 08-26-2008
AHRIMANSEFID's Avatar
AHRIMANSEFID AHRIMANSEFID is offline
Forum Member
 
Join Date: Oct 2005
Posts: 8
Registery

Excuse me, I think you miss underestood me.
I want to search for this registery address: e.g.:
[HKEY_CURRENT_USER\Software\MySoft\FSX]
"FSXPath"="E:\\Program Files\\MySoft\\Valid ADDress\\"
If the address was correct, the installation path must be in this address, Im doing this because the user may have changed the path of the primary program, and I want the additional program installed correctlly without needing the user to specify the path.
Thanks.
Reply With Quote
  #4  
Old 08-26-2008
Ulrich's Avatar
Ulrich Ulrich is offline
Indigo Rose Staff Member
 
Join Date: Apr 2005
Location: Sao Paulo, Brazil
Posts: 823
My former post indeed answers your question. Try to understand what I wrote and the simple example, but this is no copy-and-paste solution. Realize that, after you have the installation folder correctly set in %AppFolder%, you probably want to supress the Select Install Folder screen to prevent further modification.

Ulrich
Reply With Quote
  #5  
Old 08-27-2008
AHRIMANSEFID's Avatar
AHRIMANSEFID AHRIMANSEFID is offline
Forum Member
 
Join Date: Oct 2005
Posts: 8
Cool hi

Thank you
But me Need Serach And Find (.exe) Me Need Serch Reg And Find Address.
Thank You.
Reply With Quote
Reply

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
sqlite.open from installation path Canter AutoPlay Media Studio 7.5 Discussion 1 01-28-2008 07:32 PM
Example to read the installation path from the registry cinek Setup Factory 7.0 Discussion 3 12-28-2006 02:42 PM
how do you search for a program's installation path in the registry, check if it exists, run it...if navajax AutoPlay Media Studio 4.0 7 06-17-2003 04:55 AM
HOWTO: Add DirectX 8.1 Support to your Setup Factory 6.0 Installation Support Setup Factory 6.0 Knowledge Base 0 10-30-2002 02:55 PM
PATH environment variable RDodson Setup Factory 6.0 4 02-27-2002 01:17 PM


All times are GMT -6. The time now is 09:09 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