cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
thanatos83
Level 5

SdAskDestPath with SdconfirmNewDir

Hi all.

I use in my project this two dialogs, but there is a problem. if i select another folder than the default installation then in "SdConfirNewDir" appears with default installation, why?, not changes?

I use this code...

Dlg_SdAskDestPath:
bCustom = TRUE;

nResult = SdAskDestPath(szTitle, szMsg, INSTALLDIR, 0);

if (SD_PBUT_CHANGEDIR = TRUE) then
CtrlGetText ( szDlg, 0x80000000 | SD_STA_DESTDIR, szDir );
endif;

if (nResult = BACK) goto Dlg_SetupType;

// check exist folder
if (ExistsDir (svDir) = EXISTS) then
goto Dlg_SdSelectFolder;
else
CtrlSetText ( SD_DLG_CONFIRMNEWDIR, 701, szDir);
nResult = SdConfirmNewDir ( szTitle , svDir , 0 );
if (nResult = NO) then
goto Dlg_SdAskDestPath;
else
nResult = YES;
endif;
endif;


any help please???
Labels (1)
0 Kudos
(2) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I'm not sure that CtrlGetText and CtrlSetText work outside of a dialog loop, and those loops are hidden behind the calls to SdAskDestPath and SdConfirmNewDir here. But you shouldn't need to use them; instead the third parameter of SdAskDestPath will return the newly selected value, and the second of SdConfirmNewDir will allow you to pass this in.

In other words, try replacing your CtrlGetText call with svDir = INSTALLDIR, and removing your CtrlSetText call.
0 Kudos
thanatos83
Level 5

thanks michael, that work nice!

so, one question:

I include in my project the (setuptype2) dialog with two SetupTypes like : Complete and Custom.

the complete option always install the all features in the same path drive C:\ ???

When i select custom option and if select another drive to install my features then in "StartCopy" dialog i see the new path to install all features correctly. but if i select at first a custom setup, and then in askdestpath dialog i select another folder, and come back to setup type dialog again for select a complete option then in startcopy dialog i see the new path of my installation, so complete option does not always install the features in the default path???

sorry for my bad english 🙂
0 Kudos