Giter Club home page Giter Club logo

icsmanager's People

Contributors

oliverskawronek avatar utapyngo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icsmanager's Issues

Please provide binaries

Wanted (well, needed) this on a friend's PC which is ultra slow and has no sensible toolchain..

IcsManager doesn't list mobile Internet connection

I use Huawei E173 HSPA modem and its internet connection (normal NDIS adapter visible in Windows) is not listed by IcsManager. However, it is still shareable by its GUID. Had to find it in the Registry.
My operating system is Windows 7 32 bit.

Access Violation

DisableSharing gives me an access violation on Windows 10.

I can manually disable ICS, and then restart the application to enable sharing. Just disabling gives me a memory error.

If you need any further information please do let me know.

Disable show ComObject

I run the icsmanager with Visual Studio and run into the following error.
Need help ...I use Windows 10 and want to use c# to enable/disable ICs
Thanks

C:\icsmanager-master\IcsManagerConsole\bin\Debug>IcsManager disable
Internet Connection Sharing will be disabled:
System.__ComObject -> System.__ComObject

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at NETCONLib.INetSharingConfiguration.DisableSharing()
at IcsManagerLibrary.IcsManager.ShareConnection(INetConnection connectionToShare, INetConnection homeConnection) in C:\icsmanager-master\IcsManagerLibrary\IcsManager.cs:line 55
at IcsManagerConsole.Program.DisableICS() in C:\icsmanager-master\IcsManagerConsole\Program.cs:line 111
at IcsManagerConsole.Program.Main(String[] args) in C:\icsmanager-master\IcsManagerConsole\Program.cs:line 169

Build fails on Windows 10

PS C:\users\Himanshu Shekhar\Downloads\icsmanager-master> .\build.cmd

C:\users\Himanshu Shekhar\Downloads\icsmanager-master>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:Configuration=Release;DebugType=None;OutDir=..
Microsoft (R) Build Engine version 4.6.79.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 2/15/2016 11:53:53 AM.
Project "C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManager.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|Mixed Platforms".
Project "C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManager.sln" (1) is building "C:\users\Himanshu Shekh
ar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerLibrary.csproj" (2) on node 1 (default targets).
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3274: The primary reference
"System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture
=MSIL" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher
version than the currently targeted framework ".NETFramework,Version=v4.0". [C:\users\Himanshu Shekhar\Downloads\icsman
ager-master\IcsManagerLibrary\IcsManagerLibrary.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference
"System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture
=MSIL" could not be resolved because it has an indirect dependency on the assembly "Microsoft.Management.Infrastructure
.Native, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which was built against the ".NETFramework,
Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". [
C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerLibrary.csproj]
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the i
nput files.
CoreCompile:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /war
n:4 /define:TRACE /highentropyva- /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFra
mework\v4.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v
4.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\S
ystem.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFra
mework\v4.0\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramewor
k\v4.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Sys
tem.Management.dll" /link:obj\Release\Interop.NETCONLib.dll /debug- /filealign:512 /optimize+ /out:obj\Release\IcsMan
agerLibrary.dll /target:library /utf8output Enable_ICS.cs Disable_ICS.cs Get_NetworkConnections.cs IcsManager.cs NetS
hare.cs Properties\AssemblyInfo.cs "C:\Users\Himanshu Shekhar\AppData\Local\Temp.NETFramework,Version=v4.0.AssemblyA
ttributes.cs"
Enable_ICS.cs(2,25): error CS0234: The type or namespace name 'Automation' does not exist in the namespace 'System.Mana
gement' (are you missing an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibra
ry\IcsManagerLibrary.csproj]
Enable_ICS.cs(7,30): error CS0246: The type or namespace name 'PSCmdlet' could not be found (are you missing a using di
rective or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerL
ibrary.csproj]
Disable_ICS.cs(1,25): error CS0234: The type or namespace name 'Automation' does not exist in the namespace 'System.Man
agement' (are you missing an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibr
ary\IcsManagerLibrary.csproj]
Disable_ICS.cs(6,31): error CS0246: The type or namespace name 'PSCmdlet' could not be found (are you missing a using d
irective or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManager
Library.csproj]
Get_NetworkConnections.cs(1,25): error CS0234: The type or namespace name 'Automation' does not exist in the namespace
'System.Management' (are you missing an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\Ics
ManagerLibrary\IcsManagerLibrary.csproj]
Get_NetworkConnections.cs(6,42): error CS0246: The type or namespace name 'PSCmdlet' could not be found (are you missin
g a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary
\IcsManagerLibrary.csproj]
Enable_ICS.cs(9,10): error CS0246: The type or namespace name 'Parameter' could not be found (are you missing a using d
irective or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManager
Library.csproj]
Enable_ICS.cs(9,10): error CS0246: The type or namespace name 'ParameterAttribute' could not be found (are you missing
a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\I
csManagerLibrary.csproj]
Enable_ICS.cs(14,10): error CS0246: The type or namespace name 'Parameter' could not be found (are you missing a using
directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManage
rLibrary.csproj]
Enable_ICS.cs(14,10): error CS0246: The type or namespace name 'ParameterAttribute' could not be found (are you missing
a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary
IcsManagerLibrary.csproj]
Enable_ICS.cs(19,10): error CS0246: The type or namespace name 'Parameter' could not be found (are you missing a using
directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManage
rLibrary.csproj]
Enable_ICS.cs(19,10): error CS0246: The type or namespace name 'ParameterAttribute' could not be found (are you missing
a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary
IcsManagerLibrary.csproj]
Enable_ICS.cs(6,6): error CS0246: The type or namespace name 'Cmdlet' could not be found (are you missing a using direc
tive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerLibr
ary.csproj]
Enable_ICS.cs(6,6): error CS0246: The type or namespace name 'CmdletAttribute' could not be found (are you missing a us
ing directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsMa
nagerLibrary.csproj]
Disable_ICS.cs(5,6): error CS0246: The type or namespace name 'Cmdlet' could not be found (are you missing a using dire
ctive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerLib
rary.csproj]
Disable_ICS.cs(5,6): error CS0246: The type or namespace name 'CmdletAttribute' could not be found (are you missing a u
sing directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsM
anagerLibrary.csproj]
Get_NetworkConnections.cs(5,6): error CS0246: The type or namespace name 'Cmdlet' could not be found (are you missing a
using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\Ic
sManagerLibrary.csproj]
Get_NetworkConnections.cs(5,6): error CS0246: The type or namespace name 'CmdletAttribute' could not be found (are you
missing a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerL
ibrary\IcsManagerLibrary.csproj]
Done Building Project "C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerLibrary.csproj
" (default targets) -- FAILED.

