Jump to content

Djé

Member
  • Posts

    359
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    France

Everything posted by Djé

  1. Salut Fred If you problem occurs during installation, one possibility is that you may have a program launched by WPI that is still running (the last uncheck one in the installer). WPI is waiting for it to terminate before closing itself.
  2. Actually, this way you're breaking the process that finds the command line parameters: Strangely, document.location features these 3 /s: "file:///". You can check it by yourself by inserting this line in the code and watch the result: alert(document.location); So, as the current 5.2 download only features 2 /s, there's a bug there too. BUT this should NOT trigger any other bug than not being able to use command line parameters anymore. More specifically, this is not related to the bugs discussed above.
  3. One More, sadicq ! It looks like the file patcher is not yet used to update the themes. So it should not even be called from wpi.hta. Anyway, that example function call was meant for 5.1 and has no reason to be anymore. Further, since there is no more class="txt" in wpi.htm, it has no effect at all! Only triggering strange bugs! Because of this, you don't even need to "Apply this fix on a clear WPI". Just comment the line out as showed by sadicq. In any case. By the way, the opText class, which exists in wpi.htm since at least 5.0, never had any definition in wpi.css! So it seems it's useless altogether as nobody noticed it! One more simplification to implement in the themes!
  4. Yep, once again sadicq is right: I've only tested the installer from HDD and found the 100ms value to be enough, but did not think about you guys still burning disks You may want to use sadicq's fix:
  5. Why not clicking the click here link in the error message and tell us what it says...
  6. @Sadicq: you may well be true. @Pliek: sorry, I did not investigate too much in this direction because this code won't exist anymore in 5.2. (the bug seems to be specific to 5.1). In the next version, the installer code will be quite simpler and thus more robust (or at least one can hope so ). While waiting for 5.2, you may want to give a try to sadicq's fix. Like he said, it may not be right, but hey, if it works... Please keep on reporting your success/failure here.
  7. Yes it is. If you search the forum, you may find and old thread by gosh about burning a CD with these 2 folders, so you won't even need winPE.
  8. Although the relation is not straight forward, this bug is related to the corrupted i counters bug mentioned in the 5.1 bugs report thread. While waiting for 5.2 to be released, please use Sadicq's 1st fix FOR THIS SPECIFIC CASE (only 1 program to install). If you want to use WPI with more programs (and who would not?), also use either Sadicq's 2nd fix or mine (or both). See the following posts in the above mentionned thread to find them.
  9. Pliek, can you please just confirm that the 20 seconds you're talking about are taking place AFTER all the installations are finished (and that it's NOT the TOTAL installation time). Sorry to inquire about this, but I'd prefer not to follow a dead track if I'm to investigate on this issue. Installer in 5.2 will be somewhat different but we'd better be sure that this problem is 5.1 specific.
  10. But it's declared in a totally different function (ReplacePath()) located in a different file (generate.js)! It's not useless because anyhow, the i variable is used in that other function. Declaring it (in ReplacePath) prevents it from interfering with other i variables in other functions... Which fixes the bug and any forthcoming one of the same order. Of course replacing i by k also kills the interference related to our bug. That's why both fixes do work.
  11. Why not? The 3 fixes are applied to 3 different functions. I'd say that applying the 3 of them is the best solution. Or I'm missing something? Other than that, I totally agree: @fanatf1: when we talk about 1st & 2nd fix, it's refering to both sadicq's fixes, not mine.
  12. Yes, Sadicq is right. @fanatf1, if you used his second fix, then I'm 99.99% sure that you have to use the 1st one as well to make it work properly. If you used only my fix, then the problem comes from something else...
  13. @hexbin: You're install log shows only successes, so your bug may be the same as fanatf1's 1st bug. See below. For the 1st bug, can you: - confirm that all commands are marked as 'success' in the log file? - tell us if it still happens if you implement sadicq's 1st suggestion? I'm really not sure if this is the root of the problem but we'd better make sure. About the second bug, please double check that 'Do Not Load Desktop' is not checked in the options. This one makes the computer reboot BEFORE the desktop loads!
  14. Dead on! You're absolutely true. It will also have to be fixed. But it was not linked to the bug, as at any time they are equal
  15. Ok guys, we should have the culprit for your bug, thanks to Sadicq for finding the right reason: those bastard counters that have a global scope while they should only have a local one. @Sadicq, good job, you're second mod (replacing 'i' with 'k') fixes it. The best way to fix it is simply to add var i; at the beginning of ReplacePath() in generate.js: it's the 'i' from that function that messes with the 'i' in InstallPrograms(). The bug is only triggered when using environment variables like %Systemdrive%. That's why it was quite a stealth bug. function ReplacePath(v) { position="generate.js"; whatfunc="ReplacePath()"; var i; var rs = new String(); ...addition on line 117. We will have to tighten the scope of all the counters for 5.2.
  16. What about searching the forum itself? You may find this. Since cmdlines.txt only allow for quite limited syntax in the commands, you may also want to put them (specifically the NET USE one) inside a .cmd batch file and only call that batch from cmdlines.txt.
  17. This kid is not acting. He is obviously suffuring from hyperactivity, wich is a well documented behavioral desease (it's affecting mainly young boys in western cultures). If it were a sport, this kid would be a champion anyway! All my condolences to the family, tho.
  18. Well, as you put it, the condition means: "if OS is 2K, XP or 03, THEN grey it out". Your item is greyed out in XP BECAUSE the condition is met! In facts it's working the other way around what you're thinking it is. Good news, tho, you just have to reverse it! : gcond[pn]=['!(getOSver()=="2K" || getOSver()=="XP" || getOSver()=="03")'];or gcond[pn]=['!(getOSver()=="2K" || getOSver()=="XP" || getOSver()=="03") || !FileExists(\'%Systemroot%\\system32\\drivers\\sptd.sys\')'];
  19. ??? But you can have the var definitions wherever you want! The 'Theme', 'ttInstall' or 'Style' variables you're using are already defined elsewhere. So why not these as well? I've just put it there for the sake of clarity. Beside, this code also handle the 3 possible states: p, pt & t you want to deal with. Now if you want the vars to have different values depending on 'ButtonType', just do this: InstallButtonDownPic=(ButtonType == 't' ? "./Common/spacer.gif" : "./themes/" + Theme + "/installdown.gif"); InstallButtonOverPic=(ButtonType == 't' ? "./Common/spacer.gif" : "./themes/" + Theme + "/installover.gif"); InstallButtonPic=(ButtonType == 't' ? "./Common/spacer.gif" : "./themes/" + Theme + "/installbutton.gif"); ttInstall=(ButtonType == 'p' ? '': ttInstall); No need for all the 'if's. And then <div id="InstallButton"> <script language="javascript"> document.write('<img src="'+InstallButtonPic+'" align="absbottom" class="mainbtn" border="0" name="continuebutton" id="continuebutton" onClick="StopAudio(); stopInterval(); CreateFile(\'install\');" onMouseDown="this.src=InstallButtonDownPic;" onMouseOver="this.src=InstallButtonOverPic; stm(getText(ttInstall),Style[0]);" onMouseOut="this.src=InstallButtonPic; htm();" />'); </script> <br> </div> BUT then, in the 'p' or in the 't' cases, you'll have useless events which may be the root of you problems with the img disapearing...
  20. I'm pretty sure that your problem of the pic disapearing briefly is not related to your code, but to how mshta handle the events. You may have better results with the following code: <div id="InstallButton"> <script language="javascript"> InstallButtonDownPic="./themes/" + Theme + "/installdown.gif"; InstallButtonOverPic="./themes/" + Theme + "/installover.gif"; InstallButtonPic="./themes/" + Theme + "/installbutton.gif"; spacer="./Common/spacer.gif"; //debug var ButtonType ='pt'; document.write('<img src="'+(ButtonType == 't' ? spacer : InstallButtonPic)+'" align="absbottom" class="mainbtn" border="0" name="continuebutton" id="continuebutton" onClick="StopAudio(); stopInterval(); CreateFile(\'install\');" '+(ButtonType == 't' ? '' : 'onMouseDown="this.src=InstallButtonDownPic;" ')+'onMouseOver="'+(ButtonType == 't' ? '' : 'this.src=InstallButtonOverPic; ')+(ButtonType == 'p' ? '' : 'stm(getText(ttInstall),Style[0]);')+'" onMouseOut="'+(ButtonType == 't' ? '' : 'this.src=InstallButtonPic; ')+(ButtonType == 'p' ? '' : 'htm();')+'" />'); </script> <br> </div> This doesn't require the Loadpicvar() function. And it's tested working. Basically, it writes the minimal quantity of needed code to the document, depending on the 'ButtonType' value. But I don't guaranty that the problem will completely disappear. [EDIT] Although it should be okay, beware of spaces when copy/pasting the above code: the whole document.write... statement is on 1 line. Double check your copy of the code before using it.
  21. Oops, my bad. I shouldn't assume that everybody is using M$. T_D has tried to convert my file to Open Office but I think it will require some work because of the code being in VBA. BTW, what scripting language is OOo using? I may try myself to do the conversion (if ever I find the time) as I'd prefer an open solution. Anyway, attached is my 'config.js' which is actually named 'ProgsForRunOnceEx.js'. To use it, you can (beside renaming it) either put it in your WPIScripts folder and call it using WPI.hta config=ProgsForRunOnceEx.js, or put it wherever you want and feed its full path to WPI (WPI.hta config="C:\path to\ProgsForRunOnceEx.js"). ProgsForRunOnceEx.js Here are also my mozilla's config files, for if you want to click on the 'Select...' buttons: FxExtensions_config.jsTbExtensions_config.jsRemember to mod your WPI.hta. Also adapt the commands calling them (in the 'onclick' attributes of the buttons) to the location where they are. Compared to a 'normal' config.js, mine has the following modifications: - At the top are the variables normally defined in useroptions.js (only the ones having different values from the default ones). This is not related to injection. It is just like I've merged the 2 files, for ease of use. - Then comes the 'normal' config.js' progs definitions. . Only necessary fields are presents. . Some progs have injected HTML & javascript code in the prog[pn] field: prog[pn][0]+=... . Also note that I've commented out the pn=1; line. That way I can merge several config.js files into one before running WPI, but I'll talk about this somewhere else.- At the bottom are the injected functions and styles which are necessary for the injection to work properly: . A theme file patcher function to remove the .txt class from WPI.htm (in order to have all the edit buttons aligned, I needed this class to be used only for the progs labels). . A custom function to manage the injected Radio Options. This is not necessary if you do your injection by hand, but it greatly helps when doing it programmatically. . A custom <style> element with all the styles used by the injection, plus the moded .txt style.Because of all these modifications, it is not possible to edit this file inside the config wizard. But that is not the goal anyway. As for the injections themselves, here is how it works: - In WPI, the prog[pn] field is used 'as is' inside a <label> html element. So the 1st injected thing is a closing tag for this element: </label> ... and the last one will be an opening tag to match the closing one inside WPI! - In between them, we can now inject whatever we want. - Injected html elements have 'onclick' or 'onchange' events which modify the commands (cmd1, etc.) for the prog. - Although one could inject manually a lot of things, I've limited myself to inject: . checkboxes: set or unset a command, . radioOptions: give a choice for a command, . 'edit' buttons: edit the file of the command, . textboxes: give some arguments to the command, . custom 'file' input: give a file argument to the command (or unset it), . 'run' buttons: run something (usually different from a prog's command) 'now' (don't wait for the installer to run it).- These injections have their own labels. But, as we don't want the texts of these labels to be displayed inside the tooltips headers, I've put them into textboxes. - Combinations of the injections are also possible. That's it! Feel free to inquire for deeper explanations.
  22. Thank you. You can generate my own config.js by yourself! Just get my Excel Progs Lists Manager. In the form appearing when you click the yellow button, just select Djé's for the Progs List and WPI for the output format, and click the Write the Script button. Et voilà! Moreover, if you tick the Use the 'Now' variables values checkbox and if the path to WPI is properly set in the SETTINGS datasheet, you will be able to run WPI with that config.js so you can actually see it working* in real situation, directly from the Progs Lists Manager (RUN button in the OUTPUT datasheet). I think that this way you will have better insight in what is actually done: The config.js may look somewhat cryptic but looking at the Djé's Progs List and comparing it to the config.js and to the result will explain things much better. Feel free also to look at the code (ALT+F11 in Excel) if you wish. And of course, you're welcome to ask for further explanations here. *As mentionned in the first post, if you want to be able to run a second WPI from a RunButton injection, you will have to mod WPI.hta (~ line 21) to make it able of multiple instances (singleInstance = 'no'). Obviously you will have to have the config.js files used by these new instances ready as well. In my example with the Firefox or Thunderbird extensions, generate the one from the Mozilla Progs List (Use filters for Fx or Tb).
  23. Oh, I see. Import your config.js into the Progs List Manager. Well, cleverly using word's Replace function(with the 'plus' options), it shouldn't prove too difficult, however big is your config.js. For example you could open it in Word and then 'Replace All' the following couples (have the 'generic characters' checked, order is important): //*^13 by nothing -> commented lines [a-z1-6]@\[pn\]=\['(*)'\];^13 by \1^t -> quoted values [a-z1-6]@\[pn\]=\[(*)\];^13 by \1^t -> unquoted values ^tpn++;^13 by nothing -> index incrementer Then untick the 'generic characters' checkbox and replace the following: \' by ' -> escaped single quotes \\ by \ -> escaped slashes Remove also the remaining 'pn=1;' line at the top. Select all and copy it. Paste it in a new datasheet in Excel. If you have the default settings for the import wizard (field separated by tabs), all the fields should go to different columns. Otherwise use the data/convert command. (Almost) done: you just have to tweak the progs with missing fields or multiple commands so that all the fields are well aligned. When your 'table' is square enough copy/paste it in a Progs List Datasheet and tune it to your needs. You will also have to break your commands into path/file/args. This can't be so much automated but here is how I'd do: Copy the column containing the commands and paste it into a new Word Document. Go down the list, inserting tabulations before and after (if there are any argument) file names. Replace all the 'tab+space' (between filename and arguments) by 'tab' only. (use the ^t special character for tab). Select all and copy the text. In your Excel's Progs List, have the 3 columns for path/file/args empty, select the top left cell of these 3 columns and paste your word text. Et Voilà! Thank you very much. I'm already speaking a lot with mritter But I'm not sure if this is easy and/or a good thing to implement in WPI (it may get bloated). Anyway, the users should decide. If there's a demand (yours is maybe enough?), we'll see.
  24. Thank you very much What do you have in mind, precisely? Maybe a solution is not that far...
×
×
  • Create New...