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.Code: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""" End If 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!
There are currently 1 users browsing this thread. (0 members and 1 guests)