NewsArchive
01-30-2015, 02:52 AM
Can an SB install script detect the users operating system and create a
propath.ini file in the correct location based on the detected OS? Any
help very much appreciated.
John
NewsArchive
01-30-2015, 02:53 AM
> Can an SB install script detect the users operating system and create a
> propath.ini file in the correct location based on the detected OS? Any
> help very much appreciated.
Hi John,
SetupBuilder can certainly detect the OS and indeed the same user settings
that ProPath can.
So in theory you could create the file and put whatever in it that your
trying to do.
However a better question might be what exactly are you trying to do?
ProPath would automatically create it's own INI file (and in the correct
location) the first time the program is ran.
All you need to be aware of is that you should NOT start your program at
the end of your install (unless it is manifested to run "Elevated" as the
installer would be running in that mode) without using the SetupBuilder
option to run your program "Non-Elevated".
Otherwise you run into the scenario where "John the User" goes to install
your program and then the SetupBuilder installer prompts the user for
elevation.
Then your installer is now running as "John the Administrator" so that it
can put files where they should go (Program Files) and make any needed
changes to the Registry.
Now if you go ahead and allow the user to run your program at the end of
the install, then ProPath would create the INI file in the "John the
Administrator" location (as set by the OS and the CSIDL you selected).
This is because you basically would be chaining the running of your program
from the elevated level of the installer - so the first time the program is
ran, it is ran elevated as well.
Then the next time you run the (non-elevated) program, Windows will by
default run it as "John the User" - meaning that the settings that ProPath
stored for you during the first run could not be found (remember that they
were stored in the "John the Administrator location).
Fortunately SetupBuilder has an option that allows you to start your
program at the end of the install in a non-elevated mode.
By doing that, you still allow the user the option to run your program at
the end of the install, but since it is non-elevated the settings get
stored in the "John the User" location.
Because of this, the next time you run the program, the settings are where
they should be and all is well.
Hopefully that helps and addresses what you were either running into or
wanted to do.
If not, feel free to contact us directly if you prefer, or let us know what
your trying to accomplish.
Again, SetupBuilder can do what you want it to do, but you might be going
about it the hard way.
Does that help?
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
cjeByteMeSpammers@lansrad.com (remove the "ByteMeSpammers" to email me)
www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
developer tools!
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.