This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
ch_eng
Level 7
- Revenera Community
- :
- About ch_eng
Aug 14, 2015
03:35 PM
We started from a customized version of the SQLServerSelectLogin(Ex)(2) dialog but added a lot more functionality (adding a radio button for Install vs Patch a database, created separate logins for a DBA (to create our database) vs a local sql login that our apps would use, and allowed the user to specify the (usually) remote path to place the actual .mdf/.ldf files). The source for the original dialog can be found on your computer in a directory similar to: C:\Program Files (x86)\InstallShield\2014\Script\Isrt\src\SQLServerSelectLoginDlg.rul For patch installs, we have a custom dialog that uses some of the same functionality (reads the SQL connection string, parses the parts into the form and requires the user to verify the connection or change it before the patch will continue). IMHO database connection dialogs still have a long way to go in InstallShield. We have been customizing them for at least 7+ years to meet the requirements of our customers. HTH
... View more
Aug 14, 2015
10:24 AM
Hello, While I can't help with the C# part, I can add additional InstallScript that may be of use. I haven't had to do this from scratch in so long (copy-pasta nowadays) that I didn't add the other code that may help in your case. The custom "ADODB_RunCode_GetValue" function below just runs a simple query looking for a specific field in our database to verify we are able to connect. It returns the ADODB error code in svError if there was a problem. //***NOTE*** in InstallScript Only, "SQLRTConnectDB" does not actually verify that the user/password is correct //*** basically, "SQLRTConnectDB" only verifies that the installshield SQL dll interface has been initialized if nCheckLogin = ISERR_SUCCESS then // when nCheckLogin = ISERR_SUCCESS, only know that the installshield SQL dll was initialized - nothing more // now manually have to see if the DB engine exists and if the user/pass combo is valid // common ADODB errors that could happen: // -2147467259: SQL Server does not exist or access denied. // -2147217843: Login failed for user ' ' // look for the current DB version: pObjDBConnect->svADODBConnection = "Provider=sqloledb;server=" + pObjDBConnect->svServer + ";database=" + pObjDBConnect->svDatabase + ";uid=" + pObjDBConnect->svUserID + ";pwd=" + pObjDBConnect->svUserPWD + ";"; bSQLCodeRanOK = ADODB_RunCode_GetValue( pObjDBConnect->svADODBConnection, szDBVersionCheck, svDBVersion, svError ); SdShowMsg( szTestingConnection, FALSE ); Disable( HOURGLASS ); if !bSQLCodeRanOK then if StrFind( svError, "-2147467259" ) >= 0 then strSQLResults = "Error -2147467259: SQL Server does not exist or access denied."; elseif StrFind( svError, "-2147217843" ) >=0 then // login failed strSQLResults = "Error -2147217843: Login failed for user '" + pObjDBConnect->svUserID + "'."; else strSQLResults = "An error occurred:\n\n" + svError; endif; else strSQLResults = "SQL Login Successful! Database version found: " + svDBVersion; endif; endif; HTH
... View more
Aug 14, 2015
07:45 AM
Hello, I use the following code in an InstallScript Only project to test connecting to an existing SQL database: // user needs to check the login credentials to the server SdShowMsg( szTestingConnection, TRUE ); nCheckLogin = SQLRTConnectDB( szConnection, pObjDBConnect->svDatabase, pObjDBConnect->svServer, FALSE, pObjDBConnect->svUserID, pObjDBConnect->svUserPWD ); // SQLRTInitialize2() should have already been called but it seems to need a call here as well. if nCheckLogin = SQL_ERROR_NOT_INITIALIZED then SQLRTInitialize2(); nCheckLogin = SQLRTConnectDB( szConnection, pObjDBConnect->svDatabase, pObjDBConnect->svServer, FALSE, pObjDBConnect->svUserID, pObjDBConnect->svUserPWD ); endif; HTH
... View more
May 07, 2015
11:19 AM
GambleR, I have not had to do that before. Maybe your software developers can help. Good Luck! HTH
... View more
May 07, 2015
10:38 AM
PlinyElder, To be honest, I don't have experience using SQLRTConnect2. When I had InstallScript MSI installers, I would instead use SQLRTTestConnection2 and that seemed to work as intended. http://helpnet.installshield.com/installshield16helplib/mergedProjects/installshield16langref/SQLRTTestConnection2.htm HTH
... View more
May 07, 2015
09:54 AM
PlinyElder, 0 means it was a success! If you compare your result "sDB" with the InstallShield constant "ISERR_SUCCESS", they should be the same. HTH
... View more
May 07, 2015
07:39 AM
Amarjeet, [LIST=1] Does your NETFRAMEWORK452 property have a default value? (Under "Behavior and Logic" -> "Property Manager") This logic probably won't work NETFRAMEWORK452>="#379893" because #379893 is being treated as a text string, not a number HTH
... View more
May 07, 2015
07:25 AM
PlinyElder, You should be able to connect with SQLRTConnect2: http://helpnet.installshield.com/installshield18helplib/mergedProjects/installshield18langref/LangrefSQLRTConnect2.htm http://helpnet.installshield.com/installshield18helplib/SQLRTSupport.htm HTH
... View more
May 07, 2015
07:16 AM
GambleR, You may need to create a custom DLL and call it to get the DiscID. Perhaps this is worth looking into: https://msdn.microsoft.com/en-us/library/windows/desktop/dd376432%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/dd376453%28v=vs.85%29.aspx HTH
... View more
Apr 22, 2015
08:14 AM
RatBoyGL, If you have an InstallScript project, you could try something like this: LaunchAppAndWait( WINSYSDIR ^ "cmd.exe", "/c " + WINDIR ^ "Microsoft.NET" ^ "Framework" ^ "v4.0.30319" ^ "RegAsm.exe /Codebase " + YOUR_PATH, WAIT | LAAW_OPTION_HIDDEN ); http://helpnet.flexerasoftware.com/installshield19helplib/Subsystems/installshield19langref/helplibrary/LaunchApplication.htm http://lifehacker.com/256474/pipe-commands-to-cmdexe-with-switches http://helpnet.flexerasoftware.com/installshield19helplib/Subsystems/installshield19langref/helplibrary/LangrefLaunchAppAndWait.htm HTH
... View more
Mar 16, 2015
02:52 PM
Dave, While editing your Setup.rul file, you should be able to click the left dropdown menu (which might have "Initialization" selected) to "Before Move Data", then in the second dropdown, select "OnMaintUIBefore" and it will be added to your script if it is not already there. Same goes for "OnMaintUIAfter" HTH
... View more
Mar 11, 2015
12:41 PM
I am unable to get that script to compile as written, but in regards to the SupervisorRelay() function, it looks like you are missing either a CreateFile() or OpenFile() call before your WriteLine() "The WriteLine function writes a line of text to a text file opened in append mode. You must first set the file mode to append mode with OpenFileMode, and then either create the file with CreateFile, or open the file with OpenFile, before calling WriteLine. This function places the line at the end of the file." source: http://helpnet.flexerasoftware.com/installshield19helplib/Subsystems/installshield19langref/helplibrary/LangrefWriteLine.htm HTH
... View more
Jan 13, 2015
08:22 AM
Jagadish, If I had to guess, I would say the computer's current timezone information probably comes from: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation HTH
... View more
Dec 12, 2014
09:23 AM
Is this what you are looking for? https://flexeracommunity.force.com/customer/articles/en_US/HOWTO/Q111053 HTH
... View more
Latest posts by ch_eng
Subject | Views | Posted |
---|---|---|
3499 | May 07, 2019 08:48 AM | |
1556 | Feb 28, 2018 12:33 PM | |
1615 | Nov 16, 2017 09:57 AM | |
2059 | Oct 02, 2017 11:53 AM | |
2059 | Oct 02, 2017 10:30 AM | |
2792 | Sep 19, 2017 09:52 AM | |
5673 | Sep 18, 2017 10:46 AM | |
1184 | Sep 18, 2017 09:40 AM | |
836 | Apr 18, 2016 09:01 AM | |
1512 | Mar 10, 2016 09:31 AM |
Activity Feed
- Got a Kudo for Re: Editing InstallScript files in Notepad++. Jun 22, 2022 10:49 AM
- Posted Re: UseDLL to load 64bit dll on InstallShield Forum. May 07, 2019 08:48 AM
- Posted Re: How to use Date Property in InstallScript on InstallShield Forum. Feb 28, 2018 12:33 PM
- Posted Re: Change font color in the install dialogue boxes on InstallShield Forum. Nov 16, 2017 09:57 AM
- Posted Re: How to link to the installation media on InstallShield Forum. Oct 02, 2017 11:53 AM
- Posted Re: How to link to the installation media on InstallShield Forum. Oct 02, 2017 10:30 AM
- Posted Re: How to create a random password using install script on InstallShield Forum. Sep 19, 2017 09:52 AM
- Posted Re: MsiGetProperty and MsiSetProperty help on InstallShield Forum. Sep 18, 2017 10:46 AM
- Posted Re: Install Windows Service with dynamic name (name taken from dialog box during install) on InstallShield Forum. Sep 18, 2017 09:40 AM
- Posted Re: Text File Replace and a Read Only File... on InstallShield Forum. Apr 18, 2016 09:01 AM
- Posted Re: JS files not getting upgraded which are Dynamically linked using IS2015 on InstallShield Forum. Mar 10, 2016 09:31 AM
- Posted Re: How to Execute Stored Procedure on InstallShield Forum. Feb 05, 2016 03:52 PM
- Posted Re: how to handle & symbol in LaunchAppAndWait on InstallShield Forum. Jan 12, 2016 09:58 AM
- Posted Re: Where can I download SP1 for Install Shield 2015? on InstallShield Forum. Sep 21, 2015 08:18 AM
- Posted Re: How to find a string in Specific Position on InstallShield Forum. Sep 10, 2015 01:04 PM
- Posted Re: Uninstall tasks related question for InstallScript MSI project. on InstallShield Forum. Aug 21, 2015 07:36 AM
- Posted Re: SQL Database Connection Test... on InstallShield Forum. Aug 17, 2015 12:25 PM
- Posted Re: SQL Database Connection Test... on InstallShield Forum. Aug 14, 2015 03:35 PM
- Posted Re: SQL Database Connection Test... on InstallShield Forum. Aug 14, 2015 10:24 AM
- Posted Re: SQL Database Connection Test... on InstallShield Forum. Aug 14, 2015 07:45 AM
Contact Me
Online Status |
Offline
|
Date Last Visited |
May 07, 2019
09:22 AM
|