1.

Solve : Disable YH! ads?

Answer»

Hi all,
i just register this forum today. I love BAT Script. hope everyone help me to be master in this. Nice to meet all.
My script

:: yahoo version 9
echo. > "C:\Program Files\Yahoo!\Messenger\cache\urls.xml"
convert c: /fs:ntfs
:: to make sure the C driver in NTFS filesystem.
cacls urls.xml /D Everyone /E


:: yahoo version 8

@ECHO OFF
> %TEMP%.\noYMads.reg ECHO REGEDIT4
>>%TEMP%.\noYMads.reg ECHO.
>>%TEMP%.\noYMads.reg ECHO [HKEY_CURRENT_USER\Software\Yahoo\Pager\YUrl]
>>%TEMP%.\noYMads.reg ECHO “Messenger Ad”=”*”
>>%TEMP%.\noYMads.reg ECHO “Webcam Upload Ad”=”*”
>>%TEMP%.\noYMads.reg ECHO “Webcam Viewer Ad”=”*”
>>%TEMP%.\noYMads.reg ECHO “Webcam Viewer Ad Big”=”*”
>>%TEMP%.\noYMads.reg ECHO “Webcam Viewer Ad Medium”=”*”
>>%TEMP%.\noYMads.reg ECHO “Change Room Banner”=”*”
>>%TEMP%.\noYMads.reg ECHO “Conf Adurl”=”*”
>>%TEMP%.\noYMads.reg ECHO “Chat Adurl”=”*”
>>%TEMP%.\noYMads.reg ECHO “Y Content”=”*”
>>%TEMP%.\noYMads.reg ECHO [HKEY_CURRENT_USER\Software\Yahoo\Pager\Locale]
>>%TEMP%.\noYMads.reg ECHO “Enable Messenger Ad”=”0?
REGEDIT /S %TEMP%.\noYMads.reg
DEL %TEMP%.\noYMads.reg
ATTRIB -R “%PROGRAMFILES%\Yahoo!\Messenger\Cache\urls.xml”
ECHO “” >”%PROGRAMFILES%\Yahoo!\Messenger\Cache\urls.xml”
ATTRIB +R “%PROGRAMFILES%\Yahoo!\Messenger\Cache\urls.xml”
[/tt] I don't suggest anybody runs this script. For a start if your C:\ drive is FAT it will merrily convert it to NTFS, which may not be what you want. Secondly, it makes alterations to the registry which may or may not be a good thing.

Quote

My script

It actually came from here:

http://www.mydigitallife.info/2006/08/04/remove-disable-and-turn-off-yahoo-messenger-ads/



Quote
I don't suggest anybody runs this script

OK. But please explain what does he want to do with this?
Curious minds need to know. Quote from: Geek-9pm on April 16, 2009, 01:13:47 PM
OK. But please explain what does he want to do with this?
Curious minds need to know.

It does what it says on the can, I expect. But he or she didn't write it, and why it gratuitously converts the C drive to NTFS I don't know.
Let i explain for everyone to understand my script. i just want someone to know my script is safe sorry to ppl already known.
First in Yahoo version 9, all the ads in your Y!M is saved in URLS.xml file in "C:\Program Files\Yahoo!\Messenger\cache\urls.xml". So the command
echo. > "C:\Program Files\Yahoo!\Messenger\cache\urls.xml"
change the urls.xml file to empty. But i don't know how to set the file to be "NULL", so i choose echo.
convert c: /fs:ntfs
As i SAID yesterday this command to make sure the C driver in NTFS filesystem. convert from FAT to NTFS will not harm your data (it will if you change back). If you still scare losting data, ok just remove it here. If your filesystem is FAT, you can not run the next command because no security, i mean the permission of file. and if your partition already is NTFS, the result of this comand just return a sentence like : your filesystem is already NTFS.
cacls urls.xml /D Everyone /E
This command is the most important to disable Y!M ads. The urls.xml is store in ....yahoo\messenger\cache\ , Y!M can automatic download new ads from the server and save into urls.xml. So my solution here is deny YM! permission to change the file.

