Program won't launch

Started by Randem, January 22, 2011, 09:09:02 AM

Previous topic - Next topic

Randem

Yes, that is called virtualization and that is exactly why your data should not be in the {app} folder ref: https://randemsystems.support/innoscript-general-questions-report-bugs-problems-etc/installation-problems/

Vertualization as you have figured out is a maintenance nightmare for modified files are not where you would expect them to be. Windows Vista and Windows 7 only do this for legacy applications that cannot be modified. I would suggest that you follow the Windows standards on where your data should be located. You can take a look at some VB code I have posted just for that purpose at https://randemsystems.com/freeware.html 

Look for the following:

Make Your Application Limited User Compliant

mightymike

I think I finally got the Script working properly. But I have a problem that is driving me nuts! I am running Windows7 and I have a situation though I am not sure what is causeing it, my InnoScript profile or Windows7. The User has the option of installing the program anywhere but I have it  defaulting to C:\Program Files(x86)\Grand Prix Tracker (per your advice). When the program is installed anywhere except 'Program Files or Program Files(x86)' all works fine. But I noticed when it is installed in {pf} that Windows makes a copy of any files modified to a place called:  
 
Network> MightyMike-PC> \users\mighty mike\app data\local\virtual store\program files(x86).
 
The problem is when the program is uninstalled, it removes all files (and directory) from the 'Program Files' directory but not from the above Virtual location. Now when you install a newer version of setup, it again is installed in the {pf} directory however those modified files from the first install are still there and the program uses THOSE files. Also if I Delete a File from within my program, my program cannot find it for some reason using the 'Kill' command (says the path is bad). And even using the App.Path command, it still comes up with an error (I think because it is not seeing the above LINK created by Windows7). Like I said, if I install it anywhere other than {pf}, all works fine. I know you have Flags to overwrite existing files, but what happens when they are located elsewhere?

Randem

The InnoScript documentation and the Inno Setup documentation are two different animals. Inno Setup parameters are not covered in the InnoScript documentation and nor vice-versa.
 
If your program can not detect where it was installed then it is coded incorrectly. The installer is not responsible nor can it tell your program where it is. Your application holds total responsibility for that. Whomever coded your application did not use proper coding techniques such as App.Path to locate where the program is installed and hard coded the location.
 
As far as your assumptions, Please read step 4 carefully (from the InnoScript Documentation):
 
Operational Procedures
 
       InnoScript will convert your Visual Basic Project (5 or 6), Visual Basic .NET Project, or any exe/dll file into an Inno Setup Script (.iss). It will automatically put in the appropriate VB Runtime files for VB5 and VB6. By itself InnoScript is just a tool to help you move to Inno Setup by providing a simple way to get your project packaged in Inno Setup without knowing too much about Inno Setup.
 
The basic procedure to run InnoScript:
 
1 - Install InnoScript in the Administrative Account. InnoScript must be run once from this account after installation for proper operation in a limited users account. Any License information update must also be done from the administrative account.  
 
2 - Install Inno Setup (InnoScript uses Inno Setup to compile your scripts).  
 
3 - Create a new InnoScript Project for your Visual Basic Project. File->New  
 
4 - Fill in parameter screen for Inno Setup directives (can also be done at a later time. InnoScript will automatically fill in many of the slots after the first run if the slot is empty).  
 
5 - Select your vbp/vbg/.net project file (Best results are generated when you use a vbg (group project) file that contains all the projects when your app uses ocx/dll/exe from other projects). Any exe/dll from other programming languages can be used also.  
 
6 - Select a name and location for the output .iss file.
 
7 - Create or select a template file (.tpl) for info to be added to the script (optional).  
 
8 - Add any additional files or folders that your app needs. (Add Files and Add Folders Tabs).  
 
9 - Add any additional folders where files in your project can be found (Search Folders Tab).  
 
10 - Add any folder that you do not want InnoScript to search (Exclude Folders Tab)  
 
11 - Press Create Script to convert your project file.  
 
12 - Edit your script (.iss) with Inno Setup or ISTool. (if needed).  
 
13 - Compile your script with Inno Setup.

mightymike

