A320cap 0 Posted January 1, 2008 Report Share Posted January 1, 2008 Hi! I am making an installer for "GAP" which will contain all its sceneries so far. Everything goes as planned but when it comes to read the FS9 path from the registry, then the problems occur. I've followed this tutorial which teaches me how to make Installshield read a path from the registry. Works fine. Then I change the settings to: and it doesn't work. What am I doing wrong? What are the correct settings? Thank you in advance Link to post Share on other sites
mutley 4,495 Posted January 1, 2008 Report Share Posted January 1, 2008 Hi Panos, I have just had a look on my flight sim PC and I think the "Registry Value: Optional" field should not be "Path" but should be something like "C:Program FilesMicrosoft GamesFlight Simulator 9" ???? Cheers Link to post Share on other sites
A320cap 0 Posted January 1, 2008 Author Report Share Posted January 1, 2008 Did you read this tutorial? It says "Path" on that box, that's why I entered that. If I write "C:Program FilesMicrosoft GamesFlight Simulator 9", then it would install it in that directory. complicated things........ :wacky: :sad: Link to post Share on other sites
mutley 4,495 Posted January 1, 2008 Report Share Posted January 1, 2008 Yes I did read the tutuorial and in my experience it is telling you the enter the path to where FS9 is as that is where the root directory should be for the program? I have used installers before to install aircraft and scenery :wacky: Have you tried it ? Link to post Share on other sites
A320cap 0 Posted January 1, 2008 Author Report Share Posted January 1, 2008 The problem is that mine is D:... but the customer's might be C:... Let me check it Link to post Share on other sites
mutley 4,495 Posted January 1, 2008 Report Share Posted January 1, 2008 Perhaps one of the JF lads (Rich, Martyn or Simon) could help as I think they use Macrovision Installers? But I haven't seen them on here for a few days. Link to post Share on other sites
mutley 4,495 Posted January 1, 2008 Report Share Posted January 1, 2008 The installer only use this value as a default then as part of the installation of the scenery it will allow you to override the location? Link to post Share on other sites
A320cap 0 Posted January 1, 2008 Author Report Share Posted January 1, 2008 1)Rich has seen my post at JF and has emailed me. He uses a very different method in reading the path. He told me: "Pass it the reg path and the key name and it will return you the path as a string from "EXE Path". Something like this should work: RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE); RegDBGetKeyValueEx ("Software//etc","EXE Path", REGDB_STRING, svValue, nvSize ); TARGETDIR = svValue; To test put this at the end and it should pop up a message box that shows you the path to FS on your PC: MessageBox(svValue,INFORMATION);" I didn't quitly get those. Then: The best place for the script is in the OnFirstUIBefore() section. There is no reason why you can't do a search in the registry but this is the best way (the user doesn't see the search take place doing it this way). Once you have the info from the registry assigned to TARGETDIR, try something like this szDir = TARGETDIR; nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 ); TARGETDIR = szDir; This will then show the user the path that they had stored in the registry so that they can confirm it is correct and then give them the chance to alter it to something else if they wish. I haven't understood in which location I should enter those scripts 2)I think yes 3) What you had told me to do, doesn't work Link to post Share on other sites
mutley 4,495 Posted January 1, 2008 Report Share Posted January 1, 2008 It all sounds Greek to me Panos :wink: :wacky: I have never used the Macrovision installer only freeware models. Glad you got it sorted with Rich :sad: Cheers Link to post Share on other sites
A320cap 0 Posted January 1, 2008 Author Report Share Posted January 1, 2008 lol, it isn't yet sorted out.... :wacky: :sad: I wish it was! I don't know where to put that damn script P.S.> Is my signature's size fine? Link to post Share on other sites
mutley 4,495 Posted January 1, 2008 Report Share Posted January 1, 2008 Panos I will have another look to see if I can think of anything Link to post Share on other sites
A320cap 0 Posted January 1, 2008 Author Report Share Posted January 1, 2008 Thanks for all of your help I am also looking into it Link to post Share on other sites
mutley 4,495 Posted January 1, 2008 Report Share Posted January 1, 2008 Looking at your original screenshot, how about removing "Path" from the optional field at the bottom, it shouldn't be needed? Otherwise I would say you had it right. Link to post Share on other sites
A320cap 0 Posted January 1, 2008 Author Report Share Posted January 1, 2008 doesn't work Link to post Share on other sites
mutley 4,495 Posted January 1, 2008 Report Share Posted January 1, 2008 Can you give me a link to the installer program? They seem to do so many. Link to post Share on other sites
A320cap 0 Posted January 1, 2008 Author Report Share Posted January 1, 2008 You mean Macrovision Installshield 2008? I have the Pro Edition http://www.macrovision.com/products/ins ... n_1192.htm Link to post Share on other sites
mutley 4,495 Posted January 1, 2008 Report Share Posted January 1, 2008 Thanks Panos, I will have a look. EDIT- Well, I will have to download the evaluation version to see what's going on but I cannot do this until the weekend. If you don't get any luck in getting this to work I can try then. (I have to go back to work tomorrow :doh ) Maybe a polite mail back to Rich is in order to see if he can help more? Cheers Link to post Share on other sites
A320cap 0 Posted January 2, 2008 Author Report Share Posted January 2, 2008 Your help is very much appreciated :wacky: :sad: :wink: I've asked him again but haven't received an answer yet. I willtry again but probably at night, 'cos I have a lot of H/W to do.... :sadblinky: Link to post Share on other sites
A320cap 0 Posted January 2, 2008 Author Report Share Posted January 2, 2008 Rich was very kind and made a script for me and it now works. If you want it, I can post it here Link to post Share on other sites
mutley 4,495 Posted January 2, 2008 Report Share Posted January 2, 2008 Thanks Panos, Yes please do post it here as there may well be other budding installer creators out there! Cheers Link to post Share on other sites
A320cap 0 Posted January 2, 2008 Author Report Share Posted January 2, 2008 From Rich: Try this, just copy it all in over the top of the existing OnFirstUIBefore section and it should work fine: function OnFirstUIBefore() number nResult,nvSize,nvType; string szTitle, szMsg,szPath; string szName, szDir,svValue; begin //get reg info// RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE); szPath="SOFTWAREMicrosoftmicrosoft gamesflight simulator9.0"; RegDBGetKeyValueEx (szPath,"EXE Path", nvType, svValue,nvSize); TARGETDIR = svValue; //MessageBox(svValue,SEVERE); Dlg_SdWelcome: szTitle = ""; szMsg = ""; nResult = SdWelcome( szTitle, szMsg ); Dlg_SdAskDestPath: szTitle = ""; szMsg = ""; szDir=svValue; nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 ); TARGETDIR = szDir; if (nResult = BACK) goto Dlg_SdWelcome; return 0; end; ---------------------------------------------------------------------------------- Link to post Share on other sites
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now