PDA

View Full Version : Pop up an Install folder dialog box in script



NewsArchive
06-15-2009, 12:55 AM
If the install folder can't be found in the Registry, I then want to give
the user a chance to enter the install folder in a dialog box... How To?

--Script Code---
Set Variable %REGVALUE% to FUNCTION:Get Registry("LocalPath") from
"HKEY_LOCAL_MACHINE\SOFTWARE\InvoicePartner"
! If previous version not detected, abort nstallation
If %_SB_ERRORCODE% Equals "0" Then
Display Message Box "Cannot detect previous version information!" --
"Error"
/* Set Variable %_SB_INSTDIR% to FUNCTION:Get Registry("LocalPath") from
"HKEY_LOCAL_MACHINE\SOFTWARE\GaragePartner" */
!!!!!!!!
!!!!!!!! This would be a nice place to popup the dialog Box!!!!!!!!!!
!!!!!!!!
Else
! Set installation folder to detected folder
Set Variable %_SB_INSTALLDIR% to "%REGVALUE%"
End
--End Script Code--

TIA
--
Dan Scott
Garage Partner Pro
www.garagepartner.com

NewsArchive
06-15-2009, 12:56 AM
I think I got it... Please compare

--
Dan Scott
Garage Partner Pro
www.garagepartner.com

NewsArchive
06-15-2009, 12:57 AM
You don't say whether you're doing a wizard, which would make it easy.

I don't think you can "pop up" a message box to ask for input.

But you could "pop up" a wizard dialog, regardless of whether you're using a
wizard otherwise (see attached).

Jane Fleming

NewsArchive
06-15-2009, 12:59 AM
Jane
Thanks,
Looks like we had similar thoughts
Here's how I dood it. I am just starting again to use SB6, SB4 was such a
friend to me.


Set Variable %REGVALUE% to FUNCTION:Get Registry("LocalPath") from
"HKEY_LOCAL_MACHINE\SOFTWARE\InvoicePartner"
! If previous version not detected, abort nstallation

If %_SB_ERRORCODE% Equals "0" Then
Display Message Box "Cannot detect previous version
information!\n\nPle..." -- "Error"
/* Set Variable %_SB_INSTDIR% to FUNCTION:Get Registry("LocalPath") from
"HKEY_LOCAL_MACHINE\SOFTWARE\GaragePartner" */
Set Variable %_SB_INSTALLDIR% to "c:\InvPartner" !!!!! Just need to get
them Close <g>
Define Wizard Dialog "#1" (Select Install Folder) (%_SB_INSTALLDIR%)
!!!!They get a chance to select.
Else ! If Registry is there
! Set installation folder to detected folder
Set Variable %_SB_INSTALLDIR% to "%REGVALUE%"
End







--
Dan Scott
Garage Partner Pro
www.garagepartner.com