Jump to content
Sign in to follow this  
theratzenator

Need a Script to Search User's Profiles to see if a File Exist

Recommended Posts

theratzenator

I need a script to find a file located in the following location:

"C:\Documents and Settings\<username>\Application Data\Macromedia\Flash Player\www.macromedia.com\bin\ciscounifiedaddin6x5\ciscounifiedaddin6x5.exe"

What I want is for a script to search a user's profile until it finds the "ciscounifiedaddin6x5.exe" file, when it does find it, I want it to call on an a program to run an installation. It would be easier for me to write a script that can do this if the file was located in the Program Files location or C:\ or C:\Windows or some other static location, but since user profile directories are of course different, how do I tell the script to scan a user profile's hidden Application Data location until it finds this file? I dont want the script to keep scanning even after it finds the "ciscounifiedaddin6x5.exe", I just want it to keep scanning UNTIL it finds even just one of these files, and if so, run a program. Your help is greatly appreciated.

Thank you

Share this post


Link to post
Share on other sites
Blue_Drache

Ok ... hold the phone. Is the update file always in the same location? ... the whole ... %appdata%\Macromedia\Flash Player\www.macromedia.com\bin\ciscounifiedaddin6x5\ciscounifiedaddin6x5.exe location?


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites
kaotkbliss

to further on blu_drache

if this is the case, then it is a simple:

$file = FileExists("path");checks if file exists 0 = no, 1 = yes

Do

Sleep(10)

$file = FileExists("path")

Until $file = 1;if, for some reason 1 is not working you could also say Until $file <> 0

rest of code


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×