Multiple file installation

Started by Randem, May 09, 2008, 11:00:25 AM

Previous topic - Next topic

jamj

I did read the link, but am confused by limited user - I don't limit the user.
 
Problem is that read/write files are placed in folder C:Documents And SettingsMyUserNameLocal SettingsApplication Data. This is just as you described earlier. This installation is now working.
However when I run my VB program I cannot get path to these files. In innoscript 9.0 instructions (page 1) You can get your APPDATA location by getting it from the environment. In VB6 use Environ(APPDATA).  
My code line is below -
globDataPath = Environ(APPDATA)
 
This does not return correct path to installed files.
 
IE.
files installed in
C:Documents And SettingsMyUserNameLocal SettingsApplication Data.
VB6 reading
C:Documents And SettingsMyUserNameApplication Data.
 
Script is installing to LocalAppData but VB6 reading AppData. Can I get VB6 to read LocalAppData, or can i/script change script to AppData?

Randem

When you state that you cannot get something to work, it would help if you actually posted the line(s) that you used that you cannot get to work so that I don't have to attempt to be a mind reader...

Randem

See, you did not read the link I suggested for there was a project there that would help you get these locations.
 
Titled: Make Your Application Limited User Compliant

jamj

AppData and LocalAppData will change for each user IE.  
 
C:\Documents And Settings\YourUserName\Local Settings\Application Data\

I have installed but cannot get VB6 to read path as above.
In your help you indicate 'Environ(APPDATA)' but this returns C:\Documents And Settings\YourUserName\Application Data\
I tried entering LocalAppData but it returned empty string.
How do I get path as set by localappdata?}

jamj

So far so good except for -
I want these to be with main exe and also have link in Start | All Programs.  
 
Manually create a line in the [Icons] section for the exe.

I have tried adding additional line in Icons so that second exe can be run from Windows Start. However I cannot get it to work. I copied first line in Icons which refers to main exe and then I altered name of exe to point to required program. What have I done wrong? I dont know how script is suppose to read.}

jamj

OK I am progressing.
With regard to missing files  - they were in a separate folder but i/s was not finding them. Added to 'search folders' and problem solved.
 
Thanks for help.

Randem

Luck should not be part of the deployment process...
 
It worked because everyone is an Administrator... In the real world in the corporate world this is not the case and your app would crash. Not exactly the way I would like my apps to work...

jamj

If all read/write data should be in localappdata folder then I wont need a folder within the application folder.
Until now I had just placed data files within application folder - simple! and it worked
Who wants vista

Randem

Now when you add a folder Add Folder that folder will be create in the location where you installed your app wherever it may be. The only rule is that the folder has to be located in the folder where your VBP project is also.

Randem

AppData and LocalAppData will change for each user IE.
 
C:\Documents And Settings\YourUserName\Local Settings\Application Data\
 
would be entirely different if I logged on, IE.
 
C:\Documents And Settings\MyUserName\Local Settings\Application Data\
 
This is why you don't want to hardcode...

Randem

LocalAppData will take the location from Windows. This will be different for each user so to hard code it would be a VERRRRRYYYY Bad idea. Just as hardcoding App would be bad.
 
Hardcoding entries is asking for program failure...

jamj

Manually edit the script or create a template that will do it for you. InnoScript is already doing that for you with the {localappdata.  
}
OK. Not too sure how to do it. This is a learning curve.
 
Can I give a name to 'localappdata' or is it preset}?

Randem

Well, that link describes why you should not put the files in the Program Files folder and they should go int the AppData or the LocalAppData folder. You really do not want to place files that you need to write to in the Program Files folder if you want your app to work on Vista and in Limited User Accounts.

Randem

These files are missing. Of course they are missing you are running in safe mode and they are in the Windows System folder (since they are system files and VB components). You are supposed to copy these files to another folder the add that folder to the search tab for processing.
 
Source: msstdfmt.dll; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: threed32.ocx; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: mscomctl.ocx; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: tabctl32.ocx; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: dblist32.ocx; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: dbgrid32.ocx; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: mscomct2.ocx; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: comdlg32.ocx; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;}

jamj

Yes I already have that printed out.