
Technology: Windows Batch File
Definition: For users who like to open multiple instances of excel and tend to have “ghost” instances of excel running and are unable to perform Essbase retrieves.
Solution: You can create a batch file that runs a vbs file to kill all instances of excel so that you don’t have to search through task manager to find the “ghost” instance.
Create a vbs file with the code below:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = 'Excel.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Create a windows batch file to call this script and when the batch runs, it will kill all instances of excel.
When the user reopends excel, Essbase should retrieve normally. Example code below:
@echo on
REM Created By: Adi Strategies
REM Date Created: 03/18/2011
REM Script Definition: Kills Excel
REM reports.
TITLE RUN_EXCEl_REPORTS.bat
ECHO **************************************************
"C:\Users\User\ADI\Client\reports\Kill_Excel.vbs"
ECHO ==================================================
Download: https://adistrategies.egnyte.com/h-s/20111026/af998c01a7004796
Categories: | Other |
Added: 2011-10-25
Print Page |Share Via »