Re: Run a .vbs on a remote PC



Peter I don't really understand...I had thought that it would run as a hidden
process, like I tested it with notepad.exe and that runs as a process in
taskmgr but it doesn't open up or anything so the user will have no idea that
its running, I wanted the same with my program. What my program does is that
it writes to a file a list of software installed on the PC, so I thought that
if I copied the file to the remote PC and then used the
objWMIService.Create("c:\scripts\MyProgram.vbs", null, null,intProcessID)
command then it would kick it of and create the output file with the results.
There are no prompts or no UI that the remote user would see so there
wouldn't be any user interaction??

"Peter Falz" wrote:

> Hi Mary,
>
> a process, which will be start on a remote system,
> can not AFAIK interact with the user. This process
> runs only in the background.
>
> Take a look at:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/create_method_in_class_win32_process.asp
>
> Older OS-Version are possible to do so.
>
> Bye
> Peter
>
>
>
>
> "Mary" <Mary@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag news:3B45E1EC-D7F5-458D-833D-E827A596152E@xxxxxxxxxxxxxxxx
> > Hi,
> >
> >
> >
> > I'm new to VBscript and trying to get MyProgram.vbs(which lists all software
> > installed on a PC) to run on a remote PC but it wont do anything....the
> > program runs fine on my local machine,and it runs fine on the remote PC if I
> > run it from there, but it wont work when I try remotely, any help would be
> > much appreciated...here's the code I have for running a remote program:
> >
> >
> > '==========================
> > 'Remote.vbs
> > '==========================
> >
> > Const OverwriteExisting = TRUE
> >
> > Set objFSO = CreateObject("Scripting.FileSystemObject")
> > objFSO.CopyFile "C:\Scripts\MyProgram.vbs", _
> > "\\remoteIPAddress\C$\Scripts\",OverWriteExisting
> >
> > strComputer = "remoteIPAddress"
> >
> > Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> > "\root\cimv2:Win32_Process")
> >
> >
> >
> > Error = objWMIService.Create("c:\scripts\MyProgram.vbs", null,
> > null,intProcessID)
> >
> > If Error = 0 Then
> > MsgBox (strProcess & " was started with a process ID of " & intProcessID &
> > ".")
> >
> > Else
> > MsgBox (strProcess & " could not be started due to error " & _
> > errReturn & ".")
> >
> > End If
> >
> > ================================= So it does copy the program to c:\Scripts
> > of the remote PC but it wont run the program...I do believe that it kicks of
> > a wscript process in the process list on task manager. Please help
>
>
>
.



Relevant Pages

  • Re: Run a .vbs on a remote PC
    ... > I'm new to VBscript and trying to get MyProgram.vbs(which lists all ... > fine on the remote PC if I run it from there, but it wont work when I ... Microsoft MVP Scripting ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Connecting AS/400s
    ... Peter - did you call the remote modem via a normal phone to see if it picked ... > the FRAMERTY parameter is set for data service operation while the line is ...
    (comp.sys.ibm.as400.misc)
  • Run a .vbs on a remote PC
    ... I'm new to VBscript and trying to get MyProgram.vbs(which lists all software ... program runs fine on my local machine,and it runs fine on the remote PC if I ... run it from there, but it wont work when I try remotely, any help would be ... a wscript process in the process list on task manager. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Ftp script
    ... > peter wrote: ... >> ftp file from my c: drive to our server. ... >> on the remote system for the file. ... > and then use findstring to see whether 'filename' is in ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Is there a "remote control" available for XP Pro?
    ... but it just seemed like a "too big" item to play ... will the usual TV controls on the TV remote - such ... various keys, ...
    (microsoft.public.windowsxp.general)