Done Building Project "C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManager.sln" (default targets) -- FAILE
D.

Build FAILED.

"C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManager.sln" (default target) (1) ->
"C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerLibrary.csproj" (default target) (2)
->
(ResolveAssemblyReferences target) ->
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3274: The primary referenc
e "System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitectu
re=MSIL" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a highe
r version than the currently targeted framework ".NETFramework,Version=v4.0". [C:\users\Himanshu Shekhar\Downloads\icsm
anager-master\IcsManagerLibrary\IcsManagerLibrary.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary referenc
e "System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitectu
re=MSIL" could not be resolved because it has an indirect dependency on the assembly "Microsoft.Management.Infrastructu
re.Native, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which was built against the ".NETFramewor
k,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
[C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerLibrary.csproj]

"C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManager.sln" (default target) (1) ->
"C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerLibrary.csproj" (default target) (2)
->
(CoreCompile target) ->
Enable_ICS.cs(2,25): error CS0234: The type or namespace name 'Automation' does not exist in the namespace 'System.Ma
nagement' (are you missing an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLib
rary\IcsManagerLibrary.csproj]
Enable_ICS.cs(7,30): error CS0246: The type or namespace name 'PSCmdlet' could not be found (are you missing a using
directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManage
rLibrary.csproj]
Disable_ICS.cs(1,25): error CS0234: The type or namespace name 'Automation' does not exist in the namespace 'System.M
anagement' (are you missing an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLi
brary\IcsManagerLibrary.csproj]
Disable_ICS.cs(6,31): error CS0246: The type or namespace name 'PSCmdlet' could not be found (are you missing a using
directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManag
erLibrary.csproj]
Get_NetworkConnections.cs(1,25): error CS0234: The type or namespace name 'Automation' does not exist in the namespac
e 'System.Management' (are you missing an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\I
csManagerLibrary\IcsManagerLibrary.csproj]
Get_NetworkConnections.cs(6,42): error CS0246: The type or namespace name 'PSCmdlet' could not be found (are you miss
ing a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibra
ry\IcsManagerLibrary.csproj]
Enable_ICS.cs(9,10): error CS0246: The type or namespace name 'Parameter' could not be found (are you missing a using
directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManag
erLibrary.csproj]
Enable_ICS.cs(9,10): error CS0246: The type or namespace name 'ParameterAttribute' could not be found (are you missin
g a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary
\IcsManagerLibrary.csproj]
Enable_ICS.cs(14,10): error CS0246: The type or namespace name 'Parameter' could not be found (are you missing a usin
g directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsMana
gerLibrary.csproj]
Enable_ICS.cs(14,10): error CS0246: The type or namespace name 'ParameterAttribute' could not be found (are you missi
ng a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrar
y\IcsManagerLibrary.csproj]
Enable_ICS.cs(19,10): error CS0246: The type or namespace name 'Parameter' could not be found (are you missing a usin
g directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsMana
gerLibrary.csproj]
Enable_ICS.cs(19,10): error CS0246: The type or namespace name 'ParameterAttribute' could not be found (are you missi
ng a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrar
y\IcsManagerLibrary.csproj]
Enable_ICS.cs(6,6): error CS0246: The type or namespace name 'Cmdlet' could not be found (are you missing a using dir
ective or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerLi
brary.csproj]
Enable_ICS.cs(6,6): error CS0246: The type or namespace name 'CmdletAttribute' could not be found (are you missing a
using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\Ics
ManagerLibrary.csproj]
Disable_ICS.cs(5,6): error CS0246: The type or namespace name 'Cmdlet' could not be found (are you missing a using di
rective or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\IcsManagerL
ibrary.csproj]
Disable_ICS.cs(5,6): error CS0246: The type or namespace name 'CmdletAttribute' could not be found (are you missing a
using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary\Ic
sManagerLibrary.csproj]
Get_NetworkConnections.cs(5,6): error CS0246: The type or namespace name 'Cmdlet' could not be found (are you missing
a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManagerLibrary
IcsManagerLibrary.csproj]
Get_NetworkConnections.cs(5,6): error CS0246: The type or namespace name 'CmdletAttribute' could not be found (are yo
u missing a using directive or an assembly reference?) [C:\users\Himanshu Shekhar\Downloads\icsmanager-master\IcsManage
rLibrary\IcsManagerLibrary.csproj]

