Jump to content

AlBundy33

Member
  • Posts

    216
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Germany

Everything posted by AlBundy33

  1. Why you need a self-extractor which won't stop batch-file execution? This is really necessary because you need to delete the files after they where extracted. It sound very strange what you are doing (e.g. same archives for different drive-letters) - can you explain more? --> I'm sure that there are better ways. Here are some hints: Simply use COPY program.lnk "%ALLUSERSPROFILE%\Desktop" Why do you copy shortcuts? There are a lot of scripts an tool which can create them. The installation path information cannot be in the archives because ... Why not use 7-zip (7za.exe as standalone-version), create a simple zip-file instead of an sfx-archive and call something like this in your batch-file 7za.exe x -y -o"YourTargetFolder_Maybe_C_or_D_or_any_other_drive" "path_to_zip\archive1.zip" Try this REM change to C:\test PUSHD %SystemDrive%\test REM do something REM go back to the last directory POPD Al
  2. If your batch-file is also on the stick you can get the drive with %~d0 drive: %~d0 path to script %~f0 (= %~dpnx0) path to script-dir %~dp0 have a look at the help for "for". Zusätzlich wurde die Ersetzung von Verweisen auf FOR-Variablen erweitert. Sie können jetzt folgende Syntax verwenden: %~I - Expandiert %I und entfernt alle umschließenden Anführungszeichen ("). %~fI - Expandiert %I zu einem vollständigen Dateinamen. %~dI - Erzeugt nur den Laufwerkbuchstaben von %I. %~pI - Erzeugt nur den Pfad von %I. %~nI - Erzeugt nur den Dateinamen von %I. %~xI - Erzeugt nur die Dateierweiterung von %I. %~sI - Erzeugter Pfad enthält nur kurze Dateinamen. %~aI - Erzeugt die Dateiattribute von %I. %~tI - Erzeugt Datum und Zeit von %I. %~zI - Erzeugt die Dateigröße von %I. %~$PATH:I - Durchsucht die in der PATH-Umgebungsvariablen angegebenen Verzeichnisse und expandiert die erste gefundene Datei %I zu dem vollständigen Dateinamen. Wenn der Name der Umgebungsvariablen nicht definiert ist oder diese Datei bei der Suche nicht gefunden wurde, wird dieser Parameter zu einer leeren Zeichenkette expandiert. Al
  3. Try this... @ECHO OFF SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION SET TARGETFILE=%~dp0targets.txt SET LOG=%~dpn0.log IF EXIST "!LOG!" DEL /Q "!LOG!" CALL :TEE %DATE: =0%, %TIME: =0% CALL :TEE ~~~~~~~~~~~~~~~~~~~~~~~ IF EXIST "%TARGETFILE%" FOR /F "tokens=*" %%C IN ('type "%TARGETFILE%"') DO ( IF "%%~C"=="" GOTO :EOF SET COMMAND=PSEXEC %%~C -c "C:\deployment tool\dummy.bat" dummy.bat CALL :TEE running !COMMAND! CALL !COMMAND! IF NOT !ERRORLEVEL! EQU 0 ( CALL :TEE %%C reported errorlevel: !ERRORLEVEL! ) CALL :TEE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) PAUSE GOTO :EOF :TEE ECHO %* ECHO %* 2>&1 1>>"%LOG%" GOTO :EOF Al
  4. Thats fine. But in my opinian a portable app should not write to registry because in many cases it will not be used anymore. For example: I have WPI and some apps on my USB-stick to install them on every machine I want - and in nearly all cases I don't run WPI on such a machine again. So it would be nicer to have such data in a temp file instead in the registry. Al When will all the new patches included in the download-archive? Is there a possibility to download the latest dev-version?
  5. I really don't like the registy-way. Why not use a temporary-config-file in Temp-Folder which can be deleted after WPI-install was done (like that file which is created in SystemDrive during install)? Al
  6. Happy new Year!!! I think this is a good idea. :-) Some options are really necessary - some maybe not. So we could vote for options we want to have also available on commandline. But: Maybe there is a user which needs an option for a very specific case which is not in the list. So why not implement something like a Map (or Dictionary in JS?) which holds all config-settings (key = config-key, value = config-value) and is initialized with default-values and can be overwritten with command-line-arguments. e.g. settings['options'] = './WPIScripts/config.js'; if [command_line_has_options_argument] settings['options'] = get_argument_from_command_line So you have - all settings at one place - can easily extend it - can easily overwrite all settings with command-line-arguments Al
  7. Ok Thanks Sure - but in my batch file I call wpi.hta with "%WINDIR%\system32\mshta.exe" "!CD!\wpi.hta" config="!CD!\WPIScripts\config.js" options="!CD!\WPIScripts\useroptions.js" %* and therefore I need the quotes because I don't know where WPI is started from.
  8. But I have different WPI-instances on my pc and after I started an instance the path to config and useroptions will be used for all instances. I also tried to run WPI with "C:\WINDOWS\system32\mshta.exe" "D:\System\WPI\wpi.hta" config="D:\System\WPI\WPIScripts\config.js" options="D:\System\WPI\WPIScripts\useroptions.js" but the config and options from my first instance are used. As I asked before: Where can I find an overview of all command line arguments? Just another question: How do you debug WPI? Al
  9. command-line-arguments "options" and "config" does not override registry settings. Is it really neccessary to store them in registry? Default should be options=./WPIScripts/useroptions.js and config=./WPIScripts/config.js - so there is no need for a registry key. Also quoted paths should be possible e.g. config="C:\my folder with a space\wpi\my config.js" Do you have an overview of all possible command-line arguments? Thanks Al
  10. Kel is on the right way. :-) --> the Sucess and failure after the command should not be displayed if icons are used. With "return-codes" I meant only to display the return-status of the commands (success or not) - thats all. Why not show the real commands instead of "command 1". In an unattended environment it doesn't matter what is displayed - but if you have a look at the installer window it would be nice to see a more usefull information about the current command. --> Maybe the commandline or the start-time or the execution time (new - start-time) or something else. For example You will get much more information if you display something like this Microsoft Viewer 2007 success_icon "%ROOT%\Anwendungen\Microsoft\Microsoft Viewer 2007\wordview_de-de.exe" /quiet success_icon "%ROOT%\Anwendungen\Microsoft\Microsoft Viewer 2007\WordViewer2003SP3-KB934736-FullFile-DEU.exe" /Q success_icon "%ROOT%\Anwendungen\Microsoft\Microsoft Viewer 2007\office2003-KB934041-FullFile-DEU.exe" /Q failure_icon "%ROOT%\Anwendungen\Microsoft\Microsoft Viewer 2007\PowerPointViewer.exe" /quiet running_icon "%ROOT%\Anwendungen\Microsoft\Microsoft Viewer 2007\powerpointviewer2007sp1-kb937158-fullfile-de-de.exe" /quiet waiting_icon "%ROOT%\Anwendungen\Microsoft\Microsoft Viewer 2007\visioviewer.exe" /quiet waiting_icon "%ROOT%\Anwendungen\Microsoft\Microsoft Viewer 2007\visioviewer2007sp1-kb937160-fullfile-de-de.exe" /quiet waiting_icon "%ROOT%\Anwendungen\Microsoft\Microsoft Viewer 2007\Microsoft Excel Viewer 2003 1.0.exe" /Q /C:"msiexec -i xlview.msi /passive /norestart /qb ADDLOCAL=ALL REBOOT=ReallySuppress" waiting_icon "%ROOT%\Anwendungen\Microsoft\Microsoft Viewer 2007\ExcelViewer2003SP3-KB934737-FullFile-DEU.exe" /Q instead of this Microsoft Viewer 2007 Command1 success Command2 success Command3 success Command4 failure Command5 My idea was to display all commands of the current application (there is no need to see also the next app and der commands) to know where I am and how many commands are left for the current install. If you can modifiy the list you can also remove the displayed commands of application that are done and set the success/failure-icon before the application-name. --> so you have above the current applicaion only a list of installed application und below the current application the commands, These are just ideas and nice-to-haves - WPI also runs without that really good. :-)
  11. @ZileXa: I don't want to replace the file in XP-source. I will install the patch on demand. @x-Shadow-x: Is the line really necessary: "xCACLS "C:\windows\system32\uxtheme.dll" /E /G shadow:F /Y"? As far as I know I should have all rights on this files (but i'm currently not sure).
  12. But I think that the lines with the name "command X" are not really usefull because currently they are used to display the exit-status of the command. Instead of display Applicationname command1 command2 ... It would bebetter to display something like this Applicationname status_image the_command_to_execute status_image the_command_to_execute status_image the_command_to_execute Another_Applicationname ... Where always all commands of the current application should be displayed - with the status_image you can display if the are "running", "successfully exited", "exit with failure" or even wait to be executed. Al
  13. But how you will do this? Only copy does not work - at least the themes-service must be terminated (no problem) but if the service is terminated some application can have a reference to the dll - so it is not possible to copy the new one. Next problem: this method does only work with one version (e.g. XP SP3) - I wouldn't work on other XP-Versions (maybe SP1). --> I integrate WPI into my XP-Install CD but have the possibility to run WPI on every machine.
  14. As the topic says - i'm looking for a tool that patches the uxtheme.dll to use unsigned themes in windows xp. I know that I can integrate the patched uxtheme.dll in windows-cd or use n-lite or something else. But I really need a tool what I can integrate with WPI in my CD which is fully unattended and don't shows any dialogs like windows file protection or something else. Can anybody help me? Thanks Al
  15. Installer should display all commands (at least all commands for the current application) - so we know when the current install-process is done. Al
  16. The pause-button in installer-window should pauses the process before next command starts instead to halt an the next application to install.
  17. Little change for install-window Instead of command1 success command2 failure ... you can display a status-image (running, install sucess, install failure) followed by the executed command line If there was an error you can set a tooltip on the error-image to display the error-message. I think this looks better and with a horizontal-scrollbar it is possible to see the complete command line. Al
  18. An option to hide command-line-windows would be very nice. --> Their should be an option in option-wizard to set a default-value and there should be a button in install-window to set this value again and to show the hidden windows (maybe they need some user-input).
  19. By default I don't check any applications and disable the timer - but when I start WPI after XP-Install I set the command-line arguments check=default timer=300. If I use this commands an my hdd-WPI it works - if I use them on CD they will be ignored. :-( Al
  20. By default I don't check any applications and disable the timer - but when I start WPI after XP-Install I set the command-line arguments check=default timer=300. If I use this commands an my hdd-WPI it works - if I use them on CD they will be ignored. :-( Al
  21. I need special "cleanup" commands. For me cleanup-commands are command to delete shortcuts and move shortcuts or folders inside the startmenu. I want to enable/disable this feature in wpi before starting the installation. For example install of WinRAR: =================================================================== === Programmnummer: 23 === Kategorie : Toolz === Programm : WinRAR 3.62 === Größe : 12 MB === Standard : ja === Freeware : nein === Reihenfolge : 5 =================================================================== INSTALL: "%ROOT%\Anwendungen\Toolz\WinRAR 3.62\wrar362d.exe" -s INSTALL: "%ROOT%\Tools\7z.exe" x -y -o"%PROGRAMFILES%\WinRAR" "%ROOT%\Anwendungen\Toolz\WinRAR 3.62\rarkey.rar" CLEANUP: "%ROOT%\Tools\eMove.cmd" "WinRAR" "Toolz" I can have more cleanup-commands but only need one for WinRAR. I manage all my commands per application in a file named unattended_*.inf, parse it and create config.js. The result for winrar looks like this: prog[pn]=['WinRAR 3.62']; uid[pn]=['PRG23']; desc[pn]=['<div style="padding:5px;"><b style="white-space:nowrap;">kommerziell/Registrierung erforderlich</b><br/><table style="color:black;font-family:\'Courier New\', monospace;font-size:1em;border:none;"><tr><th align="left" nowrap><u>Registrierungungsdaten</u></th></tr><tr><td style="white-space:nowrap;">WinRAR 3.62 Serial: *</td></tr><tr><td style="white-space:nowrap;">* Um WinRAR zu registrieren, muss nur eine der Dateien rarkey.rar</td></tr><tr><td style="white-space:nowrap;">in das WinRAR-Verzeichnis entpackt werden</td></tr></table></div>']; ordr[pn]=[23]; dflt[pn]=['yes']; bit64[pn]=['no']; forc[pn]=['no']; cat[pn]=['Toolz']; picf[pn]=['%ROOT%\\Anwendungen\\Toolz\\WinRAR 3.62\\wpi_image.png']; picw[pn]=['128']; pich[pn]=['128']; textl[pn]=['Left']; cmds[pn]=['"%ROOT%\\Anwendungen\\Toolz\\WinRAR 3.62\\wrar362d.exe" -s','"%ROOT%\\Tools\\7z.exe" x -y -o"%PROGRAMFILES%\\WinRAR" "%ROOT%\\Anwendungen\\Toolz\\WinRAR 3.62\\rarkey.rar"','"%ROOT%\\Tools\\parsecommands.cmd" "%ROOT%\\Anwendungen\\Toolz\\WinRAR 3.62\\unattended_150.inf"']; pn++; As you can see the cleanup-commands are executed by the script parsecommands (which parses the unattended*.inf again) as last command during install. To enable/disable this feature I create a script setWPIenv.cmd at WPI-start where I store the state. parsecommands.cmd start setWPIenv.cmd and checks if the cleanup-commands should be executed. Maybe there is a way to integrate such cleanup-commands in WPI and enabled/disable them global in main-WPI-window. Al
  22. Thanks - this works for me. Btw: How do you debug your code? To find out what was wrong I used a lot of alerts. :-/ Al
  23. With this from code.js no batch-files with arguments (e.g. "drive:\a\folder\test.cmd" MyArgument) will be found: if (cmd.toUpperCase().indexOf(".CMD") != -1 || cmd.toUpperCase().indexOf(".BAT") != -1) { if (!FileExists(cmdLine)) { NumFailed++; result=getText(InstallFail); SuccessFail=false; WriteLogLine(cmdName+' '+getText(FailFileDoesNotExist)+': '+cmdLine); return false; } } Al
  24. In core.js defaultWPI() you get the ROOT with // %root% root=fso.GetParentFolderName(wpipath); if (root.indexOf(":")==1) root=root.substr(0,2); But ROOT should be used to get the WPI-parentfolder. My folder-structure looks like this Drive:\any\directory - WPI (only with contents from the download-package) - Tools (my additional Tools) - Applications - Common - Multimedia - Microsoft - ... And my commands look like this: %ROOT%\Applications\Multimedia\... But with the Bug above my commands does not work. :-( Only with root=fso.GetParentFolderName(wpipath); all works fine. Al
×
×
  • Create New...