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.
JimmiLee
Level 6
- Revenera Community
- :
- About JimmiLee
Aug 05, 2009
04:46 AM
This is a 32bit normal MSI project that must install on Server 2003 or 2008... I use the following code to copy a file to MSCRM: ********************************************* function CopyDLLtoCRM(hMSI) STRING strSourceDir, strTargetDir, strSourceFileName, strTargetFileName; NUMBER nvSize; begin //Get target directory from MSI constant nvSize = 512; MsiGetProperty(ISMSI_HANDLE, "CRMINSTALLDIR", strTargetDir, nvSize); //Set source directory strSourceDir = INSTALLDIR; //Copy file = microsoft.crm.sdk.dll strSourceFileName = strSourceDir + "\\microsoft.crm.sdk.dll"; strTargetFileName = strTargetDir + "\\microsoft.crm.sdk.dll"; if(CopyFile (strSourceFileName, strTargetFileName) < 0) then MessageBox ("There was an error copying the file Microsoft.Crm.Sdk.Dll to the MSCRM Installation. \n" + "refer to the manual on how to do this manually." + svTemp, INFORMATION); endif; end; ********************************************* I can copy the file, but when uninstalling, I think it is removing it and that causes MSCRM to stop working - how do I prevent it from removing this file?
... View more
Labels
- Labels:
-
InstallShield 2009
Aug 05, 2009
03:18 AM
Am trying this out later today . . . *************** Edit: Works like a charm - once again, many thanx 🙂
... View more
Aug 04, 2009
05:59 AM
Ok, first of all, this is a 64bit project (though I'm creating a 32bit version as well) that I'm trying to get to run on Server 2003 and 2008. I need to retrieve the installation directory of Microsoft Dynamics CRM 4.0, both for later installation procedures, but also to determine if it is installed or not. However, RegDBGetKeyValueEx keeps returning an error, even though the key exists in the registry! My code snippet: ************************************** #define REGISTRY_FOLDER "SOFTWARE\\Microsoft\\MSCRM" #define REGISTRY_ENTRY "CRM_Server_InstallDir" function SetPathFromRegistry(hMSI) STRING strRegistryValue, strTemp, CrmID, szTemp; NUMBER nvSize, nValueType, nResult; begin RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE); if(RegDBGetKeyValueEx ( REGISTRY_FOLDER, REGISTRY_ENTRY, nValueType, strRegistryValue, nvSize) < 0) then MessageBox ("MS CRM 4.0 is not installed on this Server! Aborting Installation...", SEVERE); abort; else // Assign the path (with extra sub path) to the global CRMINSTALLDIR strRegistryValue = strRegistryValue + "\\CRMWeb\\bin"; MsiSetProperty(ISMSI_HANDLE, "CRMINSTALLDIR", strRegistryValue); endif; end; ************************************* RegDBGetKeyValueEx keeps returning a very high negative number (minus 2xxxxxxxx something). I tried using this code as well, courtesy of this community, to see what this would return: ************************************* function CheckRequirements() NUMBER nReturn; NUMBER nControl; STRING svRegKey; begin RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE); svRegKey = "SOFTWARE\\Microsoft\\MSCRM"; if (RegDBKeyExist(svRegKey) < 0) then MessageBox(svRegKey + "\n\n Does Not Exist",SEVERE); else SprintfBox(INFORMATION,"Key Exists","%s",svRegKey); endif; end; ************************************* But I get exact same issue, that the key doesn't exist! What am I doing wrong??? Thanx . . . Edit: The oddest thing is, I just tried to test a 32bit version and it seemed to work! So tomorrow I will go through the 32bit project and see if there are any differences or possibly just test it and convert it to 64bit...
... View more
Labels
- Labels:
-
InstallShield 2009
Apr 21, 2009
01:32 AM
No worries - I like to help whenever I can, to give back the help I got from this commmunity . . .
... View more
Apr 21, 2009
01:07 AM
As I wrote in the first post, I initially tried scripting it with ServiceAddService and ServiceStartService, but when testing on server 2003 and 2008 I couldn't get it to work, so to be honest I don't know how to solve this one with installscript . . . Personally, I only use installscript when the Installation Designer fails me, so I'm not much of an Installscript Guy I'm afraid . . . Do share the solution if you find it though and good luck . . .
... View more
Apr 21, 2009
12:03 AM
Ok, I will give you a more detailed guide in how to do this. Remember, this is a basic MSI project... Installing the Service: In the Installation Designer, pick Organizations->Components and in the main window right click components and pick Components Wizard. IS2009 will ask you if you want to associate the new component with a wizard now - I usually do this manually after creating the component, but it's up to you. 1. Once you continue the wizard, in the first window choose: "Let me select a type and define the component myself"... 2. In the second window, name the component and select "Install NT Service". 3. In this window, browse to your service executable - it's usually an exe file. Notice that this file will be copied to the root of your installation directory on the target machine. Click Add and the service will be added - then name the service. 4. In the fourth window give it a display name and possibly arguments. Furthermore choose whether it should run in its own process or with others - if you're unsure, choose it's own process! 5. In the fifth window you can set how the service should start up and if this works for you, there's no need to create the start service component, however, it didn't for me, so I had to - you can test and check first . . . 6. In the sixth window you can set load ordering and dependencies - it's rarely needed . . . 7. Then there's error control - I usually choose display a message box and then continue . . . 8. In this eight window, I always go with local account . . . And you're done . . . Starting the Service: In the Installation Designer, pick Organizations->Components and in the main window right click components and pick Components Wizard. IS2009 will ask you if you want to associate the new component with a wizard now - I usually do this manually after creating the component, but it's up to you. 1. Once you continue the wizard, in the first window choose: "Let me select a type and define the component myself"... 2. In the second window, name the component and select "Control NT Service". 3. In the third window, choose the service. 4. In the fourth window, select "Start the Service" . . . 5. In the fifth, select stop and delete the service (OBS depends on your MSI). 6. In both installation and uninstallation I choose to wait for the service . . . And you're done . . . Hope this helps ...
... View more
Mar 23, 2009
06:26 AM
Thanx mate, that worked - setting them under the advanced tab that is . . . However, one of the settings has to be set to [TARGETDIR]Organization.config This works, except that instead of the actual target dir it just sets it to C:\Organization.config so I figure the target dir, at the time when the XML thingie runs, contains a wrong argument . . . Looks like I'll have to make an installscript that sets a different global (TARGETDIR2) or whatever, after the user has defined this dir . . . Or ? ? ?
... View more
Mar 09, 2009
10:55 PM
I'm using a Basic MSI Project. I have a web.config whereing I need to put some paths, defined during run time by the user. The problem is that the built in XML editor can't do the job, as each of the paths I need to change are between a pair ov value tags like this: URL to be changed If I load the xml file into the editor and tell it to change the value attribute, it basically changes it to: URL to be changed So it simply adds a value with the new URL inside the first tag . . . I'm thinking I could read in the text from the xml file somehow, alter it and then write it back - basically doing some sort of text editing in an install script, but I'm not sure how, so if anyone can pinpoint me to a solution, feel fere to do so 🙂
... View more
Labels
- Labels:
-
InstallShield 2009
Mar 07, 2009
01:39 AM
Not sure if that question was directed towards me, bu my solution works on both Server 2003 and Server 2008 - never tried on Windows XP though . . .
... View more
Mar 05, 2009
02:25 AM
You need the site number as well - I've never tried setting it up with the IP. What I do, is I run a VBS script that fetches the Site number and port and puts them in two global variables I've made in the property manager - CRMSITEPORT and CRMSITENUMBER . . . Then in the Internet Information Services window in the install designer, I put [CRMSITEPORT] in the port number of the website and [CRMSITENUMBER] in the site number . . . See the attachment for my VBS script - it should be stored in a binary in custom actions ... I didn't write all of the script myself, but took bits and pieces from David Wangs script here: http://blogs.msdn.com/david.wang/archive/2005/07/13/HOWTO_Enumerate_IIS_Website_Configuration.aspx BTW. I still set IISPREFERLEGACY to 1, as otherwise it puts the VD in the root of a website (and in my installation it should be in a subfolder).
... View more
Mar 04, 2009
10:59 PM
Since the installation folder of the 3 files I need to copy (and then delete on uninstallation) is inside another application: [MSCRM installation path]/CRMWeb/bin I made a script that reads this path from the registry and puts it in a global CRMINSTALLDIR, however, I don't know how to put this global (path) as a directory in the Files and Folders view - figured if I could create a predefined folder named [CRMINSTALLDIR] and then simply create the /CRMWeb/bin structure underneath, but haven't figured out how to do this just yet . . .
... View more
Mar 04, 2009
10:39 PM
So I basically make a function (DeleteDLLs) and instead of checking for MAINTENANCE, I simply put it in a Custom Action that runs after MaintenanceWelcome, which should only exist in an uninstallation - I'll try that straight away 🙂 That didn't work - it runs the deletion of files in both the installation and the uninstallation, albeit before the copying of the files. However, since it also runs the copying in both the installation and uninstallation, in the uninstallation it then first delets them and then copies them back - what the . . . Although if I uninstall by double clicking the MSI package (as opposed to going through control panel -> programs and features) and choosing remove, it only deletes them, without copying them back . . . However, there should be some kind of condition that would allow me to do this properly...
... View more
Latest posts by JimmiLee
Subject | Views | Posted |
---|---|---|
730 | Aug 05, 2009 05:38 AM | |
1571 | Aug 05, 2009 04:46 AM | |
1236 | Aug 05, 2009 03:18 AM | |
3588 | Aug 04, 2009 05:59 AM | |
2117 | Apr 21, 2009 01:32 AM | |
2117 | Apr 21, 2009 01:07 AM | |
2117 | Apr 21, 2009 12:03 AM | |
1796 | Mar 24, 2009 02:53 AM | |
1796 | Mar 23, 2009 06:26 AM | |
4320 | Mar 09, 2009 10:55 PM |
Activity Feed
- Posted Thanx . . . on InstallShield Forum. Aug 05, 2009 05:38 AM
- Posted Installing/copying a file, but not uninstalling it on uninstallation? on InstallShield Forum. Aug 05, 2009 04:46 AM
- Posted Thanx mate . . . on InstallShield Forum. Aug 05, 2009 03:18 AM
- Posted RegDBGetKeyValueEx returning Error even though key exists!!! on InstallShield Forum. Aug 04, 2009 05:59 AM
- Posted Well . . . on InstallShield Forum. Apr 21, 2009 01:32 AM
- Posted Well . . . on InstallShield Forum. Apr 21, 2009 01:07 AM
- Posted Using component wizard to install and start a service -> on InstallShield Forum. Apr 21, 2009 12:03 AM
- Posted Heh :) on InstallShield Forum. Mar 24, 2009 02:53 AM
- Posted Thanx . . . on InstallShield Forum. Mar 23, 2009 06:26 AM
- Posted XML Editing . . . on InstallShield Forum. Mar 09, 2009 10:55 PM
- Posted Ehm . . . on InstallShield Forum. Mar 07, 2009 01:39 AM
- Posted Site number . . . on InstallShield Forum. Mar 05, 2009 02:25 AM
- Posted Tried something else . . . on InstallShield Forum. Mar 04, 2009 10:59 PM
- Posted Hmm - good idea . . . on InstallShield Forum. Mar 04, 2009 10:39 PM
- Posted Sorry - forgot that info . . . on InstallShield Forum. Mar 04, 2009 08:12 PM
- Posted MAINTENANCE is 1, even on first install! on InstallShield Forum. Mar 04, 2009 04:32 AM
- Posted Specify? on InstallShield Forum. Mar 04, 2009 04:01 AM
- Posted Thanx Josh . . . on InstallShield Forum. Mar 04, 2009 01:56 AM
- Posted Thanx . . . on InstallShield Forum. Mar 03, 2009 10:42 PM
- Posted Creating a folder in a Website, but NOT an application! on InstallShield Forum. Mar 02, 2009 04:41 AM
Contact Me
Online Status |
Offline
|
Date Last Visited |
Mar 18, 2019
12:11 PM
|