Re: Launching Calculator app on Remote PC, but GUI not visible



"objShell.Run ("C:\build.cmd",,TRUE), "


On a later Win OS, that is beyond win9x/ME

run the command for cmd.exe as intented,

And the file containg the syntax with freely definable extension name.

***************

" IDE "

Look up the dictionary on that one.

You will not overwrite well exercised issues here,
and you can call anbody you want..







<mr_ravi_patil@xxxxxxxxx> wrote in message news:1171885717.828349.109670@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Feb 9, 4:26 pm, "Michael Harris \(MVP\)" <mikhar.at.mvps.dot.org>
wrote:
> Since calculator.exe is listed in the process list of the remote PC,
> does that mean that calculator.exe is actually running -- just
> without a GUI?

Correct - or rather a GUI not visible to any logged on user.



> The .exe I am actually trying to launch remotely is a compiler
> executable which loads a project and builds the target. It is a GUI
> application but it does not require any user interaction to build.

> When I launch the compiler locally without using WSH using a build.cmd
> file which simply contains one line: "ide.exe <projectname>" it builds
> OK --. But when I issue the same build.cmd command remotely with WSH
> it doesn't seem to build anything.

My guess is that <projectname> in "ide.exe <projectname>" refers to a remote
resource (like perhaps a UNC path). The remote process runs via account
impersonation, not full clear text credentials, so it can't access anything
external to that remote machine where it is running. If that's the case,
this is the kind of problems that psexec (and 3rd party tools) were created
for.


<projectname> in ide.exe refers to a file on the C:\ drive of the
remote machine.
I verified that the <projectname> file is sucessfully opened by
checking the return value of the IDE.exe command.

In addition,
The problem is that the IDE.exe is not building any object files.

When I physically go to the remote machine and launch the "C:
\build.cmd" file,
the IDE is launched and it builds the object files.

But when I try it with objShell.Run ("C:\build.cmd",,TRUE), it doesn't
build.
I see IDE.exe listed as a running process on the remote machine. And
if I try to rename <projectname> file on the remote machine, it will
return "file in use" error,
so the file has actually been loaded.

The only thing I can think of is environmental variables. Does calling
CreateScript with RemoteMachineName and then running "objShell.Run ("C:
\build.cmd",,TRUE)" pick up the DOS environmental variables of the
remote machine? I tried setting the environmental variables in the
build.cmd file, but it still didn't work.

I am starting to suspect that the IDE.exe is not working because of
the WSH call. The problem with debugging the issue is that you cannot
see the GUI running and see if there are any error dialogs. I doubt
that there are error dialogs since it always works when I click the "C:
\build.cmd" file on the remote computer.

One thing I might try is go over to the remote computer and run WSH
but specify the remote computer name in the call to CreateScript, so
that the same machine is acting as both the local and remote computer.



> I am wondering if there are any differences in a non-interactive GUI
> application's functionality when it is launched locally vs. being
> launched with WSH.

I doubt it - a GUI app that supports non-interactive execution via command
line arguments that close when done automatically should work just fine.
There is always the risk that the app may throw up a GUI modal error dialog
box that can't be seen or dismissed...

--
Michael Harris
Microsoft.MVP.Scripting



.



Relevant Pages

  • Re: wshremote not running script on remote computer
    ... If you want to open a command window on a remote machine, ... This is why I want to create this script, ...
    (microsoft.public.scripting.vbscript)
  • Re: wshremote not running script on remote computer
    ... "The script you deploy to the remote computer must not attempt to interact ... I do want to open a command window on a remote machine, ...
    (microsoft.public.scripting.vbscript)
  • Re: Accessing PCs that connect to SBS server 2003 via VPN
    ... We have dual nic + router configuration. ... subnet from the external nic which is connected to the router. ... run the Remote Access Wizard (Server Management | To ... update the actual user profile on the remote machine with your ...
    (microsoft.public.windows.server.sbs)
  • Re: Remote debugging a mixed DLL
    ... Here Path 1) is the remote machine where the Win32 service is running ... But when i do the local debugging i can put breakpoints. ... the modules window that it's loading the correct pdb from the remote machine. ...
    (microsoft.public.vsnet.debugging)
  • Re: Accessing PCs that connect to SBS server 2003 via VPN
    ... Let SBS handle the DHCP service for the LAN. ... run the Remote Access Wizard (Server Management | To ... to the SBS server for software installations/updates. ... update the actual user profile on the remote machine with your ...
    (microsoft.public.windows.server.sbs)