Announcement

Collapse
No announcement yet.

WMI to run a Batch File

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • WMI to run a Batch File

    I need to copy a folder to a remote system and then run an executable from the command prompt. I created a simple batch file to perform this operation; however, it keeps on stopping in the section where it maps the drive. If I run the batch file from the System, it runs without any issues.

    Could someone take a look because I am new to all of this stuff?

    Basically, the file makes a directory, maps a network drive, copies the data from the network drive to the local system. Then it runs the Executable and deletes the mapped drive.

    ================================
    C:
    CD\
    MD NSClient
    NET USE X: \\SERVER\NSCLIENT
    COPY /Y X:\*.* C:\NSCLIENT
    CD C:\NSCLIENT
    C:\NSClient\NSClient.exe /INSTALL
    NET START NSCLIENTPP
    If Exist X:\ NET USE X: /DELETE
    =======================================

  • #2
    Re: WMI to run a Batch File

    Are you using the CreateProcess WMI method to run this process ?
    Kevin Stanush
    SystemTools Software Inc.

    Comment

    Working...
    X