Monday, November 29, 2010

You don’t currently have permission to access this folder.

Problem : Whenever trying to access files or folders which current login account don't have permission but belong to administrator group, the system will prompt :

You don’t currently have permission to access this folder.


If you click continue button , the system will add the current login account into the ACL which you might want it to happen because this will mess up your ACL.

Solution : Run Explorer.exe as administrator.

You might see some solution suggest to run explorer.exe as administrator. If you create a shortcut at desktop to launch the explorer.exe and right click select Run As Administrator. But soon or later you will notice the problem still remain.

After searching around , I found the trick which a lot of them didn't mention in their answer.

The trick : Modify the registry.

Changing the registry setting “RunAs” to “_RunAs” in HKEY_CLASSES_ROOT\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}.

Tested on my machine , this trick is working.

Solution found from here : http://www.theexperienceblog.com/2010/09/18/case-of-the-mysterious-issues-in-windows-7-and-windows-server-2008-r2/



---

Thursday, November 18, 2010

Convert HTML to Plain Text

If you having the same problem like me wanted to display HTML tag in post body, you can refer to this page:

http://www.blogspottutorial.com/2008/12/html-code-appears-in-posting.html



---

Very Silly Method to strip off html to get url

I know this is a very silly method on stripping off html tag from the html source code in order to retrieve the jpg url but it work , so I record down for my own use.


1. Prepare a file with all the html code and save it as txt.txt.

< onblur=" try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="">http://2.bp.blogspot.com/_YF1tNfQVN8w/TN66Xjc_9VI/AAAAAAABjUw/y_ImZpICYEE/s1600/53.jpg" > < style=" float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 266px; height: 400px;" src=" http://2.bp.blogspot.com/_YF1tNfQVN8w/TN66Xjc_9VI/AAAAAAABjUw/y_ImZpICYEE/s400/53.jpg" alt=" " id=" BLOGGER_PHOTO_ID_5539069505528919378" border=" 0"> < /a>

2. awk 'BEGIN { RS="href=\"" } { print $1}' txt.txt >txt2.txt

http://1.bp.blogspot.com/_YF1tNfQVN8w/TN64I5jNF3I/AAAAAAABjOQ/Ykc2T_qJ3k4/s1600/1.jpg" > < style=" float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 266px;" src=" http://1.bp.blogspot.com/_YF1tNfQVN8w/TN64I5jNF3I/AAAAAAABjOQ/Ykc2T_qJ3k4/s400/1.jpg" alt=" " id=" BLOGGER_PHOTO_ID_5539067054739232626" border=" 0">


3. awk '{ FS="\""; print $1}' txt2.txt >txt3.txt

http://1.bp.blogspot.com/_YF1tNfQVN8w/TN64I5jNF3I/AAAAAAABjOQ/Ykc2T_qJ3k4/s1600/1.jpg

4. Then use the script to generate the picture link that I want.

#!/bin/bash
while read inputline
do
echo '<> < title=" title" rel=" lightbox" href=""> > txt4.txt
echo ${inputline} > > txt4.txt
echo '" > < src=""> > txt4.txt
echo ${inputline} > > txt4.txt
echo '" alt=" alt text" title=" title" width=" 600" /> < /a> < /p> ' > > txt4.txt
# echo ${inputline}
done < txt3.txt
exit 0

That it . I know it can be shorter , but my skill level only up to this. Welcome expert to teach me better way of doing . Thank you.



---