Question regarding on how to do an NDIS Driver installation using NSIS

Hi,

I am new to this listserv so if this is not the appropriate forum please
let me know. I had been tasked with the installation script with the
software my company makes. For the most part I have no issues.
Now we are making custom drivers (in the past we used third party
installers with their own installer so using an execwait command was
fine).

While the driver itself hasn’t been signed yet and I am aware of the
issues with Windows 7 x64, we are getting that handled.

But, how do I install the driver install, and how do I activate it? I
assume it will need to be activated for all network devices?

Which API do I need to make use off in order to do so? Does a system
reboot required?

I think when I ran the pnputil -a foo.inf from command prompt, it
installed it, but didn’t activate it. Like I had to manually locate it in
the device properties itself.

I think this driver is a “netfilter” I am not totally sure because I do IT
work and I just develop the software installer routine not the actual
software itself and the developers aren’t telling me much about the driver
itself.

Any advice is greatly appreciated.

Thanks.

netcfg [-v] [-e] [-winpe] [-l ] -c

-i


No idea why it’s not “active” based on what you provided. Could be any
number of things. But you should probably get some more details from the
developers because they might have created some type of activate/deactivate
scheme.

Google is also your friend
http://msdn.microsoft.com/en-us/library/windows/hardware/ff565517(v=vs.85).aspx
http://www.osronline.com/showThread.cfm?link=81194

On Thu, Sep 11, 2014 at 3:15 PM, Jonathan Weinraub <
xxxxx@ametek.com> wrote:

> Hi,
>
> I am new to this listserv so if this is not the appropriate forum please
> let me know. I had been tasked with the installation script with the
> software my company makes. For the most part I have no issues.
> Now we are making custom drivers (in the past we used third party
> installers with their own installer so using an execwait command was fine).
>
> While the driver itself hasn’t been signed yet and I am aware of the
> issues with Windows 7 x64, we are getting that handled.
>
> But, how do I install the driver install, and how do I activate it? I
> assume it will need to be activated for all network devices?
>
> Which API do I need to make use off in order to do so? Does a system
> reboot required?
>
> I think when I ran the pnputil -a foo.inf from command prompt, it
> installed it, but didn’t activate it. Like I had to manually locate it in
> the device properties itself.
>
> I think this driver is a “netfilter” I am not totally sure because I do IT
> work and I just develop the software installer routine not the actual
> software itself and the developers aren’t telling me much about the driver
> itself.
>
> Any advice is greatly appreciated.
>
> Thanks.
>
>
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Hmm ok.
Is there any API I can make use of (NSIS can make use of dll calls to
system32.dll and the alike if you’re not familiar with it)
Rather than doing execwait commands?

But I will try to find out more from them. Thanks.

From: Paul
To: “Windows System Software Devs Interest List”
Date: 11/09/2014 22:14
Subject: Re: [ntdev] Question regarding on how to do an NDIS Driver
installation using NSIS
Sent by: xxxxx@lists.osr.com

netcfg [-v] [-e] [-winpe] [-l ] -c

-i


No idea why it’s not “active” based on what you provided. Could be any
number of things. But you should probably get some more details from the
developers because they might have created some type of
activate/deactivate scheme.

Google is also your friend
http://msdn.microsoft.com/en-us/library/windows/hardware/ff565517(v=vs.85).aspx
http://www.osronline.com/showThread.cfm?link=81194

On Thu, Sep 11, 2014 at 3:15 PM, Jonathan Weinraub <
xxxxx@ametek.com> wrote:
Hi,

I am new to this listserv so if this is not the appropriate forum please
let me know. I had been tasked with the installation script with the
software my company makes. For the most part I have no issues.
Now we are making custom drivers (in the past we used third party
installers with their own installer so using an execwait command was
fine).

While the driver itself hasn’t been signed yet and I am aware of the
issues with Windows 7 x64, we are getting that handled.

But, how do I install the driver install, and how do I activate it? I
assume it will need to be activated for all network devices?

Which API do I need to make use off in order to do so? Does a system
reboot required?

I think when I ran the pnputil -a foo.inf from command prompt, it
installed it, but didn’t activate it. Like I had to manually locate it in
the device properties itself.

I think this driver is a “netfilter” I am not totally sure because I do IT
work and I just develop the software installer routine not the actual
software itself and the developers aren’t telling me much about the driver
itself.

