Re: VBS error all of the sudden.

Brian Wolven <[email protected]>
Newsgroups gmane.comp.windows.shells.litestep
Message-ID <[email protected]>
ilmcuts wrote:
> Brian Wolven schrieb:
>> The script finds updateExe by looking through the list of processes 
>> for a running litestep.exe. I think that what must be happening when 
>> you are both logged in is that the script finds the EXE that belongs 
>> to the other user, but then has no permission to perform a bang with 
>> that process.
> 
> Sounds about right. But how do you call a !bang for/with a specific 
> process?

I don't know. =(

I can select the correct process by modifying the code from this:

  For Each aProcess in oProcess
    updateExe = """" & aProcess.ExecutablePath & """"
  Next

to this:

  UserName = wshshell.ExpandEnvironmentStrings("%USERNAME%")

  For Each aProcess in oProcess
    retval = aProcess.GetOwner(procOwner)
    If (procOwner = UserName) Then
      updateExe = """" & aProcess.ExecutablePath & """"
    End If
  Next

However since the path to the Exe is the same for either user, there is 
no way to execute the bang within the context of a given process - at 
least not from an "external" command like that used by the script. The 
reason for calling the bang from the script in the first place was that 
only the script knew when the script was done. Other methods always ran 
into timing issues (site slow to respond, etc.).

It seems like the obvious solution would be to ditch the script and 
rewrite the whole thing as a module. =)


---------------------------------------------------------------------
    Can't Unsubscribe? Check http://desktopian.org/listunsub.html
        LS List Homepage: http://wuzzle.org/list/litestep.php
            Get the LS FAQ: http://lsfaq.shellfront.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.