Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing remote script

Status
Not open for further replies.

Mich

IS-IT--Management
Joined
Dec 26, 2000
Messages
452
Location
US
The purpose of this script is to locate improperly named PCs by making them beep. This way we can track down where the PC really is and rename it.

Here's my code,

RemotePC = "09707805-richey"
Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.createscript("c:\beep.vbs" & RemotePC)
RemoteScript.Execute

On the remote PC I have run 'wscript.exe -regserver" and made sure the Remote key in the registry was enabled (1). When I execute this script nothing happens. No error messages, no beeps, nothing in Event Viewer...nothing. Beep.vbs works correctly.

Any ideas what might be going on here?

-If it ain't broke, break it and make it better.
 
OK, I've narrowed down that something is wrong when trying to run the script remotely. If I change the value of RemotePC to my machine name the script runs just fine (after changing & to ,).

-If it ain't broke, break it and make it better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top