• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

I need some testers to test a installer program (takes 2 mn)

Messages
371
Country
france
Hi,


I need a huge help.

As I prepare the finale version of my project PA 320 with FMC, and this project will be difficult to install for people who have small knowledge of Windows, because the aircraft requires to install the 2 DLL files by copy in the right folders, a special VC sound folder to copy, the creation of the specific folder to store the airports database used by the FMC, the creation of a .ini file in this folder to write the path of the folder where FSX saves its flightplans and requires to add in the DLL.XML file the declaration of the 2 DLL use by the FMC.

So, I want to create an installer program that will do all this work automatically.

But the problem is that I know only coding in XML (but it is impossible to create an installer in XML) and in VB6 (Visual Basic 6) , an old programmation language.

This old language is a 32bit language and I have only the french version and I have only Win XP 32.

So, if I realize an installer, I must use the Windows API to enter in the Windows register to get the FSX paths folders.

Thus, before begin to write this program, I need to know, if It can run under other Windows version and language. (XP other that french version, Vista, Seven 32, Seven 64 )

Thus, I wrote a very very little test program in VB6 which use the 3 Windows API which are essential to create an installer, and I need you to know if this test program run on your computer.

If the program works properly, you will see just a Window that display the 3 essentials paths of your FSX configuration that I need, like this :

390274setup.jpg


I have uploaded this progam test in a ZIP file, with the following link :

Link to download program test : Test Setup.exe

Test procedure , please folow Step by Step:

Unzip the file in a temp folder of your choice (location has no importance) .

This ZIP files contains 3 files :
- Setup1.exe
- Setup2.exe
- Setup3.exe

These little programs are just a small windows and do anything else that read the Windows register. Setup2.exe and Setup3.exe copy 1 and 2 Visual Basic Dll file in the "windows\system" folder in the case of your OS cannot decode my VB6 program.
No risk for your Windows !



I ask to you to test in order (setup1.exe in first, the setup2.exe if setup1.exe doesn' work......, to have the right information about your FSX configuration paths and no error mesage box.
If Setup1.exe works, don't execute Setup2.exe.... if Setup1.exe dosn't works, but Setup2.exe works, don't execute Setup3.exe. if nothing work, do the test again in administrator mode and in the same order

I need the following feedback :

1 - If one of the Setup(x).exe works on your computer
2 - From what version of Setup(x).exe, that's works
3 - Your Windows version ( Vista, Seven 32 or Seven 64)
4 - The country of your Windows version
5 - If you got a error mesage box, which message, and with wihch Setup(x) version
6 - if requires to be in administrator mode

If one of the version works, check if the 3 paths are right.

That will be great if someone who has his FSX on other folder or Drive that the default installation location (C:\Porgam Files\Microsoft Games\....) do the test.

Thanks for the feedback, but without these information, I can't write an installation program. And I don't want lost my time to write an installer which works only under Windows XP

This test takes 2 minutes, so please if you can do it and feedback .

If one of this test program works with all Windows version, I will write an universal Aircraft installer, that will be free for freeware authors.


Many thanks


Francois Dore
 
Last edited:
Just a quick note... wouldn't it be simpler to use somthing like Nullsoft installer or InstallShield or whatnot?
 
Because I know the Visual Basic since VB1 and understand how to write the script files of the existing installer tools will take for me more times to write a exe in VB6.

I looked "readyto" installer, but you cannot find easily with them the FSX differents folders paths (they have only the capability to create the path of the application that you want install., and you cannot modify easily a XML file and I must to do some change in the dll.xml file of FSX.

And also, I don't want touch to the user windows register. The "readyto" installer write in the register.

They are designed to install a software, not an FSX aircraft.

Write my installer needs half a day. It is very easy and It willbe universal for any FSX aircraft.

BUt I must know if the 3 Windows API that I use in my VB6 code works with a 64bit OS.

But It seems that nobody has 2 minutes to test.....

Francois
 
Francois, Setup1.exe works perfectly here on my Win7 x64 Professional operating system.

Actually, NSIS is the most flexible install system I've ever encountered, since it is entirely 'script' driven and there are a ton of pre-written macro files available for it. I've been using it for years to create custom aircraft installers... :)

What is truly amazing is that it is 100% free to use by anyone, for anything!
 
Ok bill, I will see NSIS and Thank you for your feedback. I am surprising that the setup1 works with a 64b and english OS. I thought only that Setup2 will works (because I have include the VB DLL French language version in the Setup2.exe to do it a "stand alone" exe, and not in Setup1..

I like to write programs but I am old now, and I have difficulties to learn new things, but if you tell that NSIS is very simple to use i will try.

Regards

Francois
 
Francois, I can provide a generic template based on the "Modern UI" that I've chosen to work with. As one short example though of how friendly the NSIS 'scripting language' is, these two simple lines will install all of the folders and files for an aircraft...

First, I need to determine which platform the user wishes to install to. This is platform agnostic, so it doesn't matter what version of Windows, or language the user has selected. For this project, the user can install to FSX or Prepar3D v1.x. I've left out the bits of script that define the UI and have listed only the relevant parts here:
Code:
        ${NSD_GetState} $RadioButton1 $RadioButton1_State
        ${NSD_GetState} $RadioButton2 $RadioButton2_State
        ${NSD_GetState} $Checkbox2 $Checkbox2_State
 
        ${If} $RadioButton1_State == 1
              ReadRegStr $INSTDIR HKLM "Software\Microsoft\Microsoft Games\flight simulator\10.0" SetupPath
        ${EndIf}
 
        ${If} $RadioButton2_State == 1
              ReadRegStr $INSTDIR HKLM "Software\LockheedMartin\Prepar3D" SetupPath
        ${EndIf}

Code:
  SetOverwrite on
 
  SetOutPath "$INSTDIR\Effects"
  File /r "F:\Installer Build Folders\C310R_FSX_Build Folder\Effects\*.*"
 
  SetOutPath "$INSTDIR\Gauges"
  File "F:\Installer Build Folders\C310R_FSX_Build Folder\Gauges\*.*"
 
  SetOutPath "$INSTDIR\SimObjects\Airplanes\Cessna 310R FSX Milviz"
  File /r "F:\Installer Build Folders\C310R_FSX_Build Folder\SimObjects\Airplanes\Cessna 310R FSX Milviz\*.*"
The "/r" flag means "recursively install" all "*.*" files and folders in the specified path.

Uninstalling stuff is similarly simple;
Code:
  SetOutPath "$INSTDIR\Effects"
  Delete "$INSTDIR\Effects\MilVizC310_*.*"
 
  SetOutPath "$INSTDIR\Effects\Texture"
  Delete "$INSTDIR\Effects\Texture\MilVizBloom.bmp"
  Delete "$INSTDIR\Effects\Texture\MilVizC310_*.bmp"
 
  SetOutPath "$INSTDIR\Gauges"
  Delete "$INSTDIR\Gauges\C310_XMLGauges.CAB"
  Delete "$INSTDIR\Gauges\C310R_G1000.CAB"
  Delete "$INSTDIR\Gauges\MilVizC310.gau"
 
  SetOutPath "$INSTDIR\SimObjects\Airplanes"
  RMDir /r "$INSTDIR\SimObjects\Airplanes\Cessna 310R FSX Milviz"
The final line is really slick. "RMDir /r" means recursively remove all files and folders, then remove the main folder also... :wizard:
 
Last edited:
Hi Bill,

Thank you very mcuh for your sample !

You are right, It seems simple.

Just one thing : In the second quote, I see a drive letter : So, you cannot to know from which drive the user run the install program ?

So I need to create a .ini file in one of the directory created by the installation: and I must write in this .ini file the user folder "\my document\Username\Flght Simulator X\" but by double "\" : E.G : this file called "FMC_Path.ini" incluse for me : "C:\\Documents and Settings\\Fdd\\Mes documents\\Fichiers Flight Simulator X\\"

And I must write in the dll.xml file of the user 2 new sections to declare 2 dll used by my FMC (and make a backup of the user dll.xml user file before change).

All this code is really very easy to write in VB6 (it include XML file handling functions); Is NSIS can do this thing simply ?

And I have a great tool (Fusion) that allows to create real standalone Exe files (by default, VB6 requires a runtime dlls and OCX controls but with Fusion, the runtime and the optionnals ocx controls are include in the exe.).

You are really nice and helpful, bill, and you have often help me. But I like to programs, and it is a pleasure for me to create my own installer, and it will be dedicated to install any FSX aircraft , with the capacity to write in the FSX dll.xml file

it makes my work head and prevents me from becoming silly :)

And my project already uses many components from other authors (Doug Dawson callout gauge, XMLVars.dll from tom Aguilo and LoggerX for Rob Mc Elrath). My FMC has today more than 30 000 lines of XML code. I can still write in tens in VB6 to this installer. So I would like to make the most I can do myself.

I love creating

Thanks for all you o Bill and your Kindness

Regards

:)

