I have the following script that has been in place and working for sometime now on literally hundreds of our XP Pro machines:
We're preparing to roll out some new Win7 Pro laptops and this script is needed there as well but when I attempt to run it on the Win7 machine I get the following:
Hoping someone can point me to what I'm missing on the Win7 machines to get this working properly..
Thank you...
Code:
CONST SHOW_ACTIVE_APP = 1
Set shell = createobject("Wscript.Shell")
Dim X
Dim Y
Dim strArgValue
Dim tabValue
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'imagenow.exe'")
If colProcesses.Count = 0 Then
MsgBox "Please take a moment to log into ImageNow and then try your search again", 48, "ATTENTION: Login Required"
shell.run ("""C:\Program Files\ImageNow6\bin\imagenow.exe"""), SHOW_ACTIVE_APP, True
Else
Set imagenowAPI = GetObject( , "imagenow6.CtrlPanel")
Set objArgs = WScript.Arguments
' Configure request parameters
Set viewRequest = imagenowAPI.INCreateViewRequest()
strArgValue = objArgs(0)
tabValue = ("'" & strArgValue & "'")
X = viewRequest.SetViewName("All Documents", "Document")
'This is where you'll insert the patient account number
Y = viewRequest.SetVSLFilterText("[Tab] = " & tabValue)
' Now, let's open up the view in the full client
viewRequest.OpenInClient()
end if
We're preparing to roll out some new Win7 Pro laptops and this script is needed there as well but when I attempt to run it on the Win7 machine I get the following:
Hoping someone can point me to what I'm missing on the Win7 machines to get this working properly..
Thank you...