VBScript Logon Script not executing another file
I have the following script:
This is assigned to a few OUs. The script is definately executing (as evidenced by a couple of MsgBox calls dabbled throughout the program) and the If statement is definately returning TRUE. The program (YWPlatform.exe) does not execute on logon. However, if I create a shortcut to the script (which resides on SysVol) and execute it under one of our student user accounts (one under the OU that is executing the VBS file), the program runs absolutely fine.
Set objShell = CreateObject("WScript.Shell")
Set objNetwork = CreateObject("WScript.Network")
If StrComp(Mid(objNetwork.ComputerName, 1, 4), "I1ZC") = 0 Then
objShell.run """C:\Program Files\YouthWire\YWPlatform.exe"""
Set objNetwork = Nothing
Set objShell = Nothing
One thing I have noticed is that I get a File Security Warning dialog box asking me if I want to Open or Cancel running the VBS file - however this does not pop up when run on logon. Any advice on how to get the program to execute on logon would be most appreciated!