Quantcast
Results 1 to 6 of 6

System Priority

  1. #1
    sdruley is offline Junior Member
    Enjoys Windows 7 Forums
     
    Join Date
    Dec 2011
    Posts
    20
    Windows 7/Server 2008 R2 MS Internet Explorer 9.0

    Red face System Priority

    I have an important app running in Excel that takes 7 hours to complete. During that time the focus of the app is somehow diverted to something else in the Windows environment. When this happens the Excel program stops in its tracks until I click on it to give it back the focus.
    How can I increase the priority of Excel in the scheme of things so that this doesn't happen?

    Reply With Quote Reply With Quote

  2. #2
    patcooke's Avatar
    patcooke is online now Tier 2 Moderator
    Microsft Most Valuable
    Professional
     
    Join Date
    May 2010
    Age
    67
    Posts
    2,122
    Windows 7/Server 2008 R2 Firefox 11.0

    Re: System Priority

    You can do but be aware that it can cause stability problems:

    1. Open task manager (Ctrl/Shift/Esc).

    2. Right click the application you want to prioritise, "Go to Process."

    3. Right-click the process, "Set Priority". Choose from the range "realtime" (highest) to low (lowest).

    Reply With Quote Reply With Quote

  3. #3
    sdruley is offline Junior Member Thread Starter Thread Starter
    Enjoys Windows 7 Forums
     
    Join Date
    Dec 2011
    Posts
    20
    Windows 7/Server 2008 R2 Chrome 21.0.1180.83

    Re: System Priority

    Pat,
    Your response was timely and professional. I would like to know if there is a way to set up a bat file to do the above.

    Steve

    Reply With Quote Reply With Quote

  4. #4
    patcooke's Avatar
    patcooke is online now Tier 2 Moderator
    Microsft Most Valuable
    Professional
     
    Join Date
    May 2010
    Age
    67
    Posts
    2,122
    Windows 7/Server 2008 R2 Firefox 11.0

    Re: System Priority

    You could use the start command in a batch file using this format:

    start /priority path

    where priority is one of the range given above (realtime to low) and path is the full address of the application, eg:

    start /high %windir%\system32\notepad.exe

    would run the notepad utility with a priority of high.

    In this case call the batch file something like runNotepad.bat.

    Reply With Quote Reply With Quote

  5. #5
    sdruley is offline Junior Member Thread Starter Thread Starter
    Enjoys Windows 7 Forums
     
    Join Date
    Dec 2011
    Posts
    20
    Windows 7/Server 2008 R2 Chrome 21.0.1180.83

    Smile Re: System Priority

    So, I can run your suggested bat in the following vba code...

    Code:
    Sub ExecuteBAT()Dim wshThisShell As WshShell
    Dim lngRet As Long
    Dim strShellCommand As String
    Dim strBatchPath As String
    Set wshThisShell = New WshShell
    strBatchPath = "start /high %windir%\C:\TTND\Picasso.xlsm"
    strShellCommand = """" & strBatchPath & """"
    lngRet = wshThisShell.Run(strShellCommand, vbNormalFocus, vbTrue)
    End Sub
    Does this look right to you?

    Steve


    -------------------------------------------------------------------------------------------------------------
    Quote Originally Posted by patcooke View Post
    You could use the start command in a batch file using this format:

    start /priority path

    where priority is one of the range given above (realtime to low) and path is the full address of the application, eg:

    start /high %windir%\system32\notepad.exe

    would run the notepad utility with a priority of high.

    In this case call the batch file something like runNotepad.bat.

    Reply With Quote Reply With Quote

  6. #6
    sdruley is offline Junior Member Thread Starter Thread Starter
    Enjoys Windows 7 Forums
     
    Join Date
    Dec 2011
    Posts
    20
    Windows 7/Server 2008 R2 Chrome 21.0.1180.83

    Red face Re: System Priority

    Pat, I now have the following; but I am still getting the run time error -2147024894 (80070002) Automation error at the last line of code: "The system could not find the file specified".

    Code:
    Sub ExecutePriorityBAT()Dim wshThisShell As WshShell
    Dim lngRet As Long
    Dim strShellCommand As String
    Dim strBatchPath As String
    Dim strShellSubCommand As String
    Set wshThisShell = New WshShell
    strShellSubCommand = "start  /high"
    strBatchPath = "C:\Program Files\Microsoft Office\Office14\Excel.exe"
    strShellCommand = """" & strShellSubCommand & strBatchPath & """"
    lngRet = wshThisShell.Run(strShellCommand, vbNormalFocus, vbTrue)
    End Sub
    Steve

    Reply With Quote Reply With Quote

Similar Threads

  1. Lowering process priority and Affinity
    By zvit in forum Windows 7 Support
    Replies: 3
    Last Post: 08-25-2010, 09:33 AM
  2. HDD disappear from bios priority
    By maria in forum Windows 7 Support
    Replies: 2
    Last Post: 11-22-2009, 02:57 PM
  3. Boot Priority?
    By jake69 in forum Windows 7 Support
    Replies: 1
    Last Post: 01-15-2009, 02:07 PM
  4. Process priority
    By Taka in forum Windows 7 Support
    Replies: 0
    Last Post: 01-15-2009, 05:18 AM

Visitors found this page by searching for:

Search engine data is still being processed!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •