Page 1 of 1

Heavy Wizardry? Or Simple Skript-Kiddiotry? :P :D

Posted: 2003-11-13 04:35am
by Einhander Sn0m4n
I went to C:\WINNT\Web and edited the standard.htt template to disable Explorer's Preview function for sounds and videos as a workaround for Explorer.exe's annoying habit of crashing when it tries to preview certain MP3s and movie files. Here's what I did:

Code: Select all

        function IsMovieFile(ext) {
            return false;
            var types = ",asf,avi,m1v,mov,mp2,mpa,mpe,mpeg,mpg,mpv2,qt,asx,";
            var temp = ","+ext+",";
            return types.indexOf(temp) > -1;
        }

        function IsSoundFile(ext) {
            return false;
            var types = ",aif,aiff,au,mid,midi,rmi,snd,wav,mp3,m3u,wma,";
            var temp = ","+ext+",";
            return types.indexOf(temp) > -1;
        }
I simply inserted |return false;| lines right after the |function IsMovieFile(ext) {| and |function IsSoundFile(ext) {| lines. Elegant, isn't it? Then I saved it, and expect to have all MP3 and movie preview functions effectively disabled. Presto, I refreshed a folder and clicked on a known 'crash' mp3. No crash.

I forgot where I saw this at (Nevermind, I found it), but it worked wonders.

I R -+31337+- H4x0r!!111 :shock: :twisted: :twisted: :twisted: :roll: :roll: :roll:

And yes, I hand-coded the uBB code in this post too :P

EDIT: Night guys, I'm goin ta bed :) Happy Hacking! :D

Posted: 2003-11-13 07:17am
by Sarevok
You may want to try learning to program the Windows shell. That would give you much greater control over Windows.

Posted: 2003-11-13 01:48pm
by Slartibartfast
Can't this be done by editing the filetypes in REGEDIT?

Posted: 2003-11-13 01:53pm
by Einhander Sn0m4n
Slartibartfast wrote:Can't this be done by editing the filetypes in REGEDIT?
Meh, probly. Knowing Windows, there are at least ten different ways of doing anything you want to do. Windows is quite pliable actually...

Posted: 2003-11-13 09:54pm
by Pu-239
Einhander Sn0m4n wrote:
Slartibartfast wrote:Can't this be done by editing the filetypes in REGEDIT?
Meh, probly. Knowing Windows, there are at least ten different ways of doing anything you want to do. Windows is quite pliable actually...
But no documentation... plus too many ways to do something means more difficult to .

I hate VBasic syntax.
then again, bash is worse. However, one can do more with it by utilizing external command line programs, which windows seems to lack except for the basics. Can I script something to automatically fetch my mail every so often, and still use my client of choice? Is it possible to build a web server using windows scripting languages (not that I would do this, but a nice example would be the apt-proxy server). Can you make scripts to automatically update/maintain/blah whatever remote computers you have?

Posted: 2003-11-13 10:19pm
by phongn
Pu-239 wrote:then again, bash is worse. However, one can do more with it by utilizing external command line programs, which windows seems to lack except for the basics. Can I script something to automatically fetch my mail every so often, and still use my client of choice? Is it possible to build a web server using windows scripting languages (not that I would do this, but a nice example would be the apt-proxy server). Can you make scripts to automatically update/maintain/blah whatever remote computers you have?
1. Probably not, depending on how you set things up.
2. Well, if you consider .NET a scripting language you probably could attempt it Apt-proxy is hardly a 'real' webserver anyways.
3. Yes.