Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 18th, 2004, 12:29 PM
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.net and Psexec

<code>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
     Dim de As new DirectoryEntry("LDAP://MYOUPath")

     Dim ds As DirectorySearcher = new system.directoryservices.directorySearcher(de)
     'ds.PageSize = 1000
     ds.Filter = ("(objectClass=Computer)")
     ds.sort = new sortoption("cn", sortdirection.ascending)

     Dim result As SearchResult
     For Each result In ds.findall()

     ListBoxLeftColumn.Items.Add(New ListItem(result.Properties("cn")(0)))

     Next result

     de.Dispose()
     'Dim objProcess As System.Diagnostics.Process = System.Diagnostics.Process.start("notepad.exe")
     startprocess("cmd.exe")
End Sub

     Function startprocess(byval processpath as string)
            Dim objProcess As System.Diagnostics.Process
        Try
            objProcess = New System.Diagnostics.Process()
            objProcess.StartInfo.FileName = processpath
            objprocess.startinfo.useshellexecute = true
            'objprocess.startinfo.workingdirectory= "C:\windows\system32\"
            objprocess.startinfo.arguments = "psexec \\PCName -d -s -i \\GetfromPC\software$\opera\o754_3869.exe /s"


            'objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
            'dim p as new system.diagnostics.process()
           ' p.startinfo = objprocess
            objprocess.Start()

            'Wait until the process passes back an exit code
            'objProcess.WaitForExit()

            'Free resources associated with this process
            objProcess.Close()
        Catch

            lblmessage.text= (objprocess.standardoutput.readtoend())
        End Try
    end function
</code>
I cannot get this to work, i know the psexec will run if i run it from the start, run, line. it installs opera on the designated pc. but i cannot make it run through asp.net. i have made this run from a vbscript, but i would like to run this from an asp.net page. Thanks in advance!






Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 3.5 answers in Professional ASP.NET 3.5 jminatel ASP.NET 3.5 Professionals 1 August 22nd, 2011 07:34 AM
ASP.NET 1.1,VB.NET,crystal reports, SQl server gvi Crystal Reports 1 September 11th, 2008 02:55 AM
Turning a regular ASP.NET App into an AJAX ASP.Net donrafeal7 Ajax 2 August 31st, 2007 12:33 AM
Database diagram in .net using asp.net,c#.net scotttiger ADO.NET 2 February 16th, 2005 01:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.