Jump to content

Asterisco

Member
  • Posts

    16
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Italy

Everything posted by Asterisco

  1. Ok, i think i found the error, but i don't know how i can solve it. The error is here, in the useroptions file at this line var timer='on'; , i put "off" in place off "on" and so i don't have the error, but is not the good way to solve this error, because i need the clock. I fix a little error with translation in line "var configlist" in the useroptions file but the problem was not there. Could you help me, please? Thanx again Anacleto
  2. Hi, and today appear another error but with timer.js at Line:48 "null" is not object always in %path%wpa.hta you can found the code under the gnerate's code, thank you very much. I use 4.3.8, i think the latest version on the official site, with an italian translation by myself Best regards, Anacleto generate.js var WshShell = new ActiveXObject("wscript.shell"); var fso = new ActiveXObject("Scripting.FileSystemObject"); var WshEnv = WshShell.Environment("PROCESS"); var cddrv = new String(); cddrv=""; var foundCDdrv = false; var audioshell = new ActiveXObject("WScript.shell"); var runaudio = ""; var runaudioprogram = ""; runaudio=1; function SetScriptWaitTimeout(timeout) // max is 4294967295 { position="generate.js"; var val=0; var KeyBase = "HKCU\\Software\\Microsoft\\Internet Explorer\\Styles\\MaxScriptStatements"; try { if (timeout<0) { WshShell.regDelete(KeyBase); return; } try { val = WshShell.regRead(KeyBase); } catch (exc) { if (timeout==0 || !timeout) timeout = 0x7fffffff; WshShell.regWrite(KeyBase, timeout, "REG_DWORD"); } } catch (ex2) {} } function FileExists(filespec) { position = "generate.js"; return fso.FileExists(filespec); } function GetCDRomDriveLetters() { position = "generate.js"; var li, en; li = new Array(); en = new Enumerator(fso.Drives); for (; !en.atEnd(); en.moveNext()) { ite = en.item(); if (ite.DriveType == 4) { li[li.length++]=(ite.DriveLetter + ":"); } } return li; } function FindCDRom() { position = "generate.js"; var i, li; if (LaunchFromCD=="yes") FindFile="WIN51"; else FindFile="WPI.ICO"; if (foundCDdrv) return cddrv; li = GetCDRomDriveLetters(); for (i=0; i<li.length; i++) { if (FileExists(li+'\\'+FindFile)) { cddrv = li; debug("Found CDROM as drive " + cddrv,1,2); } } if (cddrv=="") { a = fso.GetAbsolutePathName("."); while (a.length>=3) { //debug("Trying ... " + a, 1); if (FileExists(a+'\\'+FindFile)) { cddrv=a; debug("Found CDROM as folder " + cddrv,1,2); break; } if (a.length==3) break; a = a + "\\.."; a = fso.GetAbsolutePathName(a); } } if (cddrv=="") { cddrv = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath") + "\\"; cddrv = cddrv.substr(0,3); debug("Found CDROM as from registry " + cddrv,1,2); } foundCDdrv = true; return cddrv; } function replpath(u) { position = "generate.js"; cddrv = FindCDRom(); sysdrv = WshEnv("SYSTEMDRIVE") + "\\"; windir = WshEnv("WINDIR") + "\\"; programfiles = WshEnv("PROGRAMFILES") + "\\"; temp = WshEnv("TEMP") + "\\"; sysdir = WshEnv("WINDIR") + "\\system32\\"; allusersprofile = WshEnv("ALLUSERSPROFILE") + "\\"; userprofile = WshEnv("USERPROFILE") + "\\"; appdata = WshEnv("APPDATA") + "\\"; commonprogramfiles = WshEnv("CommonProgramFiles") + "\\"; rs = new String(); rs = u; rs = rs.replace(/%cdrom%/gi, cddrv); rs = rs.replace(/%systemdrive%/gi,sysdrv); rs = rs.replace(/%windir%/gi, windir); rs = rs.replace(/%programfiles%/gi,programfiles); rs = rs.replace(/%sysdir%/gi, sysdir); rs = rs.replace(/%temp%/gi, temp); rs = rs.replace(/%allusersprofile%/gi, allusersprofile); rs = rs.replace(/%userprofile%/gi,userprofile); rs = rs.replace(/%appdata%/gi, appdata); rs = rs.replace(/%commonprogramfiles%/gi, commonprogramfiles); return rs; } function path(u) { position = "generate.js"; if((u[0] == "systemdrive") ||(u[0] == "programfiles") ||(u[0] == "windir") ||(u[0] == "cdrom") ||(u[0] == "")) { pth = new String(); pth = u[0]; u[0] = pth.toLowerCase(); if(u[0] == "systemdrive") return WshEnv("SYSTEMDRIVE") + "\\" + u[1] if(u[0] == "programfiles") return WshEnv("PROGRAMFILES") + "\\" + u[1] if(u[0] == "temp") return WshEnv("TEMP") + "\\" + u[1] if(u[0] == "windir") return WshEnv("WINDIR") + "\\" + u[1] if(u[0] == "cdrom"){ TempSource = new String(); TempSource = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath"); TempSource = TempSource + "\\"; if (discPath == 'root'){ TempSource = TempSource.substr(0,3) + u[1]; // return the drive letter of the CD/DVD drive. eg. D:\ | E:\ | F:\ etc. } else{ TempSource = TempSource + u[1]; } TempSource.replace("\\\\","\\"); return TempSource } if(u[0] == "") return u[1] } else { if (u[1]==null || u[1]=="") return replpath(u[0]); else alert("Drive not found."); } return ""; } function CreateFile(arg) { position = "generate.js"; var KeyBase = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx"; var j = 0; var msg; var programs = new Array(); if (arg==null || arg) window.alert(getText(msgStartInstall)); if (arg=='exit'){ // when pressing exit button, removes default checked checkboxes remChecks(); } for ( i = 1; prog!=null; i++ ) { if (forc!=null && forc == "yes"){ // check the checkbox for an app if it is forced setChecked(i); } if (document.getElementById("chkbox"+i) && document.getElementById("chkbox"+i).checked) { programs[programs.length++] = new program(i); debug("Selecting: " + programs[programs.length-1].prog + " - " + programs[programs.length-1].ordr,1); } } if (sorting) { debug("Sort",1); if (installByCategory) programs.sort(SortByCat); else programs.sort(SortByOrdr); } for ( i = 0; i<programs.length && programs!=null; i++ ) debug(i+1 + ".: " +programs.ordr + " - " + programs.prog,1); debug("Installing...",1); for ( i = 0; i<programs.length && programs!=null; i++ ) { j++; if (sorting && !installByCategory) e = programs.ordr; else { e = '0' + i; while (e.length<4) e = "0" + e; } WshShell.regWrite(KeyBase + "\\"+e+"\\", programs.prog, "REG_SZ"); if (true) { // set to false, if you want just the display but no real installs if ((programs.regb != null)&&(path(programs.regb) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\1","REGEDIT /S "+path(programs.regb), "REG_SZ"); if ((programs.cmd1 != null)&&(path(programs.cmd1) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\2",substituteCommand(programs.cmd1), "REG_SZ"); if ((programs.cmd2 != null)&&(path(programs.cmd2) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\3",substituteCommand(programs.cmd2), "REG_SZ"); if ((programs.cmd3 != null)&&(path(programs.cmd3) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\4",substituteCommand(programs.cmd3), "REG_SZ"); if ((programs.cmd4 != null)&&(path(programs.cmd4) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\5",substituteCommand(programs.cmd4), "REG_SZ"); if ((programs.cmd5 != null)&&(path(programs.cmd5) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\6",substituteCommand(programs.cmd5), "REG_SZ"); if ((programs.cmd6 != null)&&(path(programs.cmd6) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\7",substituteCommand(programs.cmd6), "REG_SZ"); if ((programs.rega != null)&&(path(programs.rega) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\8","REGEDIT /S "+path(programs.rega), "REG_SZ"); } if (runaudio==1){ runaudio=0; if (showmpINSBtn == 1) { runaudioprogram = ".\\audio.exe" audioshell.run(runaudioprogram, 1, true); } } if (j==appsPerInstallWindow) // 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); if (!debugOn) WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess", 10, true); 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); if (!debugOn) WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess", 10, true); window.moveTo(0,0); SetScriptWaitTimeout(-1); audioshell.run(".\\Audio\\CloseAudio.exe", 1, true); if (!debugOn) window.close(); programs = null; } function substituteCommand(cmd) { var prog = path(cmd); var firstToken = prog.substr(0,prog.indexOf(" ")); switch (firstToken.toUpperCase()) { case 'FILECOPY': prog = ("CMD /C " + prog.replace(/FILECOPY/gi,'copy')); break; case 'DIRCOPY': prog = ("CMD /C " + prog.replace(/DIRCOPY/gi,'xcopy') + "/I /E /Y"); break; case 'RENAME': prog = ("CMD /C " + prog.replace(/RENAME/gi,'ren')); break; } return prog; } timer.js var WshShell = new ActiveXObject("wscript.shell"); var fso = new ActiveXObject("Scripting.FileSystemObject"); var WshEnv = WshShell.Environment("PROCESS"); var cddrv = new String(); cddrv=""; var foundCDdrv = false; var audioshell = new ActiveXObject("WScript.shell"); var runaudio = ""; var runaudioprogram = ""; runaudio=1; function SetScriptWaitTimeout(timeout) // max is 4294967295 { position="generate.js"; var val=0; var KeyBase = "HKCU\\Software\\Microsoft\\Internet Explorer\\Styles\\MaxScriptStatements"; try { if (timeout<0) { WshShell.regDelete(KeyBase); return; } try { val = WshShell.regRead(KeyBase); } catch (exc) { if (timeout==0 || !timeout) timeout = 0x7fffffff; WshShell.regWrite(KeyBase, timeout, "REG_DWORD"); } } catch (ex2) {} } function FileExists(filespec) { position = "generate.js"; return fso.FileExists(filespec); } function GetCDRomDriveLetters() { position = "generate.js"; var li, en; li = new Array(); en = new Enumerator(fso.Drives); for (; !en.atEnd(); en.moveNext()) { ite = en.item(); if (ite.DriveType == 4) { li[li.length++]=(ite.DriveLetter + ":"); } } return li; } function FindCDRom() { position = "generate.js"; var i, li; if (LaunchFromCD=="yes") FindFile="WIN51"; else FindFile="WPI.ICO"; if (foundCDdrv) return cddrv; li = GetCDRomDriveLetters(); for (i=0; i<li.length; i++) { if (FileExists(li+'\\'+FindFile)) { cddrv = li; debug("Found CDROM as drive " + cddrv,1,2); } } if (cddrv=="") { a = fso.GetAbsolutePathName("."); while (a.length>=3) { //debug("Trying ... " + a, 1); if (FileExists(a+'\\'+FindFile)) { cddrv=a; debug("Found CDROM as folder " + cddrv,1,2); break; } if (a.length==3) break; a = a + "\\.."; a = fso.GetAbsolutePathName(a); } } if (cddrv=="") { cddrv = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath") + "\\"; cddrv = cddrv.substr(0,3); debug("Found CDROM as from registry " + cddrv,1,2); } foundCDdrv = true; return cddrv; } function replpath(u) { position = "generate.js"; cddrv = FindCDRom(); sysdrv = WshEnv("SYSTEMDRIVE") + "\\"; windir = WshEnv("WINDIR") + "\\"; programfiles = WshEnv("PROGRAMFILES") + "\\"; temp = WshEnv("TEMP") + "\\"; sysdir = WshEnv("WINDIR") + "\\system32\\"; allusersprofile = WshEnv("ALLUSERSPROFILE") + "\\"; userprofile = WshEnv("USERPROFILE") + "\\"; appdata = WshEnv("APPDATA") + "\\"; commonprogramfiles = WshEnv("CommonProgramFiles") + "\\"; rs = new String(); rs = u; rs = rs.replace(/%cdrom%/gi, cddrv); rs = rs.replace(/%systemdrive%/gi,sysdrv); rs = rs.replace(/%windir%/gi, windir); rs = rs.replace(/%programfiles%/gi,programfiles); rs = rs.replace(/%sysdir%/gi, sysdir); rs = rs.replace(/%temp%/gi, temp); rs = rs.replace(/%allusersprofile%/gi, allusersprofile); rs = rs.replace(/%userprofile%/gi,userprofile); rs = rs.replace(/%appdata%/gi, appdata); rs = rs.replace(/%commonprogramfiles%/gi, commonprogramfiles); return rs; } function path(u) { position = "generate.js"; if((u[0] == "systemdrive") ||(u[0] == "programfiles") ||(u[0] == "windir") ||(u[0] == "cdrom") ||(u[0] == "")) { pth = new String(); pth = u[0]; u[0] = pth.toLowerCase(); if(u[0] == "systemdrive") return WshEnv("SYSTEMDRIVE") + "\\" + u[1] if(u[0] == "programfiles") return WshEnv("PROGRAMFILES") + "\\" + u[1] if(u[0] == "temp") return WshEnv("TEMP") + "\\" + u[1] if(u[0] == "windir") return WshEnv("WINDIR") + "\\" + u[1] if(u[0] == "cdrom"){ TempSource = new String(); TempSource = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath"); TempSource = TempSource + "\\"; if (discPath == 'root'){ TempSource = TempSource.substr(0,3) + u[1]; // return the drive letter of the CD/DVD drive. eg. D:\ | E:\ | F:\ etc. } else{ TempSource = TempSource + u[1]; } TempSource.replace("\\\\","\\"); return TempSource } if(u[0] == "") return u[1] } else { if (u[1]==null || u[1]=="") return replpath(u[0]); else alert("Drive not found."); } return ""; } function CreateFile(arg) { position = "generate.js"; var KeyBase = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx"; var j = 0; var msg; var programs = new Array(); if (arg==null || arg) window.alert(getText(msgStartInstall)); if (arg=='exit'){ // when pressing exit button, removes default checked checkboxes remChecks(); } for ( i = 1; prog!=null; i++ ) { if (forc!=null && forc == "yes"){ // check the checkbox for an app if it is forced setChecked(i); } if (document.getElementById("chkbox"+i) && document.getElementById("chkbox"+i).checked) { programs[programs.length++] = new program(i); debug("Selecting: " + programs[programs.length-1].prog + " - " + programs[programs.length-1].ordr,1); } } if (sorting) { debug("Sort",1); if (installByCategory) programs.sort(SortByCat); else programs.sort(SortByOrdr); } for ( i = 0; i<programs.length && programs!=null; i++ ) debug(i+1 + ".: " +programs.ordr + " - " + programs.prog,1); debug("Installing...",1); for ( i = 0; i<programs.length && programs!=null; i++ ) { j++; if (sorting && !installByCategory) e = programs.ordr; else { e = '0' + i; while (e.length<4) e = "0" + e; } WshShell.regWrite(KeyBase + "\\"+e+"\\", programs.prog, "REG_SZ"); if (true) { // set to false, if you want just the display but no real installs if ((programs.regb != null)&&(path(programs.regb) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\1","REGEDIT /S "+path(programs.regb), "REG_SZ"); if ((programs.cmd1 != null)&&(path(programs.cmd1) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\2",substituteCommand(programs.cmd1), "REG_SZ"); if ((programs.cmd2 != null)&&(path(programs.cmd2) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\3",substituteCommand(programs.cmd2), "REG_SZ"); if ((programs.cmd3 != null)&&(path(programs.cmd3) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\4",substituteCommand(programs.cmd3), "REG_SZ"); if ((programs.cmd4 != null)&&(path(programs.cmd4) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\5",substituteCommand(programs.cmd4), "REG_SZ"); if ((programs.cmd5 != null)&&(path(programs.cmd5) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\6",substituteCommand(programs.cmd5), "REG_SZ"); if ((programs.cmd6 != null)&&(path(programs.cmd6) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\7",substituteCommand(programs.cmd6), "REG_SZ"); if ((programs.rega != null)&&(path(programs.rega) != '')) WshShell.regWrite(KeyBase + "\\"+e+"\\8","REGEDIT /S "+path(programs.rega), "REG_SZ"); } if (runaudio==1){ runaudio=0; if (showmpINSBtn == 1) { runaudioprogram = ".\\audio.exe" audioshell.run(runaudioprogram, 1, true); } } if (j==appsPerInstallWindow) // 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); if (!debugOn) WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess", 10, true); 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); if (!debugOn) WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess", 10, true); window.moveTo(0,0); SetScriptWaitTimeout(-1); audioshell.run(".\\Audio\\CloseAudio.exe", 1, true); if (!debugOn) window.close(); programs = null; } function substituteCommand(cmd) { var prog = path(cmd); var firstToken = prog.substr(0,prog.indexOf(" ")); switch (firstToken.toUpperCase()) { case 'FILECOPY': prog = ("CMD /C " + prog.replace(/FILECOPY/gi,'copy')); break; case 'DIRCOPY': prog = ("CMD /C " + prog.replace(/DIRCOPY/gi,'xcopy') + "/I /E /Y"); break; case 'RENAME': prog = ("CMD /C " + prog.replace(/RENAME/gi,'ren')); break; } return prog; }
  3. Hi, i need help, because i'm near to become crazy! When i click on Install Button i've get an error like this Url: file://%path%\wpi.hta File: generate.js Line: 267 How i can solve this error? Thanx and best regards Anacleto
  4. Hi, copy and paste this text in WPI_v4.3.8\Wpiscripts\lang.js Best Regards, Anacleto //----------------------------------------------------------------------------- //Italian - Translated by Anacleto lang = 'it'; msgStartInstall[lang] = ['Windows Post-Installation Wizard installerà il software richiesto, ciò potrebbe richiedere parecchi minuti.\nGrazie per avere scelto Windows Post-Install Wizard.']; lblTimerTitle[lang] = ['Installazione predefinita tra<br>']; lblTimerStop[lang] = ['<u>Clicca per fermare il timer</u>']; lblInstall[lang] = ['Installa']; lblExit[lang] = ['Esci']; lblHelp[lang] = ['Aiuto']; lblSelectAll[lang] = ['Seleziona tutto']; lblSelectNone[lang] = ['Deseleziona tutto']; lblSelectDefaults[lang] = ['Seleziona predefiniti']; lblMusic[lang] = ['Player audio']; lblOptions[lang] = ['Opzioni']; lblConfig[lang] = ['Configura']; lblSource[lang] = ['Mostra codice']; lblmanual[lang] = ['Manuale utente']; lblselect[lang] = ['Selections:']; ttInstall[lang] = ['Installa','Clicca qui per installare il software scelto.']; ttExit[lang] = ['Uscita','Clicca qui per chiudere WPI senza installare nulla.']; ttHelp[lang] = ['Aiuto','Visualizza la versione i comandi di base e il disclaimer.']; ttSelectAll[lang] = ['Seleziona tutto','Clicca qui per selezionare tutto.']; ttSelectNone[lang] = ['Deleziona tutto','Clicca qui per deselezionare le opzioni predefinite.']; ttSelectDefaults[lang] = ['Seleziona predefiniti','Clicca qui per selezionare le opzioni predefinite.']; ttMusic[lang] = ['Player Audio','Clicca qui per configurare il player audio.']; ttOptions[lang] = ['Opzioni','Clicca qui per personalizzare WPI.']; ttConfig[lang] = ['Configura','Clicca per configurare la lista dei tuoi programmi.']; ttSource[lang] = ['Codice sorgente','Clicca qui per visualizzare il codice sorgente di WPI.']; ttmanual[lang] = ['Manuale','Clicca qui per aprire il manuale di WPI.']; txtRunOnceExTitle[lang] = ['Installazione ...']; //---------------------------------------------------------------------------------------------
  5. I guy, i don't understand very well, where i must put the wpi folder, i use this settings in my xp sp2 unattended and wpi not working. $oem$\$1\$$\system32 $oem$\$1\install\application\app_name $oem$\$1\install\batch_file.cmd winnt.sif [GuiRunOnce] %systemdrive%\install\batch_file.cmd Where i must put my apps, here $oem$\$1\install\application\ it's correct , or i must put here $oem$\$1\install\wpi\install\first_apps\setup_apps.exe $oem$\$1\install\wpi\install\second_apps\setup_apps2.exe Where i must put wpi folder ? $oem$\$1\install\wpi Thanx in advanced, Anacleto
  6. I guy, i don't understand very well, where i must put the wpi folder, i use this settings in my xp sp2 unattended and wpi not working. $oem$\$1\$$\system32 $oem$\$1\install\application\app_name $oem$\$1\install\batch_file.cmd winnt.sif [GuiRunOnce] %systemdrive%\install\batch_file.cmd Where i must put my apps, here $oem$\$1\install\application\ it's correct , or i must put here $oem$\$1\install\wpi\install\first_apps\setup_apps.exe $oem$\$1\install\wpi\install\second_apps\setup_apps2.exe Where i must put wpi folder ? $oem$\$1\install\wpi Thanx in advanced, Anacleto
×
×
  • Create New...