Astalavista Posted December 17, 2004 Author Posted December 17, 2004 Here is another problem... after the clock runs out... it will still ask for confirmation to continue.how can i disable this?I want the confirmation only if i stop the clockso if i dont change the default install options it should automatically install w/o asking me to confirm. so when i put the dvd into the computer and take a shower when i come outit is all done. it takes me an hour to shower... LOL
BritishBulldog Posted December 17, 2004 Posted December 17, 2004 to add that to your version Astalavistaopen your genrerate.js in a text editor and add this to the bottom.function CreateFile2(arg) { var programs = new Array(); var KeyBase = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx"; var j = 0; var msg; if (arg=='exit'){ // when pressing exit button, removes default checked checkboxes remChecks(); } for ( i = 1; prog[i]!=null; i++ ) { if (forc[i]!=null && forc[i] == "true"){ // check the checkbox for an app if it is forced setChecked(i); } if (document.getElementById("chkbox"+i).checked) { programs[programs.length++] = new program(i, prog[i], desc[i], regb[i], cmd1[i], cmd2[i], cmd3[i], rega[i], dflt[i], forc[i], cat[i], cons[i], ordr[i]); debug("Selecting: " + prog[i][0] + " - " + ordr[i],1); } } debug("Sort",1); programs.sort(SortByOrdr); for ( i = 0; i<programs.length && programs[i]!=null; i++ ) { debug(i+1 + ".: " +programs[i].ordr + " - " + programs[i].prog,1); } debug("Installing...",1); for ( i = 0; i<programs.length && programs[i]!=null; i++ ) { j++; e = '0' + i; while (e.length<4) e = "0" + e; WshShell.regWrite(KeyBase + "\\"+e+"\\", programs[i].prog, "REG_SZ"); if (true) { // set to false, if you want just the display but no real installs if ((programs[i].regb != null)&&(path(programs[i].regb) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\1","REGEDIT /S "+path(programs[i].regb), "REG_SZ"); if ((programs[i].cmd1 != null)&&(path(programs[i].cmd1) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\2",path(programs[i].cmd1), "REG_SZ"); if ((programs[i].cmd2 != null)&&(path(programs[i].cmd2) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\3",path(programs[i].cmd2), "REG_SZ"); if ((programs[i].cmd3 != null)&&(path(programs[i].cmd3) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\4",path(programs[i].cmd3), "REG_SZ"); if ((programs[i].rega != null)&&(path(programs[i].rega) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\5","REGEDIT /S "+path(programs[i].rega), "REG_SZ"); } if (j==15) // call RunOnceEx every 15 apps, so that the window doesn't grow too big { WshShell.regWrite(KeyBase + "\\TITLE", getText(txtRunOnceExTitle), "REG_SZ"); window.moveTo(10000,10000); WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess", 10, true); <---add this again j=0; } } //Launch the last RunOnceEx process we just wrote keys for and exit WshShell.regWrite(KeyBase + "\\TITLE", getText(txtRunOnceExTitle), "REG_SZ"); window.moveTo(10000,10000); WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess", 10, true); <----add this again window.moveTo(0,0); }then open your WPI.hta and find this script<script> var interval = ""; var m; if(secs>3600) secs=3600; if(secs>60){ m=parseInt(secs/60) secs=secs-(m*60); } else m=0; function startInterval(){ interval = window.setInterval("tTimer()",1000); } function stopInterval(){ window.clearInterval (interval); interval=""; } function tTimer(){ if(secs==0) secs=1; document.display.innerHTML = m+":"+--secs; if (secs == 0 && m==0){ stopInterval(); CreateFile(); <------THIS HERE self.close(); } if (secs == 0){ document.display.innerHTML = m+":"+"0"+secs; m--; secs=60; } if(secs<10&&secs>-1) document.display.innerHTML = m+":"+"0"+secs; }</SCRIPT>change the CreateFile() to CreateFile2()In the version i have this is already implemented but in a different way
Astalavista Posted December 17, 2004 Author Posted December 17, 2004 same problem no change. pls check my code
BritishBulldog Posted December 17, 2004 Posted December 17, 2004 that script was just copied from the generate.js that you sent me.I just changed the function name to CreateFile2 and called this up in the hta file when the counter runs down. The copy you changed does work.If i press Begin Install the message comes up if i leave the timer to run down then no message comes up.That is what you wanted.dont forget to add this line again in there two items.Otherwise it wont work :-)WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess", 10, true);
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