Hostotosto

May 21, 2012 at 12:58 PM

Hello

I am having difficulty installing the SDK to express, it would take a tutorial that explains step by step installation.

Can you help?

thanks

Coordinator
May 21, 2012 at 2:09 PM

There's a section in the documentation called Developing with Visual Studio that has steps.  It's under Network Monitor API/Introduction to the Network Monitor API/Developing with Visual Studio.  If that doesn't work for you, please let me know the specific issue you are running into.

Thanks,

Paul

May 21, 2012 at 6:02 PM

I started following written documentation in the file for writting experts Monitor.docx Network, I'm a bit 'confused, I'm using Microsoft Visual C + + 2010 Express.

The main project file and the following:

Netmontestexpert.ccp

# include "stdafx.h"
# include "Form1.h"

using namespace Netmontestexpert;

[STAThreadAttribute]
int main (array ^ args <System::String ^>)
{
/ / Enable visual effects to create the first Windows VISTA controls
EnableVisualStyles :: Application ();
Application :: SetCompatibleTextRenderingDefault (false);

/ / Create the main window and run
Application :: Run (gcnew Form1 ());
return 0;
}

May 21, 2012 at 6:30 PM
[$AUTHOR$] wrote:

I started following written documentation in the file for writting experts Monitor.docx Network, I'm a bit 'confused, I'm using Microsoft Visual C + + 2010 Express.

The main project file and the following:

Netmontestexpert.ccp

# include "stdafx.h"
# include "Form1.h"

using namespace Netmontestexpert;

[STAThreadAttribute]
int main (array ^ args ing ^>)
{
/ / Enable visual effects to create the first Windows VISTA controls
EnableVisualStyles :: Application ();
Application :: SetCompatibleTextRenderingDefault (false);

/ / Create the main window and run
Application :: Run (gcnew Form1 ());
return 0;
}

 

Coordinator
May 21, 2012 at 7:01 PM

Are you getting an error you can report?  Can you build one of the examples included in the help?  Maybe that's the best place to start.

Paul

May 21, 2012 at 7:29 PM

1> ------ Start compilation: Project: Netmontestexpert, Configuration: Debug Win32 ------
1> LINK: fatal error C1308: C: \ Users \ PC-NOEMI \ Documents \ ExpertMSI \ QGUID.exe: link assembly is not supported
1> LINK: fatal error LNK1257: code generation failed
========== Build: 0 succeeded, 1 failed, 0 up to date, 0 skipped ==========

Coordinator
May 21, 2012 at 8:13 PM

Are you trying to build the solution included with the SDK?  Do you have all of the prereqs installed (like Wix2.0 and Pearl)? Did you also build QGUID.exe using the supplied .cs file?

May 21, 2012 at 8:18 PM

I installed both perl wix2.0 but I can not create the expert sdk.

Help me please

Coordinator
May 21, 2012 at 8:21 PM

You need to build QGUID.exe as well, or supply your won GUID generation program.  Thre's a simple QGUID.CS file which you can use to create one if you don't have one alreayd.  Once you've built this file, copy to the ExpertMSI directory.

May 21, 2012 at 8:35 PM

I opened the file QGUID.cs with visual studio 2010 is located in the directory
expertMSI

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QGUID
{
     class Program
     {
         static void Main (string [] args)
         {
             Console.WriteLine (Guid.NewGuid (). ToString ());
         }
     }
}

Now as I create it?

Coordinator
May 22, 2012 at 3:11 PM

Just create a simple console project.  Replace the Program.cs file with this one in the solution.  Then build the version that matches your platform (x86 or x64).  You can build the release version.  Then copy that to the ExpertMSI directory.

Paul

May 22, 2012 at 7:00 PM

Paul, I can send you the file Program.cs compiled with the new solution?

Coordinator
May 22, 2012 at 7:42 PM

Why do you want to send me Program.cs.  Were you not able to build QGUID.exe?  What is the issue you are having regarding that?

Jun 7, 2012 at 2:38 PM

Hello Paul,
 
How do you create using the ProductID guidgen.exe

thanks

Coordinator
Jun 7, 2012 at 2:43 PM

