Recently we had to generate a guid from InstallAware script. We could not find any inbuilt command that could provide this functionality. Hence we wrote a plug-in to achieve this functionality. I am posting this code as a reference for future plug-in developers. Hope this saves some time for you.
P.S. Use the code at your own risk. Although enough testing was put in, we do not guarantee the functionality. Review the C++ code, code make sure it does what you want and compile on your own environment to make sure that the result meets your expectations.
Generate Guid Plug-In with source
Unable to post source files
Is there a limit on file size? Or posting files is prohibited?
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
The upload didn't work for you? Please email us the file and we'll post it!
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Trying to upload source file again
This is my second attempt at uploading the source file. Initial email to InstallAware team did not end up along with this post.
File Attached:
GenerateGuid.zip
File Attached:
GenerateGuid.zip
Hi,
I'm keen to see the source to give me a head-start on creating my own plug in, however, the zip files seems to have several of the projects missing:(
Also, I tried to get the install to work without the run time DLL, but I just get an exception when it first runs
Any chance you could post the full source?
Thanks,
Andy.
I'm keen to see the source to give me a head-start on creating my own plug in, however, the zip files seems to have several of the projects missing:(
Also, I tried to get the install to work without the run time DLL, but I just get an exception when it first runs
Any chance you could post the full source?
Thanks,
Andy.
Please provide the specific error message
Hello Andy,
I believe I have posted the entire source. Could you please be more specific as to what is missing - or the error message you get while opening the project in Visual Studio?
Thanks
-Vimal
I believe I have posted the entire source. Could you please be more specific as to what is missing - or the error message you get while opening the project in Visual Studio?
Thanks
-Vimal
Hi Vimal,
Thanks for the quick reply. When I load up the GenerateGuid\\VC.sln file it expects the following projects that are not there:
..\\GenerateGuidRuntimePlugIn\\GenerateGuidRuntimePlugIn.vcproj
..\\DetectDMSInstallIDEPlugIn\\DetectDMSInstallIDEPlugIn.vcproj
..\\DetectDMSInstallRuntimePlugIn\\DetectDMSInstallRuntimePlugIn.vcproj
I guess the first one is the one I'm interested in most, but I'm not sure! I presume you used VS2005 to create these? Also, what version of InstallAware are you using - 6.5? Have you tries the Plug-in with the latest (7 R2)?
Thanks for the help,
Andy.
Thanks for the quick reply. When I load up the GenerateGuid\\VC.sln file it expects the following projects that are not there:
..\\GenerateGuidRuntimePlugIn\\GenerateGuidRuntimePlugIn.vcproj
..\\DetectDMSInstallIDEPlugIn\\DetectDMSInstallIDEPlugIn.vcproj
..\\DetectDMSInstallRuntimePlugIn\\DetectDMSInstallRuntimePlugIn.vcproj
I guess the first one is the one I'm interested in most, but I'm not sure! I presume you used VS2005 to create these? Also, what version of InstallAware are you using - 6.5? Have you tries the Plug-in with the latest (7 R2)?
Thanks for the help,
Andy.
Updated file
Hi Andy,
Thanks for the specific messages. I realized that I had uploaded a solution file that included projects that were not supposed to be uploaded. I am trying to upload an updated ZIP file. Hope this works for you.
Regarding your question on version - I have tested the plug-in using ver 6.5. I have not tried this with version 7 R2. I am hoping that InstallAware will maintain backward compatibility for their plug-ins.
Let me know if this works for you.
-Vimal
File Attached:
GenerateGuid.zip
Thanks for the specific messages. I realized that I had uploaded a solution file that included projects that were not supposed to be uploaded. I am trying to upload an updated ZIP file. Hope this works for you.
Regarding your question on version - I have tested the plug-in using ver 6.5. I have not tried this with version 7 R2. I am hoping that InstallAware will maintain backward compatibility for their plug-ins.
Let me know if this works for you.
-Vimal
File Attached:
GenerateGuid.zip
Hi Vimal,
OK, downloaded it and tried to build the solution - it works, after I created the folder C:\\Program Files\\InstallAware\\InstallAware 6.5\\Plug-Ins\\Generate Guid by hand.
I then loaded up the InstallAware project and had to removed the references to the Delete* files (and their registry settings). That then builds and the setup appears to work.
So, moment of truth, I star a clean InstallAware project and go to the MSICode tab, and drag the Generate Guid plug in and drop it...and I get the following error message:
The procedure entry point RegGetValueA could not be located in the dynamic link library ADVAPI32.dll.
Any thoughts? We're real close, I think!
Thanks,
Andy.
OK, downloaded it and tried to build the solution - it works, after I created the folder C:\\Program Files\\InstallAware\\InstallAware 6.5\\Plug-Ins\\Generate Guid by hand.
I then loaded up the InstallAware project and had to removed the references to the Delete* files (and their registry settings). That then builds and the setup appears to work.
So, moment of truth, I star a clean InstallAware project and go to the MSICode tab, and drag the Generate Guid plug in and drop it...and I get the following error message:
The procedure entry point RegGetValueA could not be located in the dynamic link library ADVAPI32.dll.
Any thoughts? We're real close, I think!
Thanks,
Andy.
ADVAPI32
My code uses MFC and I don't think that should cause any trouble. MFC is statically linked into the DLL so we don't place any runtime library requirements. However, I am not sure as to why RegGetValueA should not work for you. These are standard Windows API calls. Our installer uses this plug-in and we have our product shipped to over 3000 users. I have not recieved any issues regarding the ADVAPI32 dll missing a method call. Could you tell me the version number of ADVAPI32.dll in your Windows\\System32 folder. Also which OS are you running InstallAware IDE?
Also, try this:
1. Open Visual Studio 2005 Command Prompt from Visual Studio 2005 Tools.
2. Run DUMPBIN /EXPORTS C:\\Windows\\System32\\Advapi32.dll
3. Let me know if RegGetValueA is exported from that DLL. If it is, then the problem must lie somewhere else - the error message must be misleading...
This is what I see on my Vista Business machine...
591 24E 0001C726 RegGetKeySecurity
>>> 592 24F 0001A419 RegGetValueA <<<<
593 250 0002C077 RegGetValueW
Also, try this:
1. Open Visual Studio 2005 Command Prompt from Visual Studio 2005 Tools.
2. Run DUMPBIN /EXPORTS C:\\Windows\\System32\\Advapi32.dll
3. Let me know if RegGetValueA is exported from that DLL. If it is, then the problem must lie somewhere else - the error message must be misleading...
This is what I see on my Vista Business machine...
591 24E 0001C726 RegGetKeySecurity
>>> 592 24F 0001A419 RegGetValueA <<<<
593 250 0002C077 RegGetValueW
One more thing
Andy,
Please check your registry entry to see if the following key exists and has a value in it:
HKLM\\Software\\MimarSinan\\InstallAware\\2.0\\Plug-Ins\\Generate Guid\\Execute
The value should be "GenerateGuidRuntimePlugIn.dll"
-Vimal
Please check your registry entry to see if the following key exists and has a value in it:
HKLM\\Software\\MimarSinan\\InstallAware\\2.0\\Plug-Ins\\Generate Guid\\Execute
The value should be "GenerateGuidRuntimePlugIn.dll"
-Vimal
Hi Vimal,
Thanks for the help, I've got it working! I had to re-write the registry stuff, but other than that the code does work. Now, attached is my final updated version of everything you did. I just cleaned it up a little in that it now should be easy to get to work for anybody just following these steps:
1) Unzip the file to c:\\Program Files\\InstallAware (it will create everyhting under Plug-Ins....)
2) Using VS 2005, open the VC.sln file in GenerateGuid
3) Compile everything.
4) Open NowcomInstallAwarePlugInSetup.mpr in GenerateGuidPlugInSetup
5) Build that and then run the created installer. It installs the plug-in to c:\\Program Files\\InstallAware\\NOWCOM InstallAware PlugIns.
6) Open GuidGenTest.mpr in GUIDGenTest for a (very!) simple example.
I hope you don't mind, but I wanted to get something that everyone could use and to help avoid the frustration that I'd been going through! Thanks for all you help and the code
Andy.
Thanks for the help, I've got it working! I had to re-write the registry stuff, but other than that the code does work. Now, attached is my final updated version of everything you did. I just cleaned it up a little in that it now should be easy to get to work for anybody just following these steps:
1) Unzip the file to c:\\Program Files\\InstallAware (it will create everyhting under Plug-Ins....)
2) Using VS 2005, open the VC.sln file in GenerateGuid
3) Compile everything.
4) Open NowcomInstallAwarePlugInSetup.mpr in GenerateGuidPlugInSetup
5) Build that and then run the created installer. It installs the plug-in to c:\\Program Files\\InstallAware\\NOWCOM InstallAware PlugIns.
6) Open GuidGenTest.mpr in GUIDGenTest for a (very!) simple example.
I hope you don't mind, but I wanted to get something that everyone could use and to help avoid the frustration that I'd been going through! Thanks for all you help and the code
Andy.
Return to “Plug-In Development”
Who is online
Users browsing this forum: No registered users and 2 guests