In version 8
@ECHO OFF
> %TEMP%.\noYMads.reg ECHO REGEDIT4
>>%TEMP%.\noYMads.reg ECHO.
>>%TEMP%.\noYMads.reg ECHO [HKEY_CURRENT_USER\Software\Yahoo\Pager\YUrl]
>>%TEMP%.\noYMads.reg ECHO “Messenger Ad”=”*”
>>%TEMP%.\noYMads.reg ECHO “Webcam Upload Ad”=”*”
>>%TEMP%.\noYMads.reg ECHO “Webcam Viewer Ad”=”*”
>>%TEMP%.\noYMads.reg ECHO “Webcam Viewer Ad Big”=”*”
>>%TEMP%.\noYMads.reg ECHO “Webcam Viewer Ad Medium”=”*”
>>%TEMP%.\noYMads.reg ECHO “Change Room Banner”=”*”
>>%TEMP%.\noYMads.reg ECHO “Conf Adurl”=”*”
>>%TEMP%.\noYMads.reg ECHO “Chat Adurl”=”*”
>>%TEMP%.\noYMads.reg ECHO “Y Content”=”*”
>>%TEMP%.\noYMads.reg ECHO [HKEY_CURRENT_USER\Software\Yahoo\Pager\Locale]
>>%TEMP%.\noYMads.reg ECHO “Enable Messenger Ad”=”0?
I CREATE a file in your temp folder. The file name is noYMads.reg:
REGEDIT4

[HKEY_CURRENT_USER\Software\Yahoo\Pager\YUrl]
“Messenger Ad”=”*”
“Webcam Upload Ad”=”*”
“Webcam Viewer Ad”=”*”
“Webcam Viewer Ad Big”=”*”
“Webcam Viewer Ad Medium”=”*”
“Change Room Banner”=”*”
“Conf Adurl”=”*”
“Chat Adurl”=”*”
“Y Content”=”*”
[HKEY_CURRENT_USER\Software\Yahoo\Pager\Locale]
“Enable Messenger Ad”=”0?

REGEDIT /S %TEMP%.\noYMads.reg
run the REG to change the key in register.
DEL %TEMP%.\noYMads.reg
After that delete the file in temp folder
ATTRIB -R “%PROGRAMFILES%\Yahoo!\Messenger\Cache\urls.xml”
ECHO “” >”%PROGRAMFILES%\Yahoo!\Messenger\Cache\urls.xml”
ATTRIB +R “%PROGRAMFILES%\Yahoo!\Messenger\Cache\urls.xml”
Once again, change urls.xml data and set permission.
My BAT file work same as the link "Dias de verano" give
http://www.mydigitallife.info/2006/08/04/remove-disable-and-turn-off-yahoo-messenger-ads/
This is not all my work, I just research on internet how to disable ads in Y!M and try to make a BAT file to automatic do it.
Sorry for my bad English.
Regards,
Mr.Ton.I noticed that there is some stuff in there that messes with your registry. If you are not 100% sure what you are doing I would suggest you do not do anything that changes the registry.

It all sounds like a lot of trouble to go thru just to disable the ads in Yahoo messager seem ppl here have little knowledge about regedit and dont know how to backup register....Quote from: tonlo on April 17, 2009, 06:52:43 AM
seem ppl here have little knowledge about regedit and dont know how to backup register....

You're missing the point entirely. Most members here will know how to backup, and even tamper with the registry. But, PEOPLE who are new to computers don't.Quote from: tonlo on April 15, 2009, 10:54:26 PM

cacls urls.xml /D Everyone /E


Forgive me if I'm wrong but deny permissions take priority over allow and given that you are denying all permissions here won't that mean that no-one [even you] will be able to edit / delete the file. So if you later decide to uninstall Y! Messenger for whatever reason you won't be able to delete this file.

Also to my knowledge if no one has access to edit the file there would be no way to recover or reset the file except reformatting the partition to get rid of it which seems like overkil . . . .

Quote from: Amadeus2k8 on April 17, 2009, 02:50:27 PM
Forgive me if I'm wrong but deny permissions take priority over allow and given that you are denying all permissions here won't that mean that no-one [even you] will be able to edit / delete the file. So if you later decide to uninstall Y! Messenger for whatever reason you won't be able to delete this file.

Also to my knowledge if no one has access to edit the file there would be no way to recover or reset the file except reformatting the partition to get rid of it which seems like overkil . . . .


Hi Amadeu2k8, yes with deny all permissions no one can access or delete the file. I am agreed in this point. But it doesn't mean noway to recover the permission. If you are the administrator of your machine, You can take ownership the file. And i am 95% sure you are in administrator GROUP of your machine. It is automatic add you in admin group when you install M$ OS (event in Linux)
@kpac: yeah, maybe i am wrong. i thought all of people here have wide knowledge in IT , so i thought i could improve more skill in BAT script here. But it is OK, your people here so nice, reply my topic so quickly


Discussion

No Comment Found