Any advice is greatly appreciated.

Thanks.

— NTDEV is sponsored by OSR Visit the list at:
http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

— NTDEV is sponsored by OSR Visit the list at:
http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Jonathan Weinraub wrote:

I am new to this listserv so if this is not the appropriate forum
please let me know. I had been tasked with the installation script
with the software my company makes. For the most part I have no issues.
Now we are making custom drivers (in the past we used third party
installers with their own installer so using an execwait command was
fine).

While the driver itself hasn’t been signed yet and I am aware of the
issues with Windows 7 x64, we are getting that handled.

But, how do I install the driver install, and how do I activate it? I
assume it will need to be activated for all network devices?

Which API do I need to make use off in order to do so? Does a system
reboot required?

I think when I ran the pnputil -a foo.inf from command prompt, it
installed it, but didn’t activate it. Like I had to manually locate
it in the device properties itself.

I think this driver is a “netfilter” I am not totally sure because I
do IT work and I just develop the software installer routine not the
actual software itself and the developers aren’t telling me much about
the driver itself.

If you have a driver development team, it’s their responsibility to tell
you how to install it. There are several good tools for doing driver
installation, but each type of driver has its own unique quirks. I’m
not a network guy, so I don’t know what the implications of a
“netfilter” installer are. However, your team should know.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I am not familiar with what a ?netfilter? is.

Is this a NDIS6 LWF ?filter?, an NDIS5 IM ?filter?, a WFP callout ?filter?
or something altogether different?

Does this have an associated PnP INF of class ?NetService?? If so you can
install it with DIFXAPI or DIFXAPP or you can look at the BindView sample in
the WDK (or dig up the snetcfg / netcfg sample from the W2K DDK) to see how
to go about this with direct API calls.

Keep in mind that NSIS is typically run as a 32-bit process but that NETCFG
operations (or calls into DIFXAPI) must come from a ?native? process.

As Tim said, ask your driver developer. I would hope that he or she knows
at least one way to install it.

This list has a number of threads in the history regarding installing IM
filters and other NetService components with NSIS, DIFXAPI, and DIFXAPP.
I suggest you search the list archives after you get some better guidance
from the driver dev.

Good Luck,

Dave Cattley

Yes i believe it is NDIS6. It’s like winpcap does. It’s used for 10 gbps data transfers. The dev more or less says I don’t know. It’s your job to install. They’re manually doing it now. When I get back to my desk I’ll try to find more info. Thanks for the nudging in the right direction.


Sent from my iPhone

On 12 Sep 2014, at 15:03 , “Dave Cattley” wrote:
>
> I am not familiar with what a ‘netfilter’ is.
>
> Is this a NDIS6 LWF ‘filter’, an NDIS5 IM ‘filter’, a WFP callout ‘filter’ or something altogether different?
>
> Does this have an associated PnP INF of class “NetService”? If so you can install it with DIFXAPI or DIFXAPP or you can look at the BindView sample in the WDK (or dig up the snetcfg / netcfg sample from the W2K DDK) to see how to go about this with direct API calls.
>
> Keep in mind that NSIS is typically run as a 32-bit process but that NETCFG operations (or calls into DIFXAPI) must come from a ‘native’ process.
>
> As Tim said, ask your driver developer. I would hope that he or she knows at least one way to install it.
>
> This list has a number of threads in the history regarding installing IM filters and other NetService components with NSIS, DIFXAPI, and DIFXAPP. I suggest you search the list archives after you get some better guidance from the driver dev.
>
> Good Luck,
> Dave Cattley
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

> The dev more or less says I don’t know. It’s your job to install. They’re manually doing it now.

Two things.

  1. Exactly what is involved in manually installing it.

  2. Get new devs. :slight_smile:

Winpcap is an NDIS protocol. Maybe it has been updated to a LWF for NT6, not sure. Last I knew it was still an OSS project. Unless you are constrained by OSS blinders (not unreasonable) go look at it. That installer works just fine.

Regards,

Dave Cattley

It isnt much.,
But this is the info I received today.
They are based in eastern europe so there is always a time
difference/delay.

  1. Microsoft example -
    http://code.msdn.microsoft.com/windowshardware/Bindview-ec8f6e0a
    2…PCAUsa example -
    http://www.ndis.com/ndis-general/ndisinstall/programinstall.htm