I figured out what was happening. I assumed you had to give a default 'directory name' in the Parameters field. I wish something would have said, 'normally you should leave this field blank'. I also realized that a lot of the documentation was in the Inno Setup program, not in the Inno Script program. I have another question though. I am currently using the C: root directory in my VB6 program (which you said I shouldn't do). When I generate a Script that uses the {pf} directory, my VB6 program can't find it. In my program I am defining the directory statement as:
ChDir C:Grand Prix Tracker. So of course my program won't see 'C:Program FilesGrand Prix Tracker'. My question is if I change my program to include the 'programs files' path, then how does it work while installing the program using Inno Setup if the User then changes the installation to a different directory or path? Is that taken care of automatically in the Setup program or does something have to change in the VB6 program? (ChDir ..Grand Prix Tracker)???
Thanks in advance.

Randem

This is what a default parameter screen is suppose to show. And as you see in the DefaultDirName is not like any you have shown. So when you tell me you havent changed anything...
 

mightymike


Randem

No, you did not start fresh. DefaultDirName is AGAIN different and this one will go to c:Gran Prix Tracker.
 
Post zip and pist your vbp and exe. i will run it on my end to show you what you are supposed to see.

mightymike

Okay... I knew this would happen. The Script that I sent you went with THIS screenshot which was generated from scratch. When I ran the Inno Setup it still tried to load it at C:\Grand Prix Tracker. I then went back and changed the default directory to the screenshot that I sent you first. That was all I did.
Anyway!

Randem

You had to change the parameters in the parameter screen. You changed some of them here too after you were not supposed too.
You did not change the DefaultDirName and so it cannot possibly be attempting to install in c:Gran Prix Tracker location.
 
When you follow the steps you have to follow them exactly. If you start changing things you will get lost...
 
You also added
 
Source: C:GP Tracker Program Setup Files*.*; DestDir: {cf}Grand Prix TrackerGP Tracker Program Setup Files; Flags: ignoreversion recursesubdirs
 
and this goes to the {cf} folder upon installation.
 
You seem to be confused with what file you are using to install with. There is no way this script you sent attempts to install in the root folder.
 
When you start clean you start with no changes what-so-ever.

mightymike

I don't. I guess its back to the drawing board for me. I did what you said and I am still getting the same results. I included my new Script file and the screenshots of both of my Parameters (tried both).
I will probably have to continue this on Friday.
Thanks!

Randem

Your screen shots are different than your script. In your script you have DefaultDirName=C:Grand Prix Tracker that is why you your installer is attempting to install there.
You should use InnoScript's defaults When you start changing parameter that you do not know what they are you WILL run into trouble. Why did you change this parameter if you did not know what it does?

Randem

From what you are showing there is NO WAY your installer is attempting to install where you say it is.
 
You should start over from scratch then follow the basic instructions for creating a script.
 
1 - create your project
2 - point to your VBP file
3 - generate the script
 
Start there first. Do only what I mentioned. then show me the output

mightymike

Randem,
   I don't know. I seem to be more lost than I was yesterday. Simply stated I want to have my program installed at: C:Program FilesGrand Prix Tracker. I wanted to know what I am doing WRONG by you looking at the code I sent you. Can you explain to me what I need to change? When I run Inno Setup, it wants to install the program at C:Grand Prix Tracker. I also still don't know how to stop that line from being generated too. You said that it is doing exactly what I am telling it to do. Then how do I change it to not generate that line as such. When Inno Setup trys to execute it, it says that it cannot find that folder (and of course it shouldn't). So why is it creating:
Files]  
Source: C:GP Tracker Program Setup Files*.*; DestDir: {app}GP Tracker Program Setup Files; Flags: ignoreversion recursesubdirs  
 
instead of the line which works in Inno Setup:  
[Files]  
Source: C:GP Tracker Program Setup Files*.*; DestDir: {app}; Flags: ignoreversion recursesubdirs?  
'GP Tracker Program Setup Files' is the folder where all my addtional files are located, such as jpeg, etc.
Like I said, if I edit it to read the latter (as Inno Setup did originaly) it works fine.
Thanks but confused!

Randem

No it keeps trying to install in c:Program FilesGran Prix Tracker Where it should. If you want it to install somewhere else then change DefaultDirName. BTW: InnoScript would not have chosen the way you have the folder name in that parameter.
 
That line works for what???? You have to understand what you are asking for to understand the results. The line that is generated is correct for what you asked for. You asked that the whole folder be installed into the {app} folder. It is doing that. If you want different results you would have to ask different questions. Where do you want all the files in that folder to be in the {app} folder then you either have to include each file separately or add the line you need in the template to replace the other line you don't like.
 
InnoScript has a procedure it follows. You have to follow the procedure to get what you want from it.

mightymike

Okay.... bare with me please. I have resolved the 'Release' issue only. I guess I am just not catching on. I have read all your documentation several times, but I guess I am just not comprehending everything. I would then like to change my destination program at C:\Program Files\Grand Prix Tracker, but don't see where to do this other than in the 'Parameters' section. I have included the screenshot of my settings. It keeps trying to install it at C:\Grand Prix Tracker.  
Also I still don't understand why it keeps generating the line (that doesn't work):
[Files]
Source: C:\GP Tracker Program Setup Files\*.*; DestDir: {app}\GP Tracker Program Setup Files\; Flags: ignoreversion recursesubdirs
 
instead of the line which works:
[Files]
Source: C:\GP Tracker Program Setup Files\*.*; DestDir: {app}; Flags: ignoreversion recursesubdirs?
The Script is the same as I sent you before.
What am I missing???????