Finding specific text file (JSP) and editing it... - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

LCharlier
Posts: 13
Joined: Fri Jun 12, 2009 8:52 pm
Location: Lafayette, Louisiana, USA
Contact: Website

Finding specific text file (JSP) and editing it...

I need to find a JSP file on a customer's file system and then add four lines of text at a specific location within the file. It appears to me that "Edit Text File Update" could do what I want but I'm having trouble making it work.

Here's what I'm trying to achieve:
1) Search for specific file under "Program Files (x86)" folder.
2) When found, update contents via a search and replace.

Here's what I've done:
1) Under "Files and Folders", highlighted "Program Files" folder and selected "New Text File Update" from the context menu.
2) On "Edit Text File Update" dialog, specified file to search for in the "Files | Include" field. Selected "Search sub-folders" checkbox.]
3) On "Edit Text File Update" dialog under "Replace", specified the "Find" and "Replace" criteria.

What is currently happening:
If I run a "Test", I am prompted to browse to the file in question. When I subsequently select the file in question, it is correctly edited the way I want. If I try running the installer for real however, the file never gets updated - I think because it couldn't be found...

Can someone please point out my stupidity here? :D

Thanks.

Lloyd Charlier
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Finding specific text file (JSP) and editing it...

Hi Lloyd,
the file never gets updated
Can you please send us the .AIP (project file ), JSP file and its path on your test machine to support at advancedinstaller dot com so we can investigate?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
LCharlier
Posts: 13
Joined: Fri Jun 12, 2009 8:52 pm
Location: Lafayette, Louisiana, USA
Contact: Website

Re: Finding specific text file (JSP) and editing it...

Problem fixed! As predicted, the root cause was my fault as I had inadvertently selected "Program Files" instead of "Program Files 64" when defining the top-level folder for my search. When corrected, the search for the target file works just the way I wanted.

Thanks.

Return to “Common Problems”