Web Images News Groups Scholar Blogs Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Write something while app runing
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Marta  
View profile  
 More options Oct 30, 10:36 am
Newsgroups: microsoft.public.scripting.vbscript
From: "Marta" <I301...@hotmail.com>
Date: Fri, 30 Oct 2009 11:36:29 +0100
Local: Fri, Oct 30 2009 10:36 am
Subject: Write something while app runing
Hi! i need your herp for following:

My vbs launch an application:
Wscript.Echo "Application is running."
allwaySinc = "syncappw.exe -s  -m -lf ""c:\sinc_logs"" -e"
objShell.Run allwaySinc, 2, True

I would like write something while the app is running because it can take
several minutes. something like woulg be great!
..........................................................................
..........................................................................
.....................................................

Thanks in advance!
I301199


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pegasus [MVP]  
View profile  
 More options Oct 30, 11:18 am
Newsgroups: microsoft.public.scripting.vbscript
From: "Pegasus [MVP]" <n...@microsoft.com>
Date: Fri, 30 Oct 2009 12:18:48 +0100
Local: Fri, Oct 30 2009 11:18 am
Subject: Re: Write something while app runing

"Marta" <I301...@hotmail.com> wrote in message

news:1E46E741-A4F6-4A86-A109-0CA4824BC0C4@microsoft.com...

> Hi! i need your herp for following:

> My vbs launch an application:
> Wscript.Echo "Application is running."
> allwaySinc = "syncappw.exe -s  -m -lf ""c:\sinc_logs"" -e"
> objShell.Run allwaySinc, 2, True

> I would like write something while the app is running because it can take
> several minutes. something like woulg be great!
> .....................................................

> Thanks in advance!

Write something where?

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Lavedas  
View profile  
 More options Oct 30, 12:32 pm
Newsgroups: microsoft.public.scripting.vbscript
From: Tom Lavedas <tglba...@cox.net>
Date: Fri, 30 Oct 2009 05:32:23 -0700 (PDT)
Local: Fri, Oct 30 2009 12:32 pm
Subject: Re: Write something while app runing
On Oct 30, 6:36 am, "Marta" <I301...@hotmail.com> wrote:

> Hi! i need your herp for following:

> My vbs launch an application:
> Wscript.Echo "Application is running."
> allwaySinc = "syncappw.exe -s  -m -lf ""c:\sinc_logs"" -e"
> objShell.Run allwaySinc, 2, True

> I would like write something while the app is running because it can take
> several minutes. something like woulg be great!
> ..........................................................................
> ..........................................................................
> .....................................................

> Thanks in advance!
> I301199

Assuming the string of periods are to be displayed in a console window
(at the command prompt), then something like this should do what you
want when executed under the cscript.exe host ...

Const HIDDEN_WINDOW = 0

allwaySinc = "syncappw.exe -s  -m -lf ""c:\sinc_logs"" -e"

Set oWMISrvc = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set oConfig = oWMISrvc.Get("Win32_ProcessStartup").SpawnInstance_
oConfig.ShowWindow = HIDDEN_WINDOW
Set oProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!"
_
    & "\\.\root\cimv2:Win32_Process")
errReturn = oProcess.Create(allwaySinc, null, oConfig, iProcessID)

n = 0
if errReturn = 0 then
  do While IsRunning(iProcessID, oWMISrvc)
    wsh.sleep 100
    n = n + 1
    if (n Mod 10) = 0 then wsh.StdOut.write "."
    if n = 72 then n = 0 : wsh.echo
    loop
end if

Function IsRunning(ProcessID, oWMISrvc) ' boolean
Dim sQry
  sQry = "SELECT * FROM Win32_Process WHERE ProcessID = '" _
       & ProcessID & "'"
  IsRunning = (oWMISrvc.ExecQuery(sqry).count > 0)
end function

(Watch for line wrapping in posting.)
_____________________
Tom Lavedas


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marta  
View profile  
 More options Oct 31, 10:29 pm
Newsgroups: microsoft.public.scripting.vbscript
From: "Marta" <I301...@hotmail.com>
Date: Sat, 31 Oct 2009 23:29:31 +0100
Local: Sat, Oct 31 2009 10:29 pm
Subject: Re: Write something while app runing

Thanks! It works!

"Tom Lavedas" <tglba...@cox.net> escribiķ en el mensaje de
noticias:49809721-17fd-489f-b12c-9ca851789...@k17g2000yqb.googlegroups.com...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Lavedas  
View profile  
 More options Nov 2, 1:32 pm
Newsgroups: microsoft.public.scripting.vbscript
From: Tom Lavedas <tglba...@cox.net>
Date: Mon, 2 Nov 2009 05:32:32 -0800 (PST)
Local: Mon, Nov 2 2009 1:32 pm
Subject: Re: Write something while app runing
On Oct 31, 5:29 pm, "Marta" <I301...@hotmail.com> wrote:

> Thanks! It works!

You're welcome.  Thanks for the feedback.  Glad I could help.
_____________________
Tom Lavedas

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google