• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 353
  • Last Modified:

Execute a vb script on a remote machine

Hi,

I have a vb script which tells if a machine is DHCP enabled or not i need to run this script on remote machines.Pstool is useful but do not know if it is possible.

I need pstool to collect the machine name from the file where it needs to execte abc.vbs file.

Regards
Sharath
0
bsharath
Asked:
bsharath
  • 3
  • 2
  • 2
1 Solution
 
Alan Huseyin KayahanCommented:
        *You would schedule the script in "scheduled tasks" if you like.
         *Is this Professional Service Tool you mean wit pstool? If yes link below is the offical forum and you may find many solutions if you join and check.
http://mobile-files.com/forum/forumdisplay.php?f=126
0
 
bsharathAuthor Commented:
How can i schedule on a remote machine remotely
0
 
Alan Huseyin KayahanCommented:
         *If you have a domain, you would execute your script as logon or logoff script for users in AD pane.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
bsharathAuthor Commented:
Yes i have a domain but there is a output which is required this script shows a window on the screen if it is a DHCP or not.
0
 
markpalinuxCommented:

I use
psexec \\machinename -u domain\admin -p passwword -d -f -c batchforremote.cmd

then batchforremote.cmd would include
copy /y \\server\share1 myvbscript.vbs
cscript myvbscript.vbs > myvbscript-results.txt
copy myvbscript-results.txt \\server\share2\%COMPUTERNAME%.txt

as you can see in the batchforremote.cmd file the last file copy uses the embeeded %COMPUTERNAME% when it copies the file to the network.

I think you may also be able to run a WMI script to get what you are looking for, which would work remotely.

Hope this helps,
Mark
0
 
bsharathAuthor Commented:
Can we do the same thing for vb scripts .vbs
0
 
markpalinuxCommented:
If it is a command line vb script compiled to an exe, then sure then you would just use file.exe > %computername%.txt adn then copy it to the network.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now