The 10g driver doesn’t work with Windows 8.0, there is a bug in Windows
8.0 related to these type of drivers. The bug was fixed in Windows 8.1
So the driver works on Windows Vista, Windows 7 and Windows 8.1

It adds it as a network service in the device properties after it got
installed, when I did so, it was manually.

If I can ask them a more direct question that can aid you in aiding me,
please let me know.

Thanks!

-jon

From: Dave Cattley
To: “Windows System Software Devs Interest List”
Date: 12/09/2014 19:02
Subject: RE: [ntdev] Question regarding on how to do an NDIS Driver
installation using NSIS
Sent by: xxxxx@lists.osr.com

> The dev more or less says I don’t know. It’s your job to install.
They’re manually doing it now.

Two things.

1. Exactly what is involved in manually installing it.
2. Get new devs. J

Winpcap is an NDIS protocol. Maybe it has been updated to a LWF for NT6,
not sure. Last I knew it was still an OSS project. Unless you are
constrained by OSS blinders (not unreasonable) go look at it. That
installer works just fine.

Regards,
Dave Cattley


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Does the component have an INF file? What class (look for Class= … ) is it? Net, NetService, NetTrans, NetClient, something else?

For NetService, NetTrans, and NetClient then look at the BindView sample or use DIFXAPI (or DIFXAPP if you are installing from an MSI package). Or if you just want to exec some command line that will work use NETCFG.EXE (inbox utility on Vista+)

netcfg [-v] [-e] [-winpe] [-l ] -c

-i

-winpe installs TCP/IP, NetBIOS and Microsoft Client for Windows preinstallation envrionment
-l provides the location of INF
-c provides the class of the component to be installed (p == Protocol, s == Service, c == Client)
-i provides the component ID

The arguments must be passed in the order shown.

Examples:
netcfg -l c:\oemdir\foo.inf -c p -i foo
…installs protocol ‘foo’ using c:\oemdir\foo.inf

netcfg -c s -i MS_Server
…installs service ‘MS_Server’

OR

netcfg [-v] -winpe
Examples:
netcfg -v -winpe
…Installs TCP/IP, NetBIOS and Microsoft Client for Windows preinstallation environment

OR

netcfg [-v] -q
Example:
netcfg -q MS_IPX
…displays if component ‘MS_IPX’ is installed

OR

netcfg [-v] [-e] -u
Example:
netcfg -u MS_IPX
…uninstalls component ‘MS_IPX’

OR

netcfg [-v] -s
where,
-s\tprovides the type of components to show
\ta == adapters, n == net components
Examples:
netcfg -s n
…shows all installed net components

OR

netcfg [-v] -b
Examples:
netcfg -b ms_tcpip
…shows binding paths containing ‘MS_TCPIP’

General Notes:\n"
-v Run in verbose (detailed) mode
-e Use servicing environment variables during install and uninstall
-? Displays this help information

My question to you was how do they (the devs) install it. Do they use BindView? Do they use the NDIS.COM sample installer? Have you installed the driver manually? How do you do it?

Good Luck,

Dave Cattley

Yes it does.

Class = NetService

Unfortunately the installer is HUGE and invested too much time (amount of
lines) and at this point I rather not dedicate a lot of time in converting
it to msi/installshield. At the time, when this was more manageable the
freeness of nsis was what I needed and this project sorta snowballed when
it became my problem.

When I was playing with it earlier, I found if i had I think more than 4
services it wouldn’t let me add a fifth (the filter they made). Is this a
hard limit set by microsoft?
I assume it will be too difficult to install the filter only on 10 gbps
cards opposed to all cards?

Is there an easy way to install without using an executable?
The installer obviously already takes into account it is an admin user
installing it.
I assume there will be some sort of return code?

I am used to access the system items in nsis like this

