Jump to content

Winamp - Selectable Features


mazin

Recommended Posts

-< Winamp is no problem anymore! >-

Update 1: PDF tutorial for v5.03c and similar versions. Right-click and "Save Target As...".

Update 2: PDF tutorial for v2.91 and similar versions. Right-click and "Save Target As...".

Update 3: Some antivirus programs disallow running scripts. So, you should run scripts before installting antivirus programs.

Update 4: Should you ever get any problem, read through the following posts. You should find an answer to your question.

Update 5: winamp.js is now commented. Keeping comments makes no problem.

Update 6: Batch method is now much more simple. No sleep.exe! No taskkill!

Update 7: Installing Winamp from %systemdrive% using RunOnceEX.

Update 8: Installing Winamp from %CDROM% using RunOnceEX. By bonedaddy.

Finally, we can exclude features and sub-features we don't want installed!!!

This JavaScript file works for any version of Winamp, as we will see. But, the example here is for Winamp 5.03a.

These are the steps

Put the following files in this directory: %systemdrive%\Install\Winamp\

If your source path is different, then change those in purple inside the batch.

On your unattended CD, this path is $OEM$\$1\Install\Winamp\, of course.

- winamp.exe --> your installer renamed for simplicity

- winamp.js --> explained below

- winamp.ini --> customized, from C:\Program Files\Winamp\winamp.ini

Clean winamp.ini by deleting any entries that refer to paths or directories like cwd=C:\Program Files\Winamp, for example.

cls

@echo off

ECHO.

ECHO Installing Winamp 5.03a

echo [WinampReg]>%systemroot%\winamp.ini

echo IsFirstInst=>>%systemroot%\winamp.ini

echo NeedReg=>>%systemroot%\winamp.ini

CD %systemdrive%\Install\Winamp\

Start %systemdrive%\Install\Winamp\winamp.js

sleep 60

taskkill /F /IM WINAMP.EXE

taskkill /F /IM winampa.exe

copy %systemdrive%\Install\Winamp\Winamp.ini "%systemdrive%\Program Files\Winamp\"

ECHO.

ECHO Registering for the Pro Version

REG ADD HKLM\SOFTWARE\Nullsoft\Winamp /v regname /d YourName /f

REG ADD HKLM\SOFTWARE\Nullsoft\Winamp /v regkey /d xxxxx-xxxxx-xxxxx-xxxxx /f

exit

Sleep time of 60 seconds might vary according to the features installed. However, it's sufficient if you install all features. You can test it before burning to your CD.

Of course, you're assumed to have sleep.exe in your system32 folder. On your unattended CD, you put it here: $OEM$\$$\System32\sleep.exe

If you exclude Winamp Agent from installation, do not add taskkill /F /IM winampa.exe to your batch.

If your regname has spaces, consider adding quotes. This is an example: "Your Name".

Replace the Xs with your regkey. Dashes are included, if any.

You do not have to create a reg file to register Winamp for the Pro version. Your registration data is included in the batch as you saw. However, if you don't want to register for the Pro version, consider deleting the last three lines from the batch above.

function getWin(win, inc)

{

var cntr = 0;

while (!WshShell.AppActivate(win))

{

if (cntr==12) return true;

cntr++;

WScript.Sleep(inc);

}

return true;

}

var WshShell = new ActiveXObject("WScript.Shell");

var oExec = WshShell.Exec("winamp.exe");//name of your installer

while (oExec.Status == 0)

{

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

getWin("Winamp Setup", 500);//name of setup screen and time to hold it

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

WScript.Sleep(500);//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}");//highlighting 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}");//highlighting User Interface Extensions

WScript.Sleep(500);

WshShell.SendKeys ("{DOWN}");//highlighting 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}");//highlighting 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.quit();

Sleep time of 500 (1/2 second) is not obligatory, unless you like watching :D, like me.

You can use 200, or more or less.

Keystroke legend:

Use ("{ENTER}") for hitting Next and Install buttons.

Use ("{TAB}") for browsing controls of setup screens.

Use ("{DOWN}") for pressing the down arrow on your keyboard.

Use (" ") for deselecting a feature.

Use ("%{RIGHT}") for expanding a main feature into its sub-features. :D:rolleyes::)

Now, you see that the JS file above exclude these features:

- Winamp Agent

- Modern Skin Support

- AVI/MPG/ASF

- Desktop Icon

Also, it sets Internet Connection to "Not connected to the Internet".

Oh! Yes, you can modify the JS to fit your needs with the help of PDF tutorial.

Link to comment
Share on other sites


Do you have to use a batchfile ? Can you use a inf file instead, SkyyPunk ?

