[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

phil hunt

9/22/2011 12:35:00 AM

I have a exe that I shell out from an interactive app. Is there a way to set
that exe to a low priority task because it is just doing some backup. I have
all the source code.

Thanks


5 Answers

(nobody)

9/22/2011 12:39:00 AM

0

"phil hunt" <a@abc.com> wrote in message
news:j5dvrv$fgt$1@speranza.aioe.org...
>I have a exe that I shell out from an interactive app. Is there a way to
>set that exe to a low priority task because it is just doing some backup. I
>have all the source code.

Search the newsgroups or web for "vb SetPriorityClass", or "vb
CreateProcess".



christery

9/22/2011 4:37:00 AM

0

On 22 Sep, 02:35, "phil hunt" <a...@abc.com> wrote:
> I have a exe that I shell out from an interactive app. Is there a way to set
> that exe to a low priority task because it is just doing some backup. I have
> all the source code.
>
> Thanks

Check on the Start Command. I think /LOW will do the trick.
Open a Command Prompt (type) Start /?

James Tyler

9/22/2011 2:33:00 PM

0

That's a lot easier. But I am having problem doing it from VB6

This one works
Call Shell(Environ$("COMPSPEC START") & "C:\My\maint.exe ", vbNormalNoFocus)


This one does not work
Call Shell(Environ$("COMPSPEC START") & "C:\My\maint.exe /LOW",
vbNormalNoFocus)


Am I missing some punctuation mark?


"CY" <christery@gmail.com> wrote in message
news:7edcca80-ee78-4151-aa7a-74e581380d26@b28g2000yqa.googlegroups.com...
> On 22 Sep, 02:35, "phil hunt" <a...@abc.com> wrote:
>> I have a exe that I shell out from an interactive app. Is there a way to
>> set
>> that exe to a low priority task because it is just doing some backup. I
>> have
>> all the source code.
>>
>> Thanks
>
> Check on the Start Command. I think /LOW will do the trick.
> Open a Command Prompt (type) Start /?
>


Dee Earley

9/22/2011 2:53:00 PM

0

On 22/09/2011 15:33, Phil Hunt wrote:
> That's a lot easier. But I am having problem doing it from VB6
>
> This one works
> Call Shell(Environ$("COMPSPEC START")& "C:\My\maint.exe ", vbNormalNoFocus)
>
> This one does not work
> Call Shell(Environ$("COMPSPEC START")& "C:\My\maint.exe /LOW",
> vbNormalNoFocus)
>
> Am I missing some punctuation mark?

Amongst other things, I don't see how the first works as it's equally
broken.
Can you also try copying and pasting your code rather than retyping it
as it can hide problems.
Thirdly, when you says "it doesn't work", try qualifying it with how it
doesn't work or the error message.

Having said all that...

1) "COMSPEC" (Not "COMPSPEC" or even "COMPSPEC START") is the
environment variable and is the only value that should be in the call to
Environ.
2) You have no space between the "start" and your app in the resulting
string
3) "/low" goes between start and the app path

Try:
Shell Environ$("COMSPEC") & " /c START /low ""C:\My\maint.exe""",
vbNormalNoFocus

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

James Tyler

9/22/2011 3:04:00 PM

0

Thanks Deanna, your suggestion works.

Actually my mispelled thing did works, just not the right way.
Environ$("COMPSPEC START") evaulate to space and the whole thing works


"Deanna Earley" <dee.earley@icode.co.uk> wrote in message
news:j5fi48$3bd$1@speranza.aioe.org...
> On 22/09/2011 15:33, Phil Hunt wrote:
>> That's a lot easier. But I am having problem doing it from VB6
>>
>> This one works
>> Call Shell(Environ$("COMPSPEC START")& "C:\My\maint.exe ",
>> vbNormalNoFocus)
>>
>> This one does not work
>> Call Shell(Environ$("COMPSPEC START")& "C:\My\maint.exe /LOW",
>> vbNormalNoFocus)
>>
>> Am I missing some punctuation mark?
>
> Amongst other things, I don't see how the first works as it's equally
> broken.
> Can you also try copying and pasting your code rather than retyping it as
> it can hide problems.
> Thirdly, when you says "it doesn't work", try qualifying it with how it
> doesn't work or the error message.
>
> Having said all that...
>
> 1) "COMSPEC" (Not "COMPSPEC" or even "COMPSPEC START") is the environment
> variable and is the only value that should be in the call to Environ.
> 2) You have no space between the "start" and your app in the resulting
> string
> 3) "/low" goes between start and the app path
>
> Try:
> Shell Environ$("COMSPEC") & " /c START /low ""C:\My\maint.exe""",
> vbNormalNoFocus
>
> --
> Dee Earley (dee.earley@icode.co.uk)
> i-Catcher Development Team
> http://www.icode.co.uk...
>
> iCode Systems
>
> (Replies direct to my email address will be ignored.
> Please reply to the group.)