VMware Horizon Community
OracleADI
Contributor
Contributor

VB script crash thinapp

I set small VB script on my thinapp, when I try to run appslication on win7 64 bit the app is crashing, when I remove the VB script all works fine. I even try just to please empy file Thinapp.vbs as soon its sees the vb file it crash Thank you, ' DECLARE VARIABLES ' DECLARE VARIABLES Dim WSHNetwork, WSHShell, objFSO, objShell Dim sDrive, sShare, sName ' SET GLOBAL VARIABLES Set WSHNetwork = CreateObject("WScript.Network") Set WSHShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Shell.Application") Function OnFirstParentStart strComputer = "." strProcessToKill = "excel.exe" SET objWMIService = GETOBJECT("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") SET colProcess = objWMIService.ExecQuery _ ("Select * from Win32_Process Where Name = '" & strProcessToKill & "'") count = 0 FOR EACH objProcess in colProcess 'objProcess.Terminate() count = count + 1 If count > 0  then MsgBox("You have Excel 2010 running please close all Excel ") ExitProcess 0 'Exist the current process Exit For end if NEXT End Function

0 Kudos
3 Replies
Lakshman
Champion
Champion

Can you check the script outside the ThinApp to make sure it works?

0 Kudos
OracleADI
Contributor
Contributor

yes it dose

0 Kudos
OracleADI
Contributor
Contributor

removed OLEAUT32.dll  from %SystemSystem% it resolved the issues

0 Kudos