Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Search for File problem Wise Script and Windows 7

Created: 11 Apr 2011 | 4 comments

I am writing a complicated installation interface for my company that requires that I search for a particular .XML based configuration file.  There will be several instances of the same file on each device, so I am searching for this particular file (we'll name it dot.exe.config) and want to return the cr/lf list of these files in Wise Script.

I wrote the appropriate code and had it looking very nice, until my Windows 7 development machine stopped allowing the "Search for File" item in the script.  Now, the .EXE begins the Search for File item and after a very brief search (about 1.5 seconds), Windows 7 returns saying that my .EXE has "Stopped Running".

[IMG]http://i1194.photobucket.com/albums/aa380/mcseforsale1970/ERRORS/TEMPLATE_ERROR.jpg[/IMG]

If I take the .EXE to another system, it works fine.  Please help me not have to rebuild my dev box!!!

Thanks,

AJ

Comments 4 CommentsJump to latest comment

mcseforsale's picture

Also, if I choose to return the first instance of the file, it appears to work OK.  But, if I choose to return a CR/LF list of instances, this is when it fails.

I'm running WPS 7.0 SP3

Thanks!

AJ

EdT's picture

Perhaps we could start with some information on which folders you are searching, and what context the Wisescript is running in. Also, have you tried with UAC turned off - this will quickly establish if a permission problem is to blame. 

What I would also recommend is that you grab a copy of the Process Monitor utility from Sysinternals as this will quickly reveal any "access denied" issues that your code may be encountering.  

I cannot comment on the integrity of your dev box, but would add that using VMs for dev and test gives you a platform that can be rolled back to a known good snapshot if things go wrong. However, it would be useful to track down the cause in case you run into other machines that exhibit the same problem.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

mcseforsale's picture

I've found a workaround.  When I choose "Return CR/LF Separated list of all files" and fill in the "Search Depth" field with something other than "0", such as 12 or 15, it works fine. 

Something about Windows 7 (or a subsequent KB) is not allowing it to search the entire drive willy-nilly.  Since my client configuration won't fall outside the 3rd or 4th deep directory, I should be fine with a 12 or 15 deep directory search.

 Thanks for the reply and I will definately try the things you suggested to find the RC.

AJ

EdT's picture

Windows 7 has a number of folders in the user profile that are "virtual" for want of a better word, and exist to provide a level of backward compatibility with XP, but report "access denied" if you try and access them directly. There are also restrictions on even admin users when UAC is on, unless elevation has been enabled for the session, so I can forsee many possible points where a search could run into problems.

If your target files are never going to be more than 3 or 4 levels deep, why not set the search depth to 5, rather than 12 or 15, to avoid wasting time iterating through folder trees that won't yield any hits.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.