Issue:
By default Installscript dialogs will display in the centre of the screen, this article discussed how to change this location using installscript code.
Solution:
Use the below Installscript code (in bold) in all Dialog init code to change the position of the dialog, where nDx = 200; nDy= 250; are the starting position of the dialog. Same way, you can modify for all other dialog sources used in you installscripts like SdFinish.
// SdWelcome ----------------------------------------------------------------
function SdWelcome(szTitle, szMsg)
string szDlg, szTemp;
number nId, nMessage, nTemp, nSdDialog, nDx, nDy, nWidth, nHeight;
HWND hwndDlg;
BOOL bDone;
RECT rect;
begin
szDlg = SD_DLG_WELCOME;
nSdDialog = SD_NDLG_WELCOME;
// record data produced by this dialog
if(MODE=SILENTMODE) then
SdMakeName( szAppKey, szDlg, szTitle, nSdWelcome );
SilentReadData( szAppKey, "Result", DATA_NUMBER, szTemp, nId );
return nId;
endif;
// ensure general initialization is complete
if(!bSdInit) then
SdInit();
endif;
if(EzDefineDialog( szDlg, "", "", SD_NDLG_WELCOME ) = DLG_ERR) then
return -1;
endif;
Disable( BACKBUTTON );
// Loop in dialog until the user selects a standard button
bDone = FALSE;
while (!bDone)
nId = WaitOnDialog( szDlg );
switch(nId)
case DLG_INIT:
// Put the corresponding Info in the List Field
if( szMsg != "" ) then
SdSetStatic(szDlg, SD_STA_MSG, szMsg);
endif;
hwndDlg = CmdGetHwndDlg( szDlg );
SdGeneralInit( szDlg, hwndDlg, STYLE_NORMAL, szSdProduct );
SdSetDlgTitle(szDlg, hwndDlg, szTitle);
GetWindowRect(hwndDlg, &rect); nWidth = rect.right - rect.left; nHeight = rect.bottom - rect.top; nDx = 200; nDy= 250; MoveWindow(hwndDlg, nDx, nDy, nWidth, nHeight, TRUE);
Related Articles
Add Image to Push Button Control on InstallScript Dialogs 3Number of Views How to Change the Default Setup Type Selection on the InstallationType Wizard Page for Suite/Advanced UI Projects 4Number of Views How and Where to Change the Default Download Folder Path for Package Feed Module 6Number of Views How to change the LLS default "Service name" for Windows 5Number of Views Make a Copy of an Existing InstallScript Dialog 3Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago