I'm having an issue with an application that uses a VBscript to install
and hope someone can help me.

It will work fine regardless where I put if you double click it, it will
also work fine from a batch file if you double click the batch. It will
not run correctly from either the Application Launcher or the command
line. I have tried putting it in as a post launch script using the
wscript engine, from the run line, I have also tried to use the
cscript.exe all to no avail.
When it is run any way other than double clicking directly on the vbscript
or batch file you can see wscript.exe launch in the task manager but the
CPU stay hung at 50%. No errors it just hangs.
I put all the install files in the expected
directory "c:\windows\Temp\3rdParty" along with the script and batch
files. Below is the vb script, is there something in it causing this?
I also included the command line that I tried using, this is the same line
from the batch file. Also I have run other VBscripts from the command
line this way. Any thoughts?
Command line: c:\windows\system32\wscript.exe

Set WshShell = WScript.CreateObject("WScript.Shell")
Dim strPackagePath : strPackagePath = WshShell.ExpandEnvironmentStrings("%
Dim strPackageSubdir : strPackageSubdir = "3rdParty"
Dim installdir : installdir = WshShell.ExpandEnvironmentStrings("%
SystemDrive%\Program Files\eEye Digital Security\Blink")

Dim backuppath : backuppath = installdir
Dim tmppath : tmppath = ""
Dim newpath : newpath = ""
Dim TristateFalse : TristateFalse= 0
Dim strValue : strValue = ""
Dim filesys, file, ts
Const ForAppending = 8
Const ForReading = 1


Set filesys = CreateObject("Scripting.FileSystemObject")
Set file = filesys.GetFile("settings.txt")
Set ts = file.OpenAsTextStream( ForReading )

Const HKEY_LOCAL_MACHINE = &H80000002
Set oReg=GetObject("winmgmts:{impersonationLevel=imper sonate}!
HKEY_LOCAL_MACHINE,"SOFTWARE\eEye\Blink","InstallP ath",strValue

if strValue <> "" Then
'Wscript.echo "Blink is already installed on this machine.
Aborting installation..."
End if

'delete the remnant Blink folder
If filesys.FolderExists( installdir ) Then
filesys.DeleteFolder( installdir )
End if

'parse the MSI options file and see if the expanded paths are present
Do While Not ts.AtEndOfStream
if InStr(ts.ReadLine, "INSTALLDIR=") > 0 Then
AlreadyModified = 1
End if

if AlreadyModified = 0 Then

'Append the expanded paths to the MSI configuration file
Set ts = file.OpenAsTextStream( ForAppending )
ts.WriteLine("INSTALLDIR=" & installdir)
ts.WriteLine("THIRDPARTY=" & strPackagePath & strPackageSubdir
& "\eeyeremoteinstall.exe")

End If

Dim nIndex

nIndex = InStr(backuppath, "\")

while nIndex > 0

tmppath = Left(backuppath, nIndex)
backuppath = Right(backuppath, Len(backuppath) - nIndex)

newpath = newpath + tmppath

If Not filesys.FolderExists(newpath) Then
Set newfolder = filesys.CreateFolder(newpath)
End If

nIndex = InStr(backuppath, "\")


If Len(backuppath) > 0 Then

newpath = newpath + backuppath

If Not filesys.FolderExists(newpath) Then
Set newfolder = filesys.CreateFolder(newpath)
End If

End If

'create c:\windows\Temp1\3rdparty
if filesys.FolderExists(strPackagePath) = 0 Then
End If

if filesys.FolderExists(strPackagePath & strPackageSubdir) = 0 Then
filesys.CreateFolder(strPackagePath & strPackageSubdir)
End If

strPackagePath = strPackagePath + strPackageSubdir

'get the current folder
set file = filesys.GetFile("settings.txt")
filesys.CopyFolder file.ParentFolder , strPackagePath

'Stop and delete the eEye Remote Install Service if is running on the
Set WshShell = WScript.CreateObject("WScript.Shell")

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonat e}!

Set colServiceList = objWMIService.ExecQuery ("Select * from Win32_Service
where Name='eEyeRmtInst'")

For Each objService in colServiceList

'Wscript.echo "Installing Blink. Please wait..."

WshShell.Run "cmd /C start /wait " & chr(34) & "Installing Blink..." & chr
(34) & " " & strPackagePath & "\Setup.exe /qn /Liom " & chr(34) &
installdir & "\BlinkSetup.log" & chr(34) & " OPTIONFILE=" & chr(34) &
strPackagePath & "\settings.txt" & chr(34), 0, true

'Enable debugging for Blink components (do so only if instructed by the
Support Department)

'oReg.SetDWORDValue HKEY_LOCAL_MACHINE,"SOFTWARE\eEye\Blink","Blinksvc ",2
'oReg.SetDWORDValue HKEY_LOCAL_MACHINE,"SOFTWARE\eEye\Blink","Blink",2
'oReg.SetDWORDValue HKEY_LOCAL_MACHINE,"SOFTWARE\eEye\Blink","Blinkrm" ,2
'oReg.SetDWORDValue HKEY_LOCAL_MACHINE,"SOFTWARE\eEye\Blink","cpupdate ",2

' Start the eEye Remote Install Service to finalize the deployment
Set colServiceList = objWMIService.ExecQuery ("Select * from Win32_Service
where Name='eEyeRmtInst'")

For Each objService in colServiceList
errReturn = objService.StartService()