troubleshooting Question

how to execute cmd commands using

Avatar of rafaelrgl
rafaelrgl asked on
ASP.NETMicrosoft IIS Web ServerWindows Server 2008
13 Comments2 Solutions1105 ViewsLast Modified:
hi i need to execute the dnscmd command on the webserver, i have impersonate set to login as windows user that have the permissions set  too.

ii also tryed this 2 way:

        'Dim myprocess As System.Diagnostics.Process = New System.Diagnostics.Process()
        'myprocess.StartInfo.FileName = "dnscmd.exe"
        'myprocess.StartInfo.RedirectStandardOutput = True
        'myprocess.StartInfo.UseShellExecute = False
        'myprocess.StartInfo.CreateNoWindow = True
        'myprocess.StartInfo.Arguments = " /zoneadd /primary /file"

        'Dim startInfo As New ProcessStartInfo("C:\Windows\System32\dnscmd.exe")
        'startInfo.Arguments = "/zoneadd /primary /file"

none of those are working. the syntax is right i check it. i did myself on the cmd this syntax and created the dns record. but using the command on the code is not working.
Sr. System Analyst

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros