PDA

View Full Version : Update customers from XP to Vista



NewsArchive
09-29-2008, 01:40 AM
Under XP, we used a folder like C:\programfiles\bbsoft\[PROGRAM] for both
program and data - Many of uour customers liked it, because of the very lean
install.
Under Vista, this is definately not a good idea.
So we have added a message, and changes the data directory to
C:\BBSOFT\[PROGRAMNAME]
I am aware of, that wista has its own data area - Has SB a variable for
this?
OK, but what with updates.
The data folder is changed to C:\BBSOFT\[PROGRAMNAME], but the data is left
in C:\programfiles\bbsoft\[PROGRAM].

OK, I wrote this:
! Wizard dialog definition(s)
Define Wizard Dialog "#2" (Password)
Define Wizard Dialog "LANGUAGE" (Radio Buttons) (%SFO%)
Define Wizard Dialog "#4" (License Agreement)
Define Wizard Dialog "CUSTOM" (Custom Install)
Define Wizard Dialog "#6" (Select Install Folder) (%_SB_INSTALLDIR%)
Define Wizard Dialog "#7" (Select Install Folder) (%DATAFOLDER%)
Define Wizard Dialog "KOPIERDATA" (Ready to Install)

! The Wizard Loop displays the dialog screens that the user sees in the
installation
Loop Wizard (Abort Dialog Active)
If %_SB_DIALOGID% Equals "$LANGUAGE$" Then
If %SFO% Equals "2" Then
Set Variable %_SB_INSTALLDIR% to
"%PROGRAMFILESDIR%\BBSOFT\aarsnorm"
Set Variable %DATAFOLDER% to "%_SB_INSTALLDIR%"
End
End
If %_SB_DIALOGID% Equals "$CUSTOM$" Then
If %WINDOWSVERSION% Equals "6" Then
Display Message Box "Vista har specielle krav til placering af
datafile..." -- "Vista"
Set Variable %DATAFOLDER% to "c:\BBSOFT\norm\DATA"
End
End
If %_SB_DIALOGID% Equals "KOPIERDATA" Then
If %WINDOWSVERSION% Equals "6" Then
Create Folder "%DATAFOLDER%"
Copy File(s) from "%_SB_INSTALLDIR%\*.tps" to "%DATAFOLDER%"
End
End
End

But it does not copy the data - Perhaps because they are hidden in Vista's
vituel data folders.

What to do?
Its pretty costly on Hot line.

Edvard Korsbæk

NewsArchive
09-29-2008, 01:41 AM
Edvard,

Too many "unknowns" to give a good anwser (e.g. where and how is
%WINDOWSVERSION% defined). And it depends on the SetupBuilder version. If
you have an older SetupBuilder version, use:

If %_SB_DIALOGID% Equals "$KOPIERDATA$" Then

instead of:

If %_SB_DIALOGID% Equals "KOPIERDATA" Then

And make sure the "If Statement" that defines %DATAFOLDER% and copies the
data is really executed!

BTW, I would suggest to *not* copy the data in the "Wizard Loop", but do it
after the "Display Setup Progress Dialog" function. In other words, move
that code out of the Wizard Loop.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
09-29-2008, 01:42 AM
A few suggestions.

1. I'm guessing that you may be trying to perform the copy prior to the
"Install File" script items that would be putting your source files into
place. As Friedrich writes, do your data copy along with the other install
stuff after the wizard loop.
2. Use the $WIN_VISTA$ constant to detect Vista.
3. To save your sanity, include an item on the Help menu in your main app
called "Show Data Locations" or something like that with a window showing
app data location, any command-line switches, etc.. When you're helping a
customer, you can ask him to check that so you are sure where his data is
located.

Jane

NewsArchive
09-29-2008, 01:42 AM
>Under XP, we used a folder like C:\programfiles\bbsoft\[PROGRAM] for both
>program and data - Many of uour customers liked it, because of the very lean
>install.
>Under Vista, this is definately not a good idea.
>So we have added a message, and changes the data directory to
>C:\BBSOFT\[PROGRAMNAME]
>I am aware of, that wista has its own data area - Has SB a variable for
>this?
>OK, but what with updates.
>The data folder is changed to C:\BBSOFT\[PROGRAMNAME], but the data is left
>in C:\programfiles\bbsoft\[PROGRAM].

Edvard,

I've been moving data out of Program Files since XP, or Win2K (I forget), and
still do it in deference to upgrading really old releases. With what Friedrich
and Jane said, you're on the right track.

Here's a bit of OS common folder stuff I use:

Set Variable %COMMON_DOCUMENTS% to FUNCTION:Get Special
Folder("CSIDL_COMMON_DOCUMENTS")

Set Variable %COMMON_DOCUMENTS_PROG_FOLDER% to
"%COMMON_DOCUMENTS%\[PRODUCTNAME]"

Set Variable %DEFAULT_DATABASE_PATH% to
"%COMMON_DOCUMENTS_PROG_FOLDER%\database"

Set Variable %DATABASE_PATH_MOVE_TO% to
"%COMMON_DOCUMENTS_PROG_FOLDER%\database"

JAT, here. Over the years I have found that users will sometimes manage to
disconnect the program from its database. (They are always separate in my work
now). In my case, I prevent the program from running without its database.

If you might move down that path of separating program and data, do yourself a
favor and create a mechanism for the program to allow a user to re-locate his
database so you can stuff its path wherever you store it. I use a small
utility program that gets called by the core product early in its
initialization if its database gets lost. Works nicely.

--
Best regards,

Mark

-------------------------------------------------------------------
Why waste time learning when ignorance is instantaneous?

NewsArchive
09-29-2008, 02:40 AM
Edvard,

Any update? You can send your project and we'll check/enhance it for you.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner