473,511 Members | 15,581 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting script into VB.Net

10 New Member
I want to conert the following script in VB.Net..
I m not getting it properly.
Can anybody have idea.



On Error Resume Next

Const ALLOW_ALL = 0

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")

For Each objNetCard in colNetCards
arrPermittedTCPPorts = Array(ALLOW_ALL)
arrPermittedUDPPorts = Array(ALLOW_ALL)
arrPermittedIPProtocols = Array(ALLOW_ALL)
objNetCard.EnableIPSec arrPermittedTCPPorts, arrPermittedUDPPorts, _
arrPermittedIPProtocols
Next
Feb 15 '08 #1
2 1211
kenobewan
4,871 Recognized Expert Specialist
I want to conert the following script in VB.Net..
I m not getting it properly.
Can anybody have idea.



On Error Resume Next

Const ALLOW_ALL = 0

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")

For Each objNetCard in colNetCards
arrPermittedTCPPorts = Array(ALLOW_ALL)
arrPermittedUDPPorts = Array(ALLOW_ALL)
arrPermittedIPProtocols = Array(ALLOW_ALL)
objNetCard.EnableIPSec arrPermittedTCPPorts, arrPermittedUDPPorts, _
arrPermittedIPProtocols
Next
Is this VB6? Do you have VS2003? Have you tried a converter?
Feb 15 '08 #2
dvp10
10 New Member
i have VS2005
I havent tried converter yet
Feb 16 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3091
by: j.a. harriman | last post by:
Hi, On MSDN I know there is a JScript example (Upgrading Visual C++ Projects to Visual Studio .NET in Batch Mode) to upgrade VS6 C++ projects to .NET solutions. It converts the project files...
5
10267
by: Nelson | last post by:
In my web form, I am converting all lower case letters to upper case when the user types the characters in the edit boxes. I am achieving that by injecting client side script (onkeyup event) for...
3
421
by: j.a. harriman | last post by:
Hi, On MSDN I know there is a JScript example (Upgrading Visual C++ Projects to Visual Studio .NET in Batch Mode) to upgrade VS6 C++ projects to .NET solutions. It converts the project files...
1
2142
by: UKuser | last post by:
Hi Guys, I have a program which converts Excel spreadsheets to Javascript and allows interactivity. However it can't convert it to PHP, which is obviously better for users to view (in case J/S...
2
3654
by: Sai | last post by:
Hello, I am new to .Net world and I need some help in converting VB.Net code to C#. Public Overridable Property CaseSensitiveKeySort() As Boolean Get Return _caseSensitiveKeySort End Get...
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.