Are you asking how you create a GUID using QGUID?  Or are you asking how to build QGUID?  If you are running into an issue can you describe what is happening?

Thanks,

Paul

Jun 7, 2012 at 3:11 PM

I try to compile the file "expert.wxs" I occore generate a productid through guidgen.exe

Thanks,

Jun 8, 2012 at 3:07 PM

Hello Paul
a
Sorry if I make too many questions, help me to define the variables in the Expert.wxs?

However, this is an Expert Microsoft Network Monitor

<? Xml version = "1.0" encoding = "utf-8"?>
<Wix Xmlns="http://schemas.microsoft.com/wix/2006/wi">

  
<! -
  
  
This file is best viewed in Visual Studio.
  
  
In the 'Properties' window, set the "Schemas" property to "wix.xsd" Which
  
Should be checked in next to this file. That will allow VS to validate
  
your changes to this file and give helpful tooltips about the scheme.
  
  
Full documentation can be found at WIX http://wix.sourceforge.net/index.html
  
or http://wix.sourceforge.net/manual-wix2/wix_index.htm
  
  
The following environment variables must be prior to September compiling this file:
    
  
SetupSourcePath fully qualified path to a folder containing all of the setup
                  
files (. WXi. WXS. bmp,. ico)
                  
  
ExpertVersion Version string in the form: MAJOR.MINOR.BUILD.REVSION

  
ExpertProductVersion Version string in the form: major.minor
  
  
TargetNetmonVersion Version of Netmon That Is required for this expert
                        
in the form: MAJOR.MINOR.BUILD.REVSION | any
  
  
ProductID GUID value. You can create one or use uuidgen. Using the value
                  
'???? -?? -?? -?? -??????' will cause a new guid to be
                  
generated for you Each time this file is compiled.
                  
See http://msdn.microsoft.com/en-us/library/aa370854 (VS.85). Aspx
  
  
PackageID GUID value. You can create one or use uuidgen. Using the value
                  
'???? -?? -?? -?? -??????' will cause a new guid to be
                  
generated for you Each time this file is compiled.
                  
See http://msdn.microsoft.com/en-us/library/aa370568 (VS.85). Aspx
  
  
UPGRADECODE GUID value.
                  
This ID tells the installer how to handle already installed versions of this product. The 'Id' value Should
                  
Unless not be changed to co-exist with version Should a calculated previously released version.
                  
See http://msdn.microsoft.com/en-us/library/aa372375 (VS.85). Aspx
                    
  
PlatformID x86 | amd64 | ia64
                  
Identifies the processor type That the expert can run on
                  
  
ExpertName Short name for the expert
  
  
Manufacturer Name of the company That produced the expert
  
  
UpdatePath Flag Indicating Whether the expert installation folder Should be added to the
                  
system path. Values ​​are 0 or 1.
  
  
->

    
<! - This is the short version string in the form major.minor <? Define ProductVersion = "$ (env.ProductVersion)"?> ->
  
<? Define ProductVersion = "$ (env.ProductVersion)"?>
    
  
    
<! - These are for the product identifiers That Are Displayed to the user <? Define ProductName = "$ (env.ProductName)"?> ->
  
<? Define ProductName = "$ (env.ProductName)"?>
    
    
<! - Since this source will be used to build multiple architectures, define macros to make it generic ->
    
<? If $ (env.PlatformID) = x86?>
    
<? Define Platform = Intel?>
    
<? Define PFFolder = ProgramFilesFolder?>
    
<? Define sysFolder = SystemFolder?>
    
<? Define Win64State = no?>
    
<? Elseif $ (env.PlatformID) = amd64?>
    
<? Define Platform = x64?>
    
<? Define PFFolder = ProgramFiles64Folder?>
    
<? Define sysFolder = System64Folder?>
    
<? Define Win64State = yes?>
    
<? Elseif $ (env.PlatformID) = ia64?>
    
<? Define Platform = Intel64?>
    
<? Define PFFolder = ProgramFiles64Folder?>
    
<? Define sysFolder = System64Folder?>
    
<? Define Win64State = yes?>
    
