Jump to content

Winamp - Selectable Features


mazin

Recommended Posts

Sorry i tried to search this in the forum and on google but I don't really know what to search for.

How can i run JS/VBS Files? It says that .js or .vbs is no known extension for cscript/wscript and that there is now Script modul for this extension.

I can't find a reason why it doesn't work.

EDIT: Ok solved that, now it says that i should install from Control Panel.

Link to comment
Share on other sites


The Final Word: This winamp.js works anywhere, %CDROM% or %SYSTEMDRIVE%, under BATCH method or RunOnceEX!

It does all the job: install Winamp, register Winamp, and copy winamp.ini!

start /wait %systemdrive%\Install\Winamp\winamp.js

OR

start /wait %CDROM%\Install\Winamp\winamp.js

REG ADD %KEY%\050 /VE /D "Winamp 5.04

REG ADD %KEY%\050 /V 01 /D "%systemdrive%\Install\Winamp\winamp.js

OR

REG ADD %KEY%\050 /VE /D "Winamp 5.04

REG ADD %KEY%\050 /V 01 /D "%CDROM%\Install\Winamp\winamp.js

var WshShell = WScript.CreateObject ("WScript.Shell");

var path = WScript.ScriptFullName;//getting the path to this script

var CDROM = path.substring(0,2);//extracting (DriveLetter:) from the path

WshShell.RUN (CDROM + "\\Install\\Winamp\\winamp.exe");//running exe

WScript.Sleep(3000);//time needed by installer to extract its files

WshShell.AppActivate("Winamp Setup");//name of setup screen

WScript.Sleep(500);//time to hold setup screen

WshShell.SendKeys ("{ENTER}");//hitting Agree button

WScript.Sleep(500);//usually, time to wait before executing next keystroke

WshShell.SendKeys ("{TAB}");//moving tabstop to the features pane

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//highlighting Winamp Agent

WScript.Sleep(500);

WshShell.SendKeys (" ");//deselecting Winamp Agent

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//bypassing Winamp Library

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//highlighting Modern Skin Support

WScript.Sleep(500);

WshShell.SendKeys (" ");//deselecting Modern Skin Support

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//bypassing User Interface Extensions

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//bypassing Audio File Support

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//highlighting Video File Support

WScript.Sleep(500);

WshShell.SendKeys ("%{RIGHT}");//expanding Video File Support

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//bypassing Nullsoft Video

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//highlighting AVI/MPG/ASF

WScript.Sleep(500);

WshShell.SendKeys (" ");//deselecting AVI/MPG/ASF

WScript.Sleep(500);

WshShell.SendKeys ("{ENTER}");//hitting Next button

WScript.Sleep(500);

WshShell.SendKeys ("{ENTER}");//hitting Next button

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//highlighting Desktop Icon

WScript.Sleep(500);

WshShell.SendKeys (" ");//deselecting Desktop Icon

WScript.Sleep(500);

WshShell.SendKeys ("{ENTER}");//hitting Next button

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN 2}");//setting Internet Connection to Not connected...

WScript.Sleep(500);

WshShell.SendKeys ("{ENTER}");//hitting Next button

WScript.Sleep(500);

WshShell.SendKeys ("{ENTER}");//hitting Install button

WScript.Sleep(45000);//time to install Winamp

WshShell.SendKeys ("%{F4}");//closing Winamp

WshShell.RegWrite ("HKLM\\SOFTWARE\\Nullsoft\\Winamp\\regkey", "my-key-here");

WshShell.RegWrite ("HKLM\\SOFTWARE\\Nullsoft\\Winamp\\regname", "mynamehere");

var MySys = WshShell.Environment("process");//needed to expand ProgramFiles var

var FSO = WScript.CreateObject("Scripting.FileSystemObject");//needed for CopyFile

FSO.CopyFile((CDROM + "\\Install\\Winamp\\winamp.ini") , (MySys("ProgramFiles") + "\\Winamp\\"));//copying winamp.ini

NOTE:

1- The word CDROM mentioned in winamp.js is merely a word. You can replace it with any other word you like. It represents the drive letter where winamp.js resides; e.g. C:, D:, or whatever. Therefore, this script is usable wherever we put it in, i.e. on a CD or HDD.

2- This script does not install "Modern Skin Support". If you decide to install it, consider adding these strings immediately before the line commented "//closing winamp":

WshShell.SendKeys ("%{F4}");//closing Winamp Library

WScript.Sleep(500);

Also, increase installation time from 45000 to 60000.

Link to comment
Share on other sites

Great Stuff, mazin

:)

Thanks.

I wasn't satisfied with the idea that JS is dependent on CMD for creating that path in the Registry, despite it worked well.

Now, JS is completely independent, working on its own to define the path to Winamp.exe.

It's now universal. BTW, if you use INF to install Winamp this way, let me know.

Link to comment
Share on other sites

Yeah, I use inf to setup winamp.

[Version]

Signature=$CHICAGO$

[DefaultInstall]

AddReg = RunOnceEx.XP.AddReg

[unattended.XP]

AddReg = RunOnceEx.XP.AddReg

[RunOnceEx.XP.AddReg]

;http://support.microsoft.com/?kbid=232509

HKLM,"%RunOnceEx%\",Title,0,"Installing Applications"

HKLM,"%RunOnceEx%\",Flags,0x00010001,30

HKLM,"%RunOnceEx%\001",,,"Winamp 5.04 Pro"

HKLM,"%RunOnceEx%\001",1,,"""%1%\Install\Winamp\Winamp.js"""

[strings]

RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"

%1% - Directory where inf file is in

Link to comment
Share on other sites

  • 3 weeks later...
Never mind, I was fooling around with path in the js and screwed it up....

Sorry Mazin, 505 installs just fine.

bonedaddy

Thanks for the news, anyway. I've just downloaded it. Let me enjoy it, too.

EDIT: 5.05 is same screen clicks as 5.03a and 5.04.

Thanks alot.

Link to comment
Share on other sites

ok i've got a JScript going, and it looks alright, but it keeps giving me an error:

Line: 81
Char: 20
Error: Expected ';'
Code: 800A03EC
Source: Microsoft JScript compilation error

now, i googled the error code, but all i got was something about incorrect parenthetical placements, which i don't have (or at least i think i don't). i've attached my script. also, when i delete that line, it tells me line 80 is messed up, then 79, and so on. any help would be appreciated. i'm familiar with c++, but this is my first foray into javascript. i figured if anyone could help me out it'd be you guys. :thumbup

EDIT: don't worry guys this isn't a virus :P

winampscript.js

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...