Important alert: (current site time 7/16/2013 4:14:40 AM EDT)
 

VB icon

hack your user's Favorites folder

Email
Submitted on: 5/28/1998
By: Theo Kandiliotis  
Level: Not Given
User Rating: By 2 Users
Compatibility: VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 30199
 
     This code hacks your user's Favorites folder by manually adding a shortcut to your homepage (or any web page)
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: hack your user's Favorites folder
' Description:This code hacks your user's Favorites folder by manually adding a shortcut to your
homepage (or any web page)
' By: Theo Kandiliotis
'
' Assumes:This works for both IE and NetScape Navigator,I'm not sure about other browsers.The only 
limitation is that your user must have English Windows.
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=905&lngWId=1'for details.'**************************************

How to hack your user's Favorites folder
The Windows operating system is based on ASCII files.You may open a file that contains Windows settings using Visual Basic's sequential access and alter it's content in the same way it is altered through Windows,the compenent that uses it will never know the difference. For every Favorite page of the Internet Explorer,there is an ASCII file with a URL extention in the Windows\Favorites directory.It looks like this:
[InternetShortcut]
URL=http://www.hostname/folder/filename.htm...
and sometimes it may have an additional third line that changes when the link is modified.The filename of the URL file determines the name of the favorites link in the Favorites dropdown list of IE. Here's the Visual Basic code to "manually" add a favorite page to the user's archive: 
Open "C:\WINDOWS\FAVORITES\Theo's VB site.URL" For Output as #1
Write #1,"[InternetShortcut]"
Write #1,"URL=http://www.forthnet.gr/ionikh/home.htm"
Close #1
Tada! Your user just decided that your home page qualifies for his favorites archive ;) You can add this little snippet to any program that you distirbute or have posted on the web so that more and more people will come to agree that you have an outstanding home page that they should visit daily...Ofcourse I have no responsibility for anyone's actions ;)


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
4/21/1999 6:22:00 PMthumper

This will fail if the favorites folder is not located at c:\windows\favs.

Like an NT user! It will also not work for Netscape for Navigator doesnt look into the IE favorites folder. Nav creates a bookmark file.

this is garbage.

(If this comment was disrespectful, please report it.)

 
5/4/1999 2:09:00 AMTheo

thank you for your feedback friend.If you can can up with *garbage* like this ,you too might win some prizes from Planet Source Code !
(If this comment was disrespectful, please report it.)

 
5/7/1999 1:07:00 PMRobert Mayer

Thanks for the effort Theo, but I must agree with "thumper" that you cannot depend on assumptions made about the path to where the Favorites shortcuts reside. Even when installing Win95 or Win98 you can still decide to name your Windows directory something else. Also, if you use utilities such as TweakUI, like I do, you can choose to locate your Favorites folder on an entirely different drive than where your operating system is installed.
(If this comment was disrespectful, please report it.)

 
5/27/1999 12:57:00 PMJulius

I agree with both of you Robert and thumper. It will be possible to look for the favorites path, know if you are using Netscape or IE, etc...
I think that Theo just wrote an interesting piece of code: small, quick but not perfect. It will work for a lot of users. Windows is most often installed in the WINDOWS folder, and a lot of people are using IE.
Now you can always take his code and write a 'heavy' procedure to detect all the differents settings.
(If this comment was disrespectful, please report it.)

 
6/20/1999 12:25:00 AMRyan

I think it's a cool idea, but there's a way to find out what sort of browser name the user's got. I thinks you should use this code in an if statement to determine what directory the file goes in, by programming the different paths within the if statement.
(If this comment was disrespectful, please report it.)

 
7/11/1999 10:44:00 PMAbraham

I need to know how to use animation with VB or C , Im trying to let the user click on a button and they go somewhere else on the next screen. And my next question is how do you link forms like click a button and you go to the next form. thankx for your help bye
(If this comment was disrespectful, please report it.)

 
8/1/1999 12:23:00 PMGreg

The code wont work with everything, but it will work for around 50 percent of the users, and that enough for me. So thank for the code although if you can improve it- let me know. I make awesome backrounds for programs visit my site at http://members.xoom.com/backpaper200 i also improved youre code a little
(If this comment was disrespectful, please report it.)

 
8/18/1999 11:54:00 AMToad

Hack? This should not be allowed on this site... I think this code should be taken down immediately...
(If this comment was disrespectful, please report it.)

 
9/15/1999 4:37:00 AMDaniel

hahaha, hack hey, wow you must be pretty elite, about a year ago i was tangled in the hacking scene, i finally broke lose, and it aint as glamorous as a few lines of code pal. Why "HACK" your own PC, its just not ethical. Plus the sheer act of "HACKING" your favourites is just plane ridiculas.Get a life, and some knowledge while your at it!
(If this comment was disrespectful, please report it.)

 
10/1/1999 9:07:00 PMcode-munky

Just look in the registry for where the favs folder is. duh. HKEY_CLASSES_CURRENT_USER/software/microsoft/windows/currentversion/explorer/shell folders if i remember correctly, very simple solution to this prob ;)
(If this comment was disrespectful, please report it.)

 
10/18/1999 1:23:00 PMToM

haha i was just going to say that code-munky. i agree totally
(If this comment was disrespectful, please report it.)

 
2/15/2000 9:13:41 PMCoozzzzz

Let me see.. 100+ users rated quite well for this code.. 6 users dont like it.. jealousy is very painful isnt it? maybe oneday when yall avoid being a$$h0les you will get an award also.


Well keep up the good work Theo dont let these few get to you :))

-Coozzzzz
(If this comment was disrespectful, please report it.)

 
5/23/2000 7:05:48 PMAustin

wow, for all these bad comments, this source sure did get rated well. Ian, you might want to check the log to see if there were any patterns in rating that might indicate a *cheat* on the rating system. Personal note: I don't think the code is bad, it points out a great idea. It could use some work, though, like suggested above.

-Austin
(If this comment was disrespectful, please report it.)

 
5/20/2001 7:52:31 PMHarry

dude, it has a 5.5, last time i checked, 5 was the highest ya could get to....
(If this comment was disrespectful, please report it.)

 
11/15/2001 1:13:34 PMYello

How did this get a gold ....
I smell a rat .
(If this comment was disrespectful, please report it.)

 
10/11/2002 3:45:44 PMGWMorris

I know it's like beating a dead horse, but this has got to be one of the most immature bunch of comments I've yet to read! Sure the idea is OK, but anybody with half a brain (and who REALLY programs, for goodness' sake) could not only figure that out pretty easily, but could make it work with 99.5% of their users. The other 0.5% would use Linux or Mackintrash. I for one am amazed that this nonsense is still on here, three years old! Fact is, most of us ARE mature enough not to do something like this in the first place, n'est-ce pas? Oh, and the one who is asking VB questions like this was a help line or something.. what's that all about? Besides, if you seriously don't know how to open a form through code, you don't need to be driving a VB compiler anyway.
Cheers, kiddies..
(If this comment was disrespectful, please report it.)

 
12/10/2004 3:29:01 AMThe ZePPeLiN

This is realy a poor code for this rating, a lot of better codes got lower rating...this is weird..
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.