Re: Opening Cd rom tray over a network

From: David Candy (david_at_mvps.org)
Date: 08/06/04


Date: Fri, 6 Aug 2004 14:13:35 +1000


Never saw your question.

Should lose the attitude.

 
      Windows Script Host

WshRemote Object
See Also
WshController Object

Language
  a.. JScript

  b.. VBScript

  c.. Show All

 

Provides access to the remote script process.

Remarks
The WshRemote object allows you to remotely administer computer systems on a computer network. It represents an instance of a WSH script, i.e., a script file with one of the following extensions: .wsh, .wsf, .js, .vbs, .jse, .vbe, and so on. An instance of a running script is a process. You can run the process either on the local machine or on a remote machine. If you do not provide a network path, it will run locally. When a WSHRemote object is created (by using the CreateScript() method), the script is copied to the target computer system. Once there, the script does not begin executing immediately; it begins executing only when the WSHRemote method Execute is invoked. Through the WshRemote object interface, your script can manipulate other programs or scripts. Additionally, external applications can also manipulate remote scripts. The WshRemote object works asynchronously over DCOM.

Example
The following example demonstrates how the WshRemote object is used to start a remote script.

[VBScript]
Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("test.js", "remoteserver")
RemoteScript.Execute

Do While RemoteScript.Status <> 2
    WScript.Sleep 100
Loop[JScript]
var Controller = WScript.CreateObject("WSHController");
var RemoteScript = Controller.CreateScript("test.js", "remoteserver");
RemoteScript.Execute();

while (RemoteScript.Status != 2) {
    WScript.Sleep(100);
}Properties
Status Property | Error Property

Methods
Execute Method | Terminate Method

Events
Start Event | End Event | Error Event

See Also
WshController Object

--------------------------------------------------------------------------------

© 2001 Microsoft Corporation. All rights reserved.

Build: Topic Version 5.6.9309.1546

====================================

And a script that eject E. You can't close the draw with script.

'Note if a letter is underlined you must insert an ampersand before it.
Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"

'This line on are comments only
'Normally only the first line and the line below is needed for most verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation] [,vShow])

-- 
----------------------------------------------------------
'Not happy John! Defending our democracy',
http://www.smh.com.au/articles/2004/06/29/1088392635123.html
"SmAfDiBoY" <nospam@nospam.nospam> wrote in message news:5nDQc.1916$7z.769@nwrddc01.gnilink.net...
> Hey thanks for all the Feed back.....
> 
> 
> 
> NOT !!!!!!!!!!!!!!!!
> 
> 
> 
> "SmAfDiBoY" <nospam@nospam.nospam> wrote in message
> news:vVYGc.27206$6e7.22602@nwrddc03.gnilink.net...
> > Does Anyone know the command line code to open a CD rom tray over a
> network
> > !!!
> >
> > Thanks
> >
> >
> >
> 
> 




SeeAlso1a.gif
Filter1a.gif
wsWshRemoteObject.gif

Relevant Pages

  • Re: Pin Calc to Start Menu on Remote Computers
    ... Windows XP Troubleshooting ... The WshRemote object allows you to remotely administer computer systems on a computer network. ... It represents an instance of a WSH script, i.e., a script ... You can run the process either on the local machine or on a remote machine. ...
    (microsoft.public.windowsxp.customize)
  • Re: how to offer remote support not throu port 3389
    ... > the WshRemote object to create remote support invitation? ... >> method that will run a WSH script on a remote Windows machine." ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: how to offer remote support not throu port 3389
    ... the WshRemote object to create remote support invitation? ... > Remote scripting will probably allow you to remotely issue an invite from the client ... > method that will run a WSH script on a remote Windows machine." ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: vbscript remote execution
    ... I have 2 machine: Server and remote pc ... I need to write a vbscript that that execute on Server and should ... or workstation) to a remote computer, ...
    (microsoft.public.scripting.vbscript)
  • Re: problem with Wscript.createObject
    ... Perhaps The remote script execution ... > Sub remoteExecScript(scriptFileName, remoteMachineName) ...
    (microsoft.public.scripting.wsh)