bonedaddy Posted August 6, 2004 Share Posted August 6, 2004 Ok Mazin,yes and no, runonceEx from cd works. Yes if I deselect Library and noif Library is allowed to install. So to explain, no matter what I do ifI 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 ithere. My guess is that extra window that opens, something about nothing inlibrary 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 More sharing options...
mazin Posted August 6, 2004 Author Share Posted August 6, 2004 Believe me, it's this period you need to increase:WScript.Sleep(45000);//time to install WinampThis is because Library takes long to appear. Link to comment Share on other sites More sharing options...
neo_3333 Posted August 6, 2004 Share Posted August 6, 2004 Believe me, it's this period you need to increase:WScript.Sleep(45000);//time to install WinampThis is because Library takes long to appear.mazin's rightI too experienced the same sort of problem so I changed the time in my script to:WScript.Sleep(57000);//time to install WinampThis depends on your computer performance. My comp is slow so you might have use something less. Link to comment Share on other sites More sharing options...
neo_3333 Posted August 6, 2004 Share Posted August 6, 2004 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.jsvar WshShell = WScript.CreateObject("WScript.Shell");WshShell.Run(WshShell.ExpandEnvironmentStrings("%CDROM%") + "\\Install\\Winamp\\winamp.exe");WScript.Sleep(2000);//time needed by installer to extract its filesWshShell.AppActivate("Winamp Setup");//name of setup screenWScript.Sleep(500);//time to hold setup screenWshShell.SendKeys ("{ENTER}");//hitting Agree buttonWScript.Sleep(500);//time to wait before executing next keystrokeWshShell.SendKeys ("{TAB}");//moving tabstop to the features paneWScript.Sleep(500);WshShell.SendKeys ("{DOWN}");//highlighting Winamp AgentWScript.Sleep(500);WshShell.SendKeys (" ");//deselecting Winamp AgentWScript.Sleep(500);WshShell.SendKeys ("{DOWN}");//bypassing Winamp LibraryWScript.Sleep(500);WshShell.SendKeys ("{DOWN}");//highlighting Modern Skin SupportWScript.Sleep(500);WshShell.SendKeys (" ");//deselecting Modern Skin SupportWScript.Sleep(500);WshShell.SendKeys ("{DOWN}");//bypassing User Interface ExtensionsWScript.Sleep(500);WshShell.SendKeys ("{DOWN}");//bypassing Audio File SupportWScript.Sleep(500);WshShell.SendKeys ("{DOWN}");//highlighting Video File SupportWScript.Sleep(500);WshShell.SendKeys ("%{RIGHT}");//expanding Video File SupportWScript.Sleep(500);WshShell.SendKeys ("{DOWN}");//bypassing Nullsoft VideoWScript.Sleep(500);WshShell.SendKeys ("{DOWN}");//highlighting AVI/MPG/ASFWScript.Sleep(500);WshShell.SendKeys (" ");//deselecting AVI/MPG/ASFWScript.Sleep(500);WshShell.SendKeys ("{ENTER}");//hitting Next buttonWScript.Sleep(500);WshShell.SendKeys (WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Winamp");//Destination FolderWScript.Sleep(500);WshShell.SendKeys ("{ENTER}");//hitting Next buttonWScript.Sleep(500);WshShell.SendKeys ("{DOWN}");//highlighting Desktop IconWScript.Sleep(500);WshShell.SendKeys (" ");//deselecting Desktop IconWScript.Sleep(500);WshShell.SendKeys ("{ENTER}");//hitting Next buttonWScript.Sleep(500);WshShell.SendKeys ("{DOWN 2}");//setting Internet Connection to Not connected...WScript.Sleep(500);WshShell.SendKeys ("{ENTER}");//hitting Next buttonWScript.Sleep(500);WshShell.SendKeys ("{ENTER}");//hitting Install buttonWScript.Sleep(45000);//time to install WinampWshShell.SendKeys ("%{F4}");//closing WinampWshShell.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 More sharing options...
mazin Posted August 6, 2004 Author Share Posted August 6, 2004 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 More sharing options...
neo_3333 Posted August 6, 2004 Share Posted August 6, 2004 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 More sharing options...
mazin Posted August 6, 2004 Author Share Posted August 6, 2004 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 More sharing options...
bonedaddy Posted August 6, 2004 Share Posted August 6, 2004 Ok I changed the time from 45000 to 60000 and the only screen terminated is the "add to Library" that sits on top ofwinamp proper, winamp with library is not terminated. ShouldI go longer yet, say 75000, never mind I take up some more. Link to comment Share on other sites More sharing options...
mazin Posted August 6, 2004 Author Share Posted August 6, 2004 Well!Add another line to your JS:WScript.Sleep(60000);//time to install WinampWshShell.SendKeys ("%{F4}");//closing LibraryWScript.Sleep(500);WshShell.SendKeys ("%{F4}");//closing Winamp Link to comment Share on other sites More sharing options...
bonedaddy Posted August 6, 2004 Share Posted August 6, 2004 Yes I did that and it worked. Only I did it differently, when I saw thesmall window close with "close winamp" I just repeated it.WScript.Sleep(35000);//time to install WinampWshShell.SendKeys ("%{F4}");//closing winampWScript.Sleep(500);WshShell.SendKeys ("%{F4}");//closing Winampthanksbonedaddy the doom is here Link to comment Share on other sites More sharing options...
mazin Posted August 6, 2004 Author Share Posted August 6, 2004 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 More sharing options...
bonedaddy Posted August 6, 2004 Share Posted August 6, 2004 Well I want to thank you for all your time and effort, it's a greatinstall and fun to watch. Good job, whats next? How about thosenasty ATI drivers? ha ha!bonedaddyEDITOr how about redoing the first page of this thread and put thebest working code, or the last page, where ever is best? Link to comment Share on other sites More sharing options...
neo_3333 Posted August 7, 2004 Share Posted August 7, 2004 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 More sharing options...
mazin Posted August 7, 2004 Author Share Posted August 7, 2004 mazin,Is this code you talk about for %CDROM % ?Yes. Link to comment Share on other sites More sharing options...
mazin Posted August 7, 2004 Author Share Posted August 7, 2004 Or how about redoing the first page of this thread and put thebest 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now