WiseScript Check In-use File
Hey everyone. I'm trying to run a very basic script, failing horribly so I figured I'd throw out a post. All I'm trying to do is check if excel is running and if it is display a message. Here's my script.
Check In-use File c:\program files\microsoft office\office11\excel.exe - Variable FILEINUSE is defined here.
If FILEINUSE Equals "In-Use" then
Display Message "Smartview Upgrade"
End
Any help would be appreciated. Thanks in advance
Check In-use File c:\program files\microsoft office\office11\excel.exe - Variable FILEINUSE is defined here.
If FILEINUSE Equals "In-Use" then
Display Message "Smartview Upgrade"
End
Any help would be appreciated. Thanks in advance
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
ditch_nz
13 years ago
it's the quotes around the Equals "In-Use"...remove them
tried this and it works...
item: Custom Script Item
Filename=Check In-use File.wse
Variable Name1=_INUSE_VAR_
Variable Value1=EXCEL
Variable Name2=HELPFILE
Variable Value2=C:\Program Files\Altiris\Wise Package Studio\Help\WiseScriptEditor.chm
Variable Name3=_INUSE_PATH_
Variable Value3=C:\Program Files\Microsoft Office\OFFICE11\Excel.exe
end
item: If/While Statement
Variable=EXCEL
Value=In-Use
end
item: Display Message
Title=InUse
Text=InUse
end
item: Else Statement
end
item: Display Message
Title=Not InUse
Text=Not InUse
end
item: End Block
end
tried this and it works...
item: Custom Script Item
Filename=Check In-use File.wse
Variable Name1=_INUSE_VAR_
Variable Value1=EXCEL
Variable Name2=HELPFILE
Variable Value2=C:\Program Files\Altiris\Wise Package Studio\Help\WiseScriptEditor.chm
Variable Name3=_INUSE_PATH_
Variable Value3=C:\Program Files\Microsoft Office\OFFICE11\Excel.exe
end
item: If/While Statement
Variable=EXCEL
Value=In-Use
end
item: Display Message
Title=InUse
Text=InUse
end
item: Else Statement
end
item: Display Message
Title=Not InUse
Text=Not InUse
end
item: End Block
end
Posted by:
insomnio77
13 years ago
Hello guys!!
I'm making a script with WiseScript to install an application, but I need to check if the user is logged in or not. I used the "Check In-Use file" to check if used the "explorer.exe" file is in use. But in Windows 7 platform, I always have the same result "No user logged in" with user logged in or not. [:(]
I was reading some KB articles that said the "Check In-Use file" option is not working properly with files under the Windows directory on Windows 7...
Can you help me with this? Maybe someone has another option to check if the user is logged in or not.
Thank you very much!!
I'm making a script with WiseScript to install an application, but I need to check if the user is logged in or not. I used the "Check In-Use file" to check if used the "explorer.exe" file is in use. But in Windows 7 platform, I always have the same result "No user logged in" with user logged in or not. [:(]
I was reading some KB articles that said the "Check In-Use file" option is not working properly with files under the Windows directory on Windows 7...
Can you help me with this? Maybe someone has another option to check if the user is logged in or not.
Thank you very much!!
Comments:
-
Insomio77, I'm having the same issue as you. I need to put a condition in for if a user is logged in or not. Do you ever find a solution? - wdjenkins 12 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.