Solved

Execute a vb script on a remote machine

Posted on 2007-03-28
7
349 Views
Last Modified: 2010-03-05
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
Comment
Question by:bsharath
  • 3
  • 2
  • 2
7 Comments
 
LVL 29

Expert Comment

by:Alan Huseyin Kayahan
ID: 18809122
        *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
 
LVL 11

Author Comment

by:bsharath
ID: 18809270
How can i schedule on a remote machine remotely
0
 
LVL 29

Expert Comment

by:Alan Huseyin Kayahan
ID: 18810972
         *If you have a domain, you would execute your script as logon or logoff script for users in AD pane.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 11

Author Comment

by:bsharath
ID: 18813155
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
 
LVL 15

Accepted Solution

by:
markpalinux earned 500 total points
ID: 18813351

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
 
LVL 11

Author Comment

by:bsharath
ID: 18813625
Can we do the same thing for vb scripts .vbs
0
 
LVL 15

Expert Comment

by:markpalinux
ID: 18815539
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you considered what group policies are backwards and forwards compatible? Windows Active Directory servers and clients use group policy templates to deploy sets of policies within your domain. But, there is a catch to deploying policies. The…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question