<? Endif?>

    
<! - Root tag for the package ->
    
<Product Id = "$ (env.productID)" UpgradeCode = "$ (env.UPGRADECODE)" Version = "$ (env.ExpertVersion)" Manufacturer = "$ (env.Manufacturer)" Name = "$ (var.ProductName ) $ (var.ProductVersion) "Language =" 1033 ">

        
<Package Id = "$ (env.packageID)" Keywords = "Installer, $ (var.ProductName)" Platforms = "$ (var.Platform)" InstallerVersion = "200" Compressed = "yes" Description = "$ (var . ProductName) EXPERT SDK C $ (var.ProductVersion) 1.0.123.1 Installer Package "Comments =" Creating a $ (var.ProductName) EXPERT C SDK Installer database "/>

        
<Media Id="1" DiskPrompt="$(var.ProductName) $(var.ProductVersion) Installer Disk-1" Cabinet="Expert.cab" EmbedCab="yes" VolumeLabel="ExpertDB1" />

        
<! - Pre-install conditions ->

        
<Upgrade Id="$(env.UPGRADECODE)">
            
<! - This tells the installer to remove any older version That Is The One That being installed ->
            
<UpgradeVersion Property="OLDVERFOUND" RemoveFeatures="All" IncludeMaximum="yes" Maximum="$(env.ExpertVersion)" />

            
<! - This tells the installer to detect When a newer version exists That the one being installed ->
            
<UpgradeVersion Property="NEWVERFOUND" OnlyDetect="yes" IncludeMinimum="no" Minimum="$(env.ExpertVersion)" />
        
</ Upgrade>

        
<! - Checks for the appropriate version of Netmon That Should wor with the expert ->
        
<condition Message="You must install a compatible version of Microsoft Network Monitor before installing this package ([TARGETNETMONVERSION])."> <! [CDATA [(REMOVE <> "") OR (TARGETNETMONVERSION = "any") OR (INSTALLEDNETMONVERSION <> "")]]> </ Condition>

        
<condition Message="The version of Netmon installed on this computer is not compatible with this package."> <! [CDATA [(REMOVE <> "") OR (TARGETNETMONVERSION = "any") OR (INSTALLEDNETMONVERSION TARGETNETMONVERSION =))] ]> </ Condition>

        
<! - Checks for an appropriate operating system ->
        
<condition Message="This application only runs on Windows XP and above.">
      
VersionNT VersionNT OR = 501 = 502 OR (VersionNT> = 600 AND WindowsBuild> = 5520)
    
</ Condition>

    
<! -
    
Only 32bit on 64bit OS installer will fail on this check. Installer 64bit on 32bit OS
    
even point will not come to this stage (the Platform will be killed by check)
    
->
        
<condition Message="This installer is only for Windows operating 32-bit systems. Please use the installer for your 64-bit system."> <! [CDATA [(Intel AND NOT AND VersionNT64 MSIArch = "x86") OR (Msix64 properties AND MSIArch = "amd64") OR (AND Intel64 MSIArch = "ia64")]]> </ Condition>

        
<! - End of pre-install conditions ->


        
<! - Property definitions ->
        
<Property Id="ARPPRODUCTICON"> $ (env.SetupSourcePath) \ expert.ico </ Property>
        
<Property Id="MSIArch"> $ (env.PlatformID) </ Property>

        
<! - That Netmon Version of this expert is compatible with ->
        
<Property Id="TARGETNETMONVERSION"> $ (env.TargetNetmonVersion) </ Property>

        
<! - Receives the version of the installed edition of Netmon (if any) ->
        
<Property Id="INSTALLEDNETMONVERSION" Secure="yes">
            
<RegistrySearch Id="NetmonVersionSearch" Root="HKLM" Key="Software\Microsoft\Netmon3" Name="NetmonVersion" Type="raw" Win64="$(var.Win64State)" />
        
</ Property>

        
<Property Id="ExpertName" Value="$(var.ProductName)" />
        
<Property Id="DiskPrompt" Value="$(var.ProductName) Installation [1]" />

        
<! - End of property definitions ->

        
<! - Custom actions ->
        
<! - The user INFORMS That A newer version of the expert is Already on the system ->
        
<CustomAction Id = "AlreadyUpdated" Error = "A newer version of $ (env.ExpertName) is already installed on your machine. Please uninstall your current version before installing any older versions." />
        
<CustomAction Id = "DeleteExpertRegistry" Directory = "TARGETDIR" ExeCommand = "reg.exe delete HKLM \ Software \ Microsoft \ Netmon3 \ Experts \ $ (env.UPGRADECODE) / f" Execute = "deferred" Impersonate = "yes" Return = "ignore" />
        
<CustomAction Id = "DeleteExpertSettings" Directory = "TARGETDIR" ExeCommand = "reg.exe delete HKLM \ Software \ Microsoft \ Netmon3 \ Experts \ $ (env.UPGRADECODE) / f" Execute = "deferred" Impersonate = "yes" Return = "ignore" />
        
<! - End of custom actions ->

        
<! - Files and Settings That Are available to install ->
        
<Directory Id="TARGETDIR" Name="SourceDir">
            
<Directory Id="$(var.PFFolder)" Name="PFiles">
                
<Directory Id="ExpertsFolder" ShortName="NetExp" Name="Network Monitor Experts">
                    
<! - Registry Settings ->
                    
<? Includes RegistrySettings.wxi?>

                    
<! - Files ->
                    
<? Includes ExpertFiles.wxi?>

                    
<? If $ (env.UpdatePath) = 1?>
                    
<! - Update PATH env variable ->
                    
<component Id="UpdateEnvVar" Guid="$(env.UPGRADECODE)">
                        
<Environment Id="UpdatePath" Name="PATH" Action="create" System="yes" Part="last" Value="[INSTALLDIR]" />
                    
</ Component>
                    
<? Endif?>
                
</ Directory>
            
</ Directory>
            
<! - End of ProgramFilesFolder ->

            
<Directory Id="DesktopFolder" Name="Desktop" />
        
</ Directory>
        
<! - End of files and settings That Are available to install ->

        
<Feature Id = "Complete" Title = "$ (var.ProductName)" Description = "The complete package." TypicalDefault = "install" Display = "expand" Level = "1" Absent = "disallow" InstallDefault = "local" AllowAdvertise = "no" ConfigurableDirectory = "INSTALLDIR">

            
<ComponentRef Id="ExpertRegistrySettings" />

            
<? Includes ExpertComponents.wxi?>

            
<! - Update the system path variable ->
            
<? If $ (env.UpdatePath) = 1?>
            
<Feature Id="SystemPath" Title="Update Path" Description="Add System application directory to system path" TypicalDefault="install" Level="1" InstallDefault="local" AllowAdvertise="no">
                
<ComponentRef Id="UpdateEnvVar" />
            
</ Feature>
            
<? Endif?>
        
</ Feature>

        
<InstallExecuteSequence>
            
<! - See http://msdn.microsoft.com/en-us/library/aa369500 ​​(VS.85). Aspx ->
            
<Custom Action="AlreadyUpdated" After="FindRelatedProducts"> NEWVERFOUND </ Custom>
            
<Custom Action="DeleteExpertRegistry" Before="InstallFinalize"> UPGRADINGPRODUCTCODE NOT AND REMOVE </ Custom>
            
<Custom Action="DeleteExpertSettings" Before="InstallFinalize"> UPGRADINGPRODUCTCODE NOT AND REMOVE </ Custom>
            
<RemoveExistingProducts After="InstallValidate"> OLDVERFOUND </ RemoveExistingProducts>
        
</ InstallExecuteSequence>

        
<! - Setup Wizard Dialogs ->
        
<? Includes UI.wxi?>

    
</ Product>
</ Wix>

Thanks,
Hostotosto
Coordinator
Jun 8, 2012 at 3:15 PM

You are not supposed modify the WXS file.  Did you read the "Writing Experts for Network Monitor" document in the Expert Example directory?  That might help you get further along.

Thanks,

Paul

Jun 9, 2012 at 9:49 PM

Hello Paul

I found an error in the file expertexample.csproj <NoWin32Manifest> true </ NoWin32Manifest> going on with the mouse in the box shows the message element "PropertyGroup" namespace http://schemas.microsoft.com/developer/msbuild / 2003 has an invalid child <NoWin32Manifest> true </ NoWin32Manifest> line 16 column 5.

Coordinator
Jun 11, 2012 at 3:27 PM

I'm able to build the expert with both VS2008 and VS2010.  I simply opened the Solution and built the project.  Everything compile without any errors.

Can you provide me the steps you took to get to this point? 

Thanks,

Paul

Jun 11, 2012 at 4:09 PM

Thanks,

 

Hostotosto

Jun 11, 2012 at 4:20 PM

Hello Paul

I started using CreateExpertInstaller, the following error:
The syntax of the file name, directory or volume and incorrect.
Expert.wxs
C: \ users \ PC-NOEMI \ Documents \ Expertmsi \ Expert.wxs (55): fatal error CNDL0023: undefined environment variable: $ (env.ProductVersion).

Error: unable to compile source files WIX

 

Thanks,

 

Hostotosto

Coordinator
Jun 12, 2012 at 5:52 PM

Keep in mind that you can use LaunchMSIBuilder to call CreateExpertInstaller which might be a simpler option.  The example in the SDK uses this option so you can use that as a reference.

What command line parameters did you send CreateExpertInstaller?

Paul

Jun 12, 2012 at 9:00 PM

Hello Paul

From the start menu cmd right click run as administrator, the path c: \ users \ pc-noemi \ documents \ expertmsi> CreateExpertInstaller without any parameter

Thanks,

 

Hostotosto

Coordinator
Jun 13, 2012 at 1:51 PM

CreateExpertInstaller requires many parameters to run.  It's job is to take an executable, help file, version info, and create an MSI.  I would recommend you use the LaunchMSIBuilder instead.  There is a Settings.txt file that is described in the Writing Experts for Network Monitor.docx that has the details.

Jun 13, 2012 at 2:31 PM

Hello Paul

I already added the necessary parameters Setting.txt but continues to give me the same error

thanks

Hostotosto

Coordinator
Jun 13, 2012 at 2:35 PM

Can you provide all the steps you take each time you reply?  It's unclear to me exactly what you mean by the above because from the context before you are talking about CreateExpertInstaller.  Settings.txt is for LaunchMSIBuilder, and it also requires parameters to run.  An example of this is in the build steps of the SDK example solution.

I would prefer if you started by loading the project in the SDK that we incldued and attempt to build that with Visual Studio express.  Hopefully you can do this without making any changes.  Can you test this out first and if it doesn't work report the first few error you get?

Thanks,

Paul

Jun 13, 2012 at 3:28 PM

Hello Paul

Then, I opened Visual Studio 2008 I have uploaded the file Expertexample.sln
in exploring solutions we have the following files:
Expertexample
property
  Assemblyinfo.cs
references
  System
Commandline
  Commanlinearguments.cs
msi empty
Expert.ico
NetmonApi.cs
Program.cs
Setting.txt
Now compile the project x86
This and the output
C: \ Windows \ Microsoft.NET \ Framework \ v3.5 \ Csc.exe / noconfig / unsafe + / nowarn: 1701.1702 / platform: x86 / errorreport: prompt / define: DEBUG, TRACE / main: ExpertExample.Program / ​​reference : C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ System.dll / debug + / debug: full / filealign: 512 / nowin32manifest / out: obj \ x86 \ debug \ ExpertExample.exe / target: exe CommandLine \ CommandLineArguments . cs "C: \ Program Files \ Microsoft Network Monitor 3 \ API \ NetmonAPI.cs" Program.cs Properties \ AssemblyInfo.cs

