I need help with a script I am working on. I am looking to find a file by extension, put that script in the All Users profile and have it run on startup. The problem is I need the script to go out search the C: drive and find the file by the file extension not the file name. I have written a similar program here that finds it via the full file name. If anyone can help it would be really appreciated.
Set objNetwork = CreateObject("WScript.Network")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strCompName = objNetwork.ComputerName
If Instr(1,LCase(strCompName),"VCAE",1) > 1 Then
wshShell.run chr(34) & "C:Program FilesAvayaAvaya IP AgentIpAgent.exe" & chr(34) & "/lang enu",1,true
ElseIf objFSO.FileExists("C:Documents and SettingsAll UsersStart MenuProgramsCSG Systemsacsr.lnk") Then
wshShell.run chr(34) & "C:Documents and SettingsAll UsersStart MenuProgramsCSG Systemsacsr.lnk" & CHR(34),1,false
Else wshShell.run chr(34) & "C:Documents and SettingsAll UsersStart MenuProgramsCSG Systemsnt acsr.lnk" & CHR(34),1,false
If objFSO.FileExists("C:Program FilesWallDataMFRAMErumbaprt.exe") Then
wshShell.run chr(34) & "C:Program FilesWallDataMFRAMErumbaprt.exe" & CHR(34),1,false
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.
Your password has been sent to:firstname.lastname@example.org
To follow this tag...
Thanks! We'll email you when relevant content is added and updated.
Share this item with your network: