Jump to content

Winamp - Selectable Features


mazin

Recommended Posts

Ok Mazin,

yes and no, runonceEx from cd works. Yes if I deselect Library and no

if Library is allowed to install. So to explain, no matter what I do if

I choose to install Library then to get winamp to terminate I must use taskkill.

If I deselect Library, then runonceEx from CD works fine just as you have it

here. My guess is that extra window that opens, something about nothing in

library yet, I can't remember what it said, is causing the problem, just a guess?

Very clean no cmd windows,very nice.

bonedaddy

Link to comment
Share on other sites


Believe me, it's this period you need to increase:

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

This is because Library takes long to appear.

mazin's right

I too experienced the same sort of problem so I changed the time in my script to:

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

This depends on your computer performance. My comp is slow so you might have use something less.

Link to comment
Share on other sites

mazin,

With %CDROM%, I believe you can use the Expand Environment Strings method instead like I've used below for the source path and the install path.

Example,

WshShell.ExpandEnvironmentStrings("%WinDir%")

Winamp.js

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

WshShell.Run(WshShell.ExpandEnvironmentStrings("%CDROM%") + "\\Install\\Winamp\\winamp.exe");

WScript.Sleep(2000);//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);//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 (WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Winamp");//Destination Folder

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", "xxxxx-xxxxx-xxxxx-xxxxx");

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

Link to comment
Share on other sites

Yes, you're right about "EXPAND....", but %CDROM% isn't a predefined variable. This is why I invented this trick.

Or, I should ask: "Have you tried it yourself?" Maybe, I'm wrong. If you try it and it works, please let me know.

Link to comment
Share on other sites

Yes, you're right about "EXPAND....", but %CDROM% isn't a predefined variable. This is why I invented this trick.

Or, I should ask: "Have you tried it yourself?" Maybe, I'm wrong. If you try it and it works, please let me know.

Quite True but to use %CDROM% anywhere, it would have to be predefined variable before usage. I guess it just depends on when you prefer to define the variable.

Link to comment
Share on other sites

There's a code already for it. But, it's more than 10 lines long. Guess, if I include it in winamp.js, people might hate it.

With the trick I used, it's much more simple to understand for peolpe who don't want to investigate script codes before installing Winamp.

Thank you for your interest. And let me know if you ever have more advanced thoughts.

Link to comment
Share on other sites

Ok I changed the time from 45000 to 60000 and the only

screen terminated is the "add to Library" that sits on top of

winamp proper, winamp with library is not terminated. Should

I go longer yet, say 75000, never mind I take up some more.

Link to comment
Share on other sites

Well!

Add another line to your JS:

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

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

WScript.Sleep(500);

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

Link to comment
Share on other sites

Yes I did that and it worked. Only I did it differently, when I saw the

small window close with "close winamp" I just repeated it.

WScript.Sleep(35000);//time to install Winamp
WshShell.SendKeys ("%{F4}");//closing winamp
WScript.Sleep(500);
WshShell.SendKeys ("%{F4}");//closing Winamp

thanks

bonedaddy the doom is here

Link to comment
Share on other sites

Now, I can rest.

JS works from %CDROM% and %SYSTEMDRIVE% under BATCH and RunOnceEX methods.

And I think it can run via INF, too. I think neo_3333 can confirm that.

Link to comment
Share on other sites

Well I want to thank you for all your time and effort, it's a great

install and fun to watch. Good job, whats next? How about those

nasty ATI drivers? ha ha!

bonedaddy

EDIT

Or how about redoing the first page of this thread and put the

best working code, or the last page, where ever is best?

Link to comment
Share on other sites

There's a code already for it. But, it's more than 10 lines long. Guess, if I include it in winamp.js, people might hate it.

With the trick I used, it's much more simple to understand for peolpe who don't want to investigate script codes before installing Winamp.

Thank you for your interest. And let me know if you ever have more advanced thoughts.

mazin,

Is this code you talk about for %CDROM % ?

Link to comment
Share on other sites

Or how about redoing the first page of this thread and put the

best working code, or the last page, where ever is best?

Sure. I'll have to. Just time. And thank you for your support.

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