Building completed: 0 errors, 0 warnings
ExpertExample -> C: \ Users \ PC-NOEMI \ Documents \ ExpertExample \ bin \ x86 \ Debug \ ExpertExample.exe
cd C: \ Users \ PC-NOEMI \ Documents \ ExpertExample \
cd .. \ ExpertMSI
LaunchMSIBuilder.cmd x86 Debug "C: \ Users \ PC-NOEMI \ Documents \ ExpertExample \ settings.txt" "C: \ Users \ PC-NOEMI \ Documents \ ExpertExample \ bin \ x86 \ Debug \" "ExpertExample.exe" "C: \ Users \ PC-NOEMI \ Documents \ ExpertExample \ msi \ ExpertExample_x86.msi "
========== Build: 1 completed or updated, 0 failed, 0 skipped ==========

 

Thanks,

 

Hostotosto

Coordinator
Jun 13, 2012 at 3:30 PM

That is great, that means everything worked properly.\

So can you use this as a working example to understand and complete what you want to do?  Or do you have other questions?

Jun 13, 2012 at 3:36 PM

Paul

Did you see the output and present mistakes.
I wish I had Expertesdk in Microsoft Network Monitor 3.4
together with all the other experts.

Thanks,

Hostotosto

Coordinator
Jun 13, 2012 at 3:40 PM

The output above doesn't indicate any problems, so I think it worked.  However I don't know if the output you sent show the whole story.  But if it did work, you should have an MSI file in the MSI directory and you should be able to double click to install it.  When you are done, the expert should install into the UI.  BTW, if you are on x64, you'll have to configure VS to create an x64 version.

Did you get the resulting MSI created?

Jun 13, 2012 at 4:42 PM

Paul

In the folder is not present any msi, what I do is recompile again?

Thanks,

Hostotosto

Coordinator
Jun 13, 2012 at 6:02 PM

One other step you probably have to do is change the version to release and choose the approriate platform (x64 or x86).  Then rebuild and paste any errors that show up.  Make sure you've completed all the steps in the document referenced before.

Paul

Jun 13, 2012 at 8:07 PM

What document do you speak?

thanks

Hostotosto

Jun 13, 2012 at 8:18 PM

Hello Paul

I ran the Debug project Expertexample, gave me the following output:

The thread 0x13a4 has exited with code 0 (0x0).
'ExpertExample.vshost.exe' (Managed): Loaded 'C: \ Users \ PC-NOEMI \ Documents \ ExpertExample \ bin \ x86 \ Debug \ ExpertExample.exe', Symbols loaded.
The thread 0xcf0 has exited with code 0 (0x0).
The thread '<No Name>' (0x1368) has exited with code 0 (0x0).
The thread 0x1318 has exited with code 0 (0x0).
The thread 0x1570 has exited with code 0 (0x0).
The thread 0xda8 has exited with code 0 (0x0).
The program '[3980] ExpertExample.vshost.exe: Managed' has exited with code 0 (0x0).

thanks

Hostotosto

Coordinator
Jun 14, 2012 at 2:48 PM

The document is "Writeing Experts for Network Monitor.docx".  It appears in the ExpertExample Solution.

Running the expert doens't really do anything.   It's just an example to show you how to create an expert that integrates into the UI.

After creating the debug project, do you now have an MSI?  If not, can you create a release verison and see? 

Jun 15, 2012 at 8:11 PM

Hello Paul

I Microsoft.Common.Targhets generates this error: error MSB3073 error.
Regarding Expert.msi not create it, even if I take a punch.

Thanks,

Hostotosto

Coordinator
Jun 15, 2012 at 8:14 PM

That means the command line post-build steps returned and error.  Can you paste the contents of the output?  Did you follow all the prerequisite steps in the documentation?

Paul

Jun 15, 2012 at 8:14 PM
Hostotosto wrote:

Hello Paul

I Microsoft.Common.Targhets generates this error: error MSB3073 error.
Regarding Expert.msi not create it, even if I take a punch.

Thanks,

Hostotosto

 

Jun 20, 2012 at 3:54 PM

Hello Paul

I managed to install the expert, but it still does not appear in Microsoft Network Monitor 3.4, the menu of experts. We must take additional steps?

Thanks,

Hostotosto

Jun 20, 2012 at 3:54 PM
Hostotosto wrote:

Hello Paul

I managed to install the expert, but it still does not appear in Microsoft Network Monitor 3.4, the menu of experts. We must take additional steps?

Thanks,

Hostotosto