Francois
 
Last edited:
Just one thing : In the second quote, I see a drive letter : So, you cannot to know from which drive the user run the install program ?

So I need to create a .ini file in one of the directory created by the installation: and I must write in this .ini file the user folder "\my document\Username\Flght Simulator X\" but by double "\" : E.G : this file called "FMC_Path.ini" incluse for me : "C:\\Documents and Settings\\Fdd\\Mes documents\\Fichiers Flight Simulator X\\"

And I must write in the dll.xml file of the user 2 new sections to declare 2 dll used by my FMC (and make a backup of the user dll.xml user file before change).

All this code is really very easy to write in VB6 (it include XML file handling functions); Is NSIS can do this thing simply ?

No, the "drive letter" in the script example is a path on my computer where the source files for the build are kept. While I could have copied the files directly from FSX's own folder structure, I much prefer to create my own Installer Build Folder structure so that all source files are kept in a controlled environment.

To obtain the path to the current user's "My Documents...." folder, this $tag will provide that for you easily:
Code:
$DOCUMENTS 
The documents directory. A typical path for the current user is C:\Documents and Settings\Foo\My Documents. The context of this constant (All Users or Current user) depends on the SetShellVarContext setting. The default is the current user.
So...
Code:
SetOutPath "$DOCUMENTS\Milviz"
will create a folder in the user's own "Documents and Settings", or "My Documents" folder structure, irrespective of the operating system the user has installed, such as WinXP, Vista, Win7, Win8, etc.

As far as dealing with the dll.xml files and so forth, the easiest way would be to write a small .exe file to handle that, and simply invoke it from the NSIS script:
Code:
  ExecShell open $INSTDIR\Milviz\MV_MM.exe
If this is placed as the last action of the installer, then as soon as it completes its job, the user would be returned to the installer's GUI and allowed to then click on "Finish" to complete the install and close the GUI.
 
Back
Top