2 Warning(s)
18 Error(s)

Can this be used in COM applications?

I wanted to use the DLL for a VB6 application. Before compiling the "Register for COM interop" should be set to true. But I get errors trying to compile in VS2013 which I couldn't fix, but the build.cmd works. I have never tried to use a C# DLL in VB6 before, as the API is not documented hence I need some help with the API's that can be used!

Does not work for "Broadband Connection" type PPP dial-in interfaces

Name .......... : Broadband Connection
GUID .......... : {4C5FB441-3233-410B-A094-1D235A16CED1}
Status ........ : Up
InterfaceType . : Ppp
Unicast address : 109.162.51.153/255.255.255.255
Gateway ....... : 0.0.0.0
Device ........ : WAN Miniport (PPPOE)
SharingType ... : ICSSHARINGTYPE_PUBLIC

c:\temp>icsmanager enable {4C5FB441-3233-410B-A094-1D235A16CED1} {FA293CE9-EE7A-4024-BBB2-D1CE0EAFDAFD} [forced]

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at NETCONLib.INetSharingConfiguration.EnableSharing(tagSHARINGCONNECTIONTYPE Type)
at IcsManagerLibrary.IcsManager.ShareConnection(INetConnection connectionToShare, INetConnection homeConnection)
at IcsManagerConsole.Program.EnableICS(String shared, String home, Boolean force)
at IcsManagerConsole.Program.Main(String[] args)

Logs

Any way to view logs from this application? It seems to fail at building on my Windows 7 64bit.

There are some problems with the latest version of windows 10 2004

It is normal to use console, However, executing the command โ€Get-NetworkConnectionsโ€œ after importing a PowerShell module results in an error that exceeds the expected value.
Thanks for @131 to compile the program.
But I hope the author can produce an official compiled version, and need a 64 bit executable program.