System::Call 'shell32.dll::SHCHangeNotify(i, i, i, i) v
(${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)
Or regsvr32 style by using the nsis regdll “foo.dll”;

So if there is a way to install the driver in a similar fashion, that can
be very useful.

Otherwise, if the netcfg is the only way, then I will need to play around
with that too.

Obviously i have code that checks operating systems. I believe we are no
longer allowing XP for our software.
Windows 7 x86/x64 installs appropriate version automatically. (nothing
really gets registered in other than the system environment path and
associated files). And the x64 is just x64 bit dlls but its in the
program path, doesnt get registered nor copied to system32.

There is one version of the actual file, so i assume its 32-bit that will
get installed on 64-bit systems. They are still getting the digital
signature stuff sorted out for the x64 win 7.
Right now there is the foo.cat, foo.inf, and foo.sys.

Sorry for making this such a long winded response just trying to make sure
this is done correctly as the deadline is looming.

Thanks.

From: Dave Cattley
To: “Windows System Software Devs Interest List”
Date: 16/09/2014 12:00
Subject: RE: [ntdev] Question regarding on how to do an NDIS Driver
installation using NSIS
Sent by: xxxxx@lists.osr.com

Does the component have an INF file? What class (look for Class= … )
is it? Net, NetService, NetTrans, NetClient, something else?

For NetService, NetTrans, and NetClient then look at the BindView sample
or use DIFXAPI (or DIFXAPP if you are installing from an MSI package). Or
if you just want to exec some command line that will work use NETCFG.EXE
(inbox utility on Vista+)

netcfg [-v] [-e] [-winpe] [-l ] -c

-i


-winpe installs TCP/IP, NetBIOS and Microsoft Client for Windows
preinstallation envrionment
-l provides the location of INF
-c provides the class of the component to be installed (p ==
Protocol, s == Service, c == Client)
-i provides the component ID

The arguments must be passed in the order shown.

Examples:
netcfg -l c:\oemdir\foo.inf -c p -i foo
…installs protocol ‘foo’ using c:\oemdir\foo.inf

netcfg -c s -i MS_Server
…installs service ‘MS_Server’

OR

netcfg [-v] -winpe
Examples:
netcfg -v -winpe
…Installs TCP/IP, NetBIOS and Microsoft Client for Windows
preinstallation environment

OR

netcfg [-v] -q
Example:
netcfg -q MS_IPX
…displays if component ‘MS_IPX’ is installed

OR

netcfg [-v] [-e] -u
Example:
netcfg -u MS_IPX
…uninstalls component ‘MS_IPX’

OR

netcfg [-v] -s
where,
-s\tprovides the type of components to show
\ta == adapters, n == net components
Examples:
netcfg -s n
…shows all installed net components

OR

netcfg [-v] -b
Examples:
netcfg -b ms_tcpip
…shows binding paths containing ‘MS_TCPIP’

General Notes:\n"
-v Run in verbose (detailed) mode
-e Use servicing environment variables during install and uninstall
-? Displays this help information

My question to you was how do they (the devs) install it. Do they use
BindView? Do they use the NDIS.COM sample installer? Have you
installed the driver manually? How do you do it?

Good Luck,

Dave Cattley

NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> Class = NetService

So your options are:

  1. Write INetCfgXxx code as demonstrated in BindView (or other samples)

  2. Use a ready command line tool like NETCFG.EXE on Vista+

  3. Use DIXAPI.DLL and call it from your NSIS installer

When I was playing with it earlier, I found if i had I think more than
4 services it wouldn’t let me add a fifth (the filter they made). Is
this a hard limit set by microsoft?

Did it give you some sort of error code? Have you looked at the value of

HKLM\System\CurrentControlSet\Control\Network::MaxNumFilters ?

See: http://support.microsoft.com/kb/2530477 for some official information or search of “MaxNumFilters” and read all about everyone complaining.

I assume it will be too difficult to install the filter only on 10 gbps
cards opposed to all cards?

No, not difficult at all. You need to write a NotifyObject and have it simply decide whether or not to permit or reject a particular binding to an adapter based on whatever criterion you decide. There is a sample NotifyObject in the WDK.

Is there an easy way to install without using an executable?

No. The only way that the APIs that manipulate anything in the system, especially the Network Configuration (NETCFG) is to run an executable. Your NSIS installer is an executable right?

The installer obviously already takes into account it is an admin user
installing it.

Good because it will need to be running elevated to work.

I assume there will be some sort of return code?

From what?

I am used to access the system items in nsis like this

System::Call 'shell32.dll::SHCHangeNotify(i, i, i, i) v
(${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)
Or regsvr32 style by using the nsis regdll “foo.dll”;

Sadly I understood that line of code.

So if there is a way to install the driver in a similar fashion, that
can be very useful.

Yes, use NSIS to exec NETCFG.EXE with the appropriate command line parameters, capture the output, wait for the exit status, and hope for the best. Uninstall is similar.

Obviously i have code that checks operating systems. I believe we are
no longer allowing XP for our software.

Is the NetService an NDIS6 driver? Then it does not work on XP. Do you have a NetService that is NDIS5?

There is one version of the actual file, so i assume its 32-bit that
will get installed on 64-bit systems. They are still getting the
digital signature stuff sorted out for the x64 win 7.
Right now there is the foo.cat, foo.inf, and foo.sys.

FOO.SYS cannot possibly be made to run (same binary) on two different architectures. Your less than helpful devs have given you the x86 (32-bit) driver. You will be getting set for x64. Or alternatively (depending on the INF) you will be getting a single INF, CAT, and two SYS files.

Which brings me to re-iterate a very important point: Whatever process that eventually calls the INetCfgXXX APIs to install this driver *MUST* be running native code. So 32-bit NSIS on an x64 system making System::Call ‘blah’ just won’t do unless ‘blah’ is some DLL you write that figures out a way to ship the request off to some native (x64) helper process that actually does the work.

So if you are believing you will have a single NSIS installer that automagically figures out how to install on x86 (native) and x64 (from WOW64), you will need a scheme to run the actually install action as native code.

Here is a big hint: Imagine a 32-bit DLL that exports NSIS compatible entry points but that wraps an RPC interface to a helper EXE process (which is native code, so you have two of them) which actually makes the installer calls. DIFXAPI.DLL has a reasonable set of APIs for doing this install at a very high level but if you want ultimate control then INetCfgXXX and SETUPAPI is the lower level. I have built all of those and can tell you that after all that, I migrated to MSI as fast as I could.

Sorry for making this such a long winded response just trying to make
sure this is done correctly as the deadline is looming.

I hope that deadline planning included testing. Getting this right is notoriously time consuming and the edge cases around upgrade can be very tricky depending on your requirements.

Good Luck,

Dave Cattley

The devs install it by going into control panel and install it as a
service.

I got this from them:

B. Driver install
The new driver is a NDIS 6.0 driver, so it cannot be installed on
WindowsXP. For Vista and newer systems the steps are:

  1. Open the Network and Sharing Center Window
  2. Open a Properties window for any of the ethernet adapters, it doesn’t
    matter which one. It should look like this
  3. Press the Install… button. You should see a window like this one
  4. Select Service and pres Add…
  5. Press the Have Disk… button , browse for blarg.inf and press OK. You
    should see a window like the following one
    6.Press OK. You should see a security confirmation window like this one
    (this will go away as Jim is getting it signed today)
  6. Press Install this driver anyway
  7. If everything worked you should see the installed driver in the
    Properties window

My understanding is they have separate versions of the dll thats for x86
and x64.
Nsis automatically installs the x64 depending on which OS is automatically
detected.
The binary of the setup.exe is 32-bit regardless since it just extracts
the internal bz2 file and interprets the script to process and do what it
says.

Then obviously the uninstlal can do the inverse.

Running a system call is most likely the easiest.
I meant about return code is whether or not it reurns a value i can
capture so i can say if $ret = ( system(“netcfg -l foo.inf…”)) == 0; then
cout << “success”; else if (ret == 1) cerr << "too bad, error: " ret.foo;
or something, sorry for the silly nonsensical psuedocode
Since it just runs i may have to capture just the stdout into a var?
But regardless, this is sorta why i wanted an internal function opposed to
executable to process the driver install.

I hope this was more useful the information i provided this time.

Thanks.

Jon

From: Dave Cattley
To: “Windows System Software Devs Interest List”
Date: 16/09/2014 12:00
Subject: RE: [ntdev] Question regarding on how to do an NDIS Driver
installation using NSIS
Sent by: xxxxx@lists.osr.com

Does the component have an INF file? What class (look for Class= … )
is it? Net, NetService, NetTrans, NetClient, something else?

For NetService, NetTrans, and NetClient then look at the BindView sample
or use DIFXAPI (or DIFXAPP if you are installing from an MSI package). Or
if you just want to exec some command line that will work use NETCFG.EXE
(inbox utility on Vista+)

netcfg [-v] [-e] [-winpe] [-l ] -c

-i


-winpe installs TCP/IP, NetBIOS and Microsoft Client for Windows
preinstallation envrionment
-l provides the location of INF
-c provides the class of the component to be installed (p ==
Protocol, s == Service, c == Client)
-i provides the component ID

The arguments must be passed in the order shown.

Examples:
netcfg -l c:\oemdir\foo.inf -c p -i foo
…installs protocol ‘foo’ using c:\oemdir\foo.inf

netcfg -c s -i MS_Server
…installs service ‘MS_Server’

OR

netcfg [-v] -winpe
Examples:
netcfg -v -winpe
…Installs TCP/IP, NetBIOS and Microsoft Client for Windows
preinstallation environment

OR

netcfg [-v] -q
Example:
netcfg -q MS_IPX
…displays if component ‘MS_IPX’ is installed

OR

netcfg [-v] [-e] -u
Example:
netcfg -u MS_IPX
…uninstalls component ‘MS_IPX’

OR

netcfg [-v] -s
where,
-s\tprovides the type of components to show
\ta == adapters, n == net components
Examples:
netcfg -s n
…shows all installed net components

OR

netcfg [-v] -b
Examples:
netcfg -b ms_tcpip
…shows binding paths containing ‘MS_TCPIP’

General Notes:\n"
-v Run in verbose (detailed) mode
-e Use servicing environment variables during install and uninstall
-? Displays this help information

My question to you was how do they (the devs) install it. Do they use
BindView? Do they use the NDIS.COM sample installer? Have you
installed the driver manually? How do you do it?

Good Luck,

Dave Cattley

NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

When it comes to installers I’ve found you often need both dev and sysadmin knowledge: devs tend not to spot bad installers and go with the simplest option, while ops don’t know enough about how the software works. After a bit of a fight I’ve managed to banish NSIS from installers I maintain - we were using the non-Unicode version and after a bit of prodding I found a bug that caused the entire contents of C:\ to be recursively deleted. MSI might be more difficult to learn, but it seems so much nicer after that!


Bruce

On Sep 12, 2014, at 5:02 PM, Dave Cattley wrote:
>
> > The dev more or less says I don’t know. It’s your job to install. They’re manually doing it now.
>
> Two things.
>
> 1. Exactly what is involved in manually installing it.
> 2. Get new devs. J
>
> Winpcap is an NDIS protocol. Maybe it has been updated to a LWF for NT6, not sure. Last I knew it was still an OSS project. Unless you are constrained by OSS blinders (not unreasonable) go look at it. That installer works just fine.
>
> Regards,
> Dave Cattley
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

On Sep 23, 2014, at 8:30 PM, Bruce Cran > wrote:

… After a bit of a fight I’ve managed to banish NSIS from installers I maintain - we were using the non-Unicode version and after a bit of prodding I found a bug that caused the entire contents of C:\ to be recursively deleted. MSI might be more difficult to learn, but it seems so much nicer after that!

Are you saying NSIS has a bug that caused this, or that one of your people wrote an installer with a bug that caused this? I?m a huge fan of NSIS, and it seems a little unfair to blame the tool for a script error. You can mangle your hard disk in virtually any language.

Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.</mailto:xxxxx>

If you will ever want to use DIFXAPP or DIFXAPI you must ask the dev team to
add a line to the INF

[Version]

?

DriverPackageType=Network

They have to do this before the driver package is WHQL signed since changing
the INF will invalidate previous submission testing.

So as far as NETCFG.EXE returning a value - you can easily test this. I?m
pretty sure it does at least tell you success or failure and possibly even
more fine-grained.

Did you try NETCFG instead of the GUI process?

You might also look at the sample in the WDK named DIFXCMD. You can adapt
it to return whatever you want.

Good Luck,

Dave Cattley

>? I?m a huge fan of NSIS, and it seems a little unfair to blame the tool
for a script error. You can mangle your hard disk in virtually any
language.

+1

(though I am perhaps not a huge fan, just a fan.)

Dave Cattley

My understanding they got the files signed yesterday successfully.
I will ask them about difxapp.
What exactly is that in a way i can tell the dev besides a driver
installation framework? How is it different than the netcfg method i will
probably be ending up using?
thanks

From: Dave Cattley
To: “Windows System Software Devs Interest List”
Date: 24/09/2014 08:19
Subject: RE: [ntdev] Question regarding on how to do an NDIS Driver
installation using NSIS
Sent by: xxxxx@lists.osr.com

If you will ever want to use DIFXAPP or DIFXAPI you must ask the dev team
to add a line to the INF

[Version]
?
DriverPackageType=Network

They have to do this before the driver package is WHQL signed since
changing the INF will invalidate previous submission testing.

So as far as NETCFG.EXE returning a value - you can easily test this.
I?m pretty sure it does at least tell you success or failure and possibly
even more fine-grained.

Did you try NETCFG instead of the GUI process?

You might also look at the sample in the WDK named DIFXCMD. You can
adapt it to return whatever you want.

Good Luck,
Dave Cattley


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Besides nsis being free, i don’t mind the msi curveball/learning curve. I
was liking the idea to make an msi installer for some time but as ther
script got complex as it did, i just got lazy (since this isn’t my primary
responsibility)

But i agree with Tim, I would never use recursive deletions on
directories.
I’ve learned my lesson in linux far too many times!

From: Tim Roberts
To: “Windows System Software Devs Interest List”
Date: 24/09/2014 02:03
Subject: Re: [ntdev] Question regarding on how to do an NDIS Driver
installation using NSIS
Sent by: xxxxx@lists.osr.com

On Sep 23, 2014, at 8:30 PM, Bruce Cran wrote:

… After a bit of a fight I’ve managed to banish NSIS from installers I
maintain - we were using the non-Unicode version and after a bit of
prodding I found a bug that caused the entire contents of C:\ to be
recursively deleted. MSI might be more difficult to learn, but it seems so
much nicer after that!

Are you saying NSIS has a bug that caused this, or that one of your people
wrote an installer with a bug that caused this? I?m a huge fan of NSIS,
and it seems a little unfair to blame the tool for a script error. You
can mangle your hard disk in virtually any language.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Not yet, the Florida office got the drivers signed so once I get them I
will try the netcfg method from the command line for both x86 and x64.

From: Dave Cattley
To: “Windows System Software Devs Interest List”
Date: 24/09/2014 08:19
Subject: RE: [ntdev] Question regarding on how to do an NDIS Driver
installation using NSIS
Sent by: xxxxx@lists.osr.com

If you will ever want to use DIFXAPP or DIFXAPI you must ask the dev team
to add a line to the INF

[Version]
?
DriverPackageType=Network

They have to do this before the driver package is WHQL signed since
changing the INF will invalidate previous submission testing.

So as far as NETCFG.EXE returning a value - you can easily test this.
I?m pretty sure it does at least tell you success or failure and possibly
even more fine-grained.

Did you try NETCFG instead of the GUI process?

You might also look at the sample in the WDK named DIFXCMD. You can
adapt it to return whatever you want.

Good Luck,
Dave Cattley


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

On 9/24/2014 12:03 AM, Tim Roberts wrote:

On Sep 23, 2014, at 8:30 PM, Bruce Cran > mailto:xxxxx> wrote:
>
>> … After a bit of a fight I’ve managed to banish NSIS from
>> installers I maintain - we were using the non-Unicode version and
>> after a bit of prodding I found a bug that caused the entire contents
>> of C:\ to be recursively deleted. MSI might be more difficult to
>> learn, but it seems so much nicer after that!
>
> Are you saying NSIS has a bug that caused this, or that one of your
> people wrote an installer with a bug that caused this? I’m a huge fan
> of NSIS, and it seems a little unfair to blame the tool for a script
> error. You can mangle your hard disk in virtually any language.

I think it was an NSIS bug - or at least a bug in the theme we were
using, which can be found via the NSIS site. Normally, if you try and
install to C:\ it will change the install directory to C:\ProductName,
but if you enter Unicode characters it can end up not creating the
product directory and installing files to C:\ instead. But yes, it did
end up being a problem with our script since it shouldn’t have been
trying to recursively delete a directory. I just think that NSIS makes
it easier to make mistakes since it’s relatively low level and
installers can often end up depending on plugins of questionable quality.


Bruce</mailto:xxxxx>