wiki:Deprecated_Tips
Last modified 7 years ago Last modified on 09/12/13 01:09:59

If you want to look at the Status of Earthworm, or if you want to Restart an Earthworm module or Reconfigure Earthworm's modules and rings, and you aren't logged in as Administrator, you can either use StartstopConsole, or you can do the following if you know the Administrator password: (Instructions for Windows XP, but may work on other versions of Windows. See below for Vista.):

  • Go to the Windows Start menu, and choose "Run"
  • Type the following:
runas /user:YOUR_MACHINE_NAME_HERE\administrator cmd
  • This will open up a command window which should be able to connect to the running Earthworm, and thus allow you to type "restart", "reconfigure", "status", "pidpau" or "pau" here.
  • To view what's going on in Vista or Windows Server 2008

StartstopConsole won't work in Vista, nor will "runas" give you access to the session zero.

  • Beforehand, add 'cmd' as a line in your startstop_nt.d with a NewConsole, and reboot so the service starts this up.
  • if you're not at the machine, make a remote desktop connection as whatever user you like
  • open a command prompt
  • if you're not running as administrator, in the command prompt type:
    runas /user:YOUR_MACHINE_NAME_HERE\administrator cmd
    

enter the admin password

  • in the new administrator command prompt that comes up type:
    sc config ui0detect start= auto
    sc start ui0detect
    

(if you get a Interactive Services Detection dialog, you can choose "Ask me later)

Once you've done all of the above, you can access session zero. The machine could be rebooted, different users couldlog in, etc. For any user to access startstop_service's session zero:

  • in a command prompt window now you can type:
    rundll32 winsta.dll,WinStationSwitchToServicesSession
    

This will switch you to console 0. If you added a cmd prompt to startstop_nt.d, you should see it here now, and can type "status" or whatever.

That's a bit of a handful to type. Since your earthworm bin directory is already in your Windows path, you can cd to that bin directory and do something like:

echo rundll32 winsta.dll,WinStationSwitchToServicesSession > session0.bat

So now you can just type "session0" at a command prompt to get to the startstop session.

Note that this means that ANY user of the system will be able to get a prompt with administrator privileges. I this essentially the same power one has with startstopconsole which has been part of Earthworm for a while.

(This was all tested with Vista. It _should_ work with Windows Server 2008 too, but hasn't been tested there yet. If you do it successfully or unsuccessfully please let us know.)

With 2003 Server

How to Connect to the Console Session

(From http://support.microsoft.com/kb/278845)

When you connect to the console session of a Windows Server 2003-based server, no other user has to be already logged on to the console session. Even if no one is logged on to the console, you are logged on just as if you were sitting at the physical console.

To connect from the remote Windows Server 2003-based computer, open a command prompt, and then type the following command:

mstsc -v:servername /F -console

where mstsc is the Remote Desktop connection executable file, -v indicates a server to connect to, /F indicates full screen mode, and -console is the instruction to connect to the console session.