Memory corruption errors

Hi,

It seems after Win 10 update (Version 1607) Powershell library command ICS-Enable ends up with Error.

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at NETCONLib.INetSharingConfiguration.EnableSharing(tagSHARINGCONNECTIONTYPE Type)
   at IcsManagerLibrary.IcsManager.ShareConnection(INetConnection connectionToShare, INetConnection homeConnection)
   at System.Management.Automation.CommandProcessor.ProcessRecord()
   at System.Management.Automation.CommandProcessorBase.DoExecute()
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
   at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
   at System.Management.Automation.DlrScriptCommandProcessor.Complete()
   at System.Management.Automation.CommandProcessorBase.DoComplete()
   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop)
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
   at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
   at System.Management.Automation.DlrScriptCommandProcessor.Complete()
   at System.Management.Automation.CommandProcessorBase.DoComplete()
   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop)
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
   at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Unfortunately since the tool has not been in development for years, I am afraid it never gets fixed.

Exception in GetConnectionById

C:\Work\icsmanager\IcsManagerConsole\bin\Debug>IcsManager.exe
Name .......... : TAP Adapter
GUID .......... : {8C99866F-85F1-48EC-AE68-004B63DBFDB9}
Status ........ : Down
InterfaceType . : Ethernet
Device ........ : TAP-Win32 Adapter V9

Name .......... : Bluetooth Network Connection
GUID .......... : {6F8DB0F5-1A0E-4B69-9638-4532FDD28664}
Status ........ : Down
InterfaceType . : Ethernet
Device ........ : Bluetooth Device (Personal Area Network)

Name .......... : Local Area Connection
GUID .......... : {69F4A5E2-6164-4787-8A31-68471B4A287C}
Status ........ : Up
InterfaceType . : Ethernet
Unicast address : 10.64.1.3/255.255.255.0
Gateway ....... : 10.64.1.1
Device ........ : Realtek PCIe GBE Family Controller

Name .......... : Wireless Network Connection
GUID .......... : {623F5B2C-1069-4A44-895B-3F1EB4E3D330}
Status ........ : Up
InterfaceType . : Wireless80211
Unicast address : 10.129.40.76/255.0.0.0
Gateway ....... : 10.121.95.108

Unhandled Exception: System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
at NETCONLib.INetConnectionProps.get_Guid()
at IcsManagerLibrary.IcsManager.<>c__DisplayClassd.b__c(INetConnection c) in C:\Work\icsmanager\IcsManagerLibrary\IcsManager.cs:line 86
at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.Linq.Enumerable.<DefaultIfEmptyIterator>d__a51.MoveNext()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at IcsManagerLibrary.IcsManager.GetConnectionById(String guid) in C:\Work\icsmanager\IcsManagerLibrary\IcsManager.cs:line 85
at IcsManagerConsole.Program.Info() in C:\Work\icsmanager\IcsManagerConsole\Program.cs:line 44
at IcsManagerConsole.Program.Main(String[] args) in C:\Work\icsmanager\IcsManagerConsole\Program.cs:line 132

Exception when enabling ICS: An event was unable to invoke any of the subscribers (HRESULT: 0x80040201)

When I try to enable ICS sharing I get an exception:

System.Runtime.InteropServices.COMException: An event was unable to invoke any of the subscribers (Exception from HRESULT: 0x80040201) at NETCONLib.INetSharingConfiguration.EnableSharing(tagSHARINGCONNECTIONTYPE Type) at IcsManagerLibrary.IcsManager.ShareConnection(INetConnection connectionToShare, INetConnection homeConnection)

I'm running the console app as admin and have tried registering hnetcfg.dll. Running Win 7 x64.

If I manually enable ICS in Windows, then this library is able to enable/disable ICS subsequently. My problem is I'm trying to automate this process and don't want to rely on the user having enabled ICS manually first.

Any ideas how to resolve this error? Really useful library otherwise!

Please provide doc for installing System.Management.Automation

It seems that System.Management.Automation is no longer supported by .NET.
There is an unofficial package https://www.nuget.org/packages/System.Management.Automation.

For me it was simply Tools > NuGet Package Manager > Package Manager Console and type

PM> Install-Package System.Management.Automation -Version 6.1.7601.17515

After that, I can build the whole solution without any problems.

Please can you add this information to the project's README?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.