sorry but what does that mean? and what does it have to do with SkyyPunk, a batchfile and an inf?

anyways, I, too don't see how this is helpful to ppl

everyone right from the start, right from the release of winamp could write a vbs and choose the components like that. that's how I had been installing after 1 day I don't wanted it...

I think u should ..... :rolleyes::) and do something more usefull with other software..

Link to comment
Share on other sites

so then this script could be used for many other installs then too, correct? (obviously just changing the keys passed?) or is there something about the winamp install that makes it special?

You can use it with any app. The setup screens are your guide for needed keystrokes.

Link to comment
Share on other sites

WOW this is great! After a few pm's with mazin he figured out

why it wouldn't work, (hint; don't install after an AntiVirus program)

and I taught myself how to set it up with keystrokes it installs perfect.

hint; get the latest Winamp and while installing do the keystroke thing, if

you make a mistake, just install again, follow mazin's js till you get the hang

of it. The text here is for noobs to js like myself.

bonedaddy :)

Link to comment
Share on other sites

mazin,

Do you have to use a batchfile to execute this selectable feature for winamp install? Can you use a inf file instead, mazin ?

Execuse me, I didn't try it. You can give it a try and see what happens.

However, you should keep the same conditions as in the batch.

If I were to use the RunOnceEx method, I'd do the following:

1- Create winamp.cmd containing the same contents of the batch from the first post.

2- Create winamp.js but increase the first sleep time from 2000 to 5000.

3- Clean winamp.ini by deleting any entries that refer to paths or directories like cwd=C:\Program Files\Winamp, for example.

4- Then, I put these files in this directory: %systemdrive%\Install\Winamp\

- winamp.exe

- winamp.js

- winamp.ini

- winamp.cmd

5- Next, I add these lines to my RunOnceEx.cmd:

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

REG ADD %KEY%\050 /V 1 /D "%systemdrive%\Install\Winamp\winamp.cmd" /f

Actually, I don't use RunOnceEx method. If you are familiar with inf files that are used in conjunction with RunOnceEx method, then you know how to adapt the whole process.

I hope this helps.

Link to comment
Share on other sites

Thanks mazin,

One question. How would I include the sleep function in your winamp.cmd into the inf ?

It's already included in winamp.cmd, so you don't need to include it again in any other place.

However, under RunOnceEx method, it could be "sleep 60" /f assuming you've put sleep.exe in your system32 folder or even in Windows folder. Both work.

Please be aware of these lines inside the batch:

echo [WinampReg]>%systemroot%\winamp.ini

echo IsFirstInst=>>%systemroot%\winamp.ini

echo NeedReg=>>%systemroot%\winamp.ini

They create another winamp.ini inside your Windows folder.

Link to comment
Share on other sites

@mazin

changes to be incorporated

- winamp.ini --> no bothers needed

In your batch file

echo [WinampReg]>%systemroot%\winamp.ini

echo IsFirstInst=0>>%systemroot%\winamp.ini

echo NeedReg=0>>%systemroot%\winamp.ini

Your first post has a few errors.

Do have a look at the quoted corrected post, and update it.

Once you finish editing the first post to how the corrected one says, do PM me (so that I can edit my own pointing-out-the-error post to blank).

If you are too tired out to figure out what needs fixing, this is what was wrong:

IsFirstInst=0
NeedReg=0

That's how it should have been.

Just killing the installer after a pre-defined time may turn out bad (on slower machines) as you already say. Also,

REG ADD HKLM\SOFTWARE\Nullsoft\Winamp /v regkey /t REG_SZ /d xxxxx-xxxxx-xxxxx-xxxxx /f

will not work, because winamp does not store your actual key - it just puts a validation hash in the registry (like WinXP's WPA). The only way to have winamp pro registration pre-enabled is to export that key after entering your key.

As for whether the correction is needed, let me say it is a *MUST*.

I should know, for I was the one who evolved this idea in the first place...... Winamp 5 Pro

I hope you don't flame me, thinking of this as a fight to see who's superior. I'm just pointing this out, because without the corrections, the purpose of echoing winamp.ini is not served.

Link to comment
Share on other sites

If you are too tired out to figure out what needs fixing, this is what was wrong:
IsFirstInst=0
NeedReg=0

That's how it should have been.

Well!

I never saw that post. I have had the MUF document for two years now. And I got that idea from there.

Plus, winamp.ini works this way. You probably haven't tried it.

I won't change it because it works. I even tested it under RunOnceEX method and it worked, too.

I'll post it soon for peolpe who are interested. I'll just have my dinner.

Thanks alot and you're welcome.

AND THE KEY WORKS THIS WAY, TOO. Try it.

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...