+ Reply to Thread
Results 1 to 3 of 3

Thread: Launching Applications using WMI

  1. #1
    DanielBlackmore is offline VB.NET Forum Newbie DanielBlackmore is on a distinguished programming path ahead
    .NET Framework
    .NET 3.5
    Join Date
    Mar 2010
    Age
    24
    Posts
    2
    Reputation
    0

    Default Launching Applications using WMI

    Hi

    I am writing a basic little program. Amongst everything, my program will let you install printers remotely, To cut a long story shot I don't want to use the rundll32 shortcut to install as you can only remove the printer using rundll32 again which I don't want.

    The way I wanted to do it is create a VBS script and execute it remotely using psexec. This didn't work for some reason, locally the script works fine but when executing it remotely the script runs but doesn't perform any of the actions inside the script.

    The only other option I can think of is launching the VBS via WMI. I have done a bit of research and I cant seem to find any VB code that does anything similar. Anyone have any ideas?

    Thank you

    Daniel

  2. #2
    MattP is offline VB.NET Forum All-Mighty MattP has a reputation beyond repute MattP has a reputation beyond repute MattP has a reputation beyond repute MattP has a reputation beyond repute MattP has a reputation beyond repute MattP has a reputation beyond repute MattP has a reputation beyond repute MattP has a reputation beyond repute MattP has a reputation beyond repute MattP has a reputation beyond repute MattP has a reputation beyond repute
    .NET Framework
    .NET 4.0
    Join Date
    Feb 2008
    Location
    USA
    Posts
    1,016
    Reputation
    533

    Default

    Here's an example of running a script against a remote computer: How Can I Run This Script on Remote Computers?

    Here's an example of installing a printer: How Can I Map a Printer,

    Here's the documentation for WSH: Reference (Windows Script Host)

  3. #3
    DanielBlackmore is offline VB.NET Forum Newbie DanielBlackmore is on a distinguished programming path ahead
    .NET Framework
    .NET 3.5
    Join Date
    Mar 2010
    Age
    24
    Posts
    2
    Reputation
    0

    Default

    Thank you for your reply but i have been looking into this for a few days now and have so many resources now. Its executing them im having an issue with. For instance, I have created a vbs file and dumped it on the target pc, tried to execute it via pstools and it didnt work.

    I then tried creating a scheduled task using WMI to execute the vbs file. I have a msgbox function at the end of the file to make me aware whats happened and when i exec that vbs file only the msgbox function will work (my other code fails to work, depspite it running fine if i just double click it)

    I am at a complete loose end as all of my solutions are just falling between my fingers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts