Jump to content

Yzöwl

Patron
  • Posts

    4,113
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

Everything posted by Yzöwl

  1. @ALL Although I'm aware of your intent, an entire response tree of 'your requirements do not meet with how we'd do it' is starting to look more like an attack. It appears that poly4life received the information they needed in my first response and have stated that the tool choice isn't theirs so lets accept that and move on.
  2. Just one thing to be wary of, there may be some characters in your command which could be mistaken by the batch file as pertinent to it (as opposed to the actual command). I'd suggest, at least in the case above, using:
  3. It suppose it depends on what the perl script is used for, if it is used only to output the variable then you may be able to run the perl script as a command within a FOR loop saving the IN output within the DO. You could also just output the perl created variable to a file and then read that back in with the batch file.
  4. Are you serious? You are trying to make a script, (obviously without success) and you are not providing us with any of it in order to prompt us for the help you need. Someone else has already provided an 'excellent' script and instead of using it you'd prefer one of us to do it for you instead! On top of that, the main part of what you need is already provided in this topic.
  5. Quick question gsm, would I need to add to line four and line six to add to lines four and line seven respectively. If I add to line four it would mean that old line four became new line five, old line five became new line six and old line six became new line seven! I'd suggest the term append to line
  6. I'm not sure that I fully understand what your intention is. However from my understanding it is possible to display a message box from the batch file without undertaking the process of creating a vbscript, running it, then deleting it.
  7. Because there may be a better way to do something, I ask the question. this is not a forum to rant I do hope that the remark you've made about a rant was not directed towards me for providing you with information which may have been of interest.'Better' or 'tighter' code in a batch file may be faster running, less memory intensive, improved syntax etc. but less lines or more specifically one it will rarely be. I do apologise for not knowing what this forum is for, especially embarrassing because I oversee it.
  8. I'm interested to know why you need this as a single line. You said you were using a batch file, since that batch is doing the work and you are not typing multiple lines on each run I see no benefit in condensing the number of lines.
  9. Unfortunately that is not a solution! That script is looking at the version of the command interpreter not of the Operating System, granted they are usually the same but not always. There is no upper/lower case difference with those characters therefore the /i switch is not required. A more robust batch file method may be this (untested): @ECHO OFF&SETLOCAL ENABLEEXTENSIONS (SET OS_=) FOR /F "TOKENS=*" %%# IN ('NET CONFIG WORK^|FIND /I " WINDOWS "') DO ( (ECHO=%%#|FINDSTR/I "VISTA 2008">NUL 2>&1)&&(SET OS_=VISTA) (ECHO=%%#|FIND /I " 7 ">NUL 2>&1)&&(SET OS_=WIN7)) IF NOT DEFINED OS_ GOTO :EOF IF %OS_% EQU VISTA GOTO VIE9 REM Place commands for Windows 7 install below here IF DEFINED ProgramW6432 ( REM Place install command for Windows 7 x64 below here REM Place install command for Windows 7 x64 above here ) ELSE ( REM Place install command for Windows 7 x86 below here REM Place install command for Windows 7 x86 above here ) GOTO :EOF :VIE9 IF DEFINED ProgramW6432 ( REM Place install command for Vista or 2008 x64 below here REM Place install command for Vista or 2008 x64 above here ) ELSE ( REM Place install command for Vista or 2008 x86 below here REM Place install command for Vista or 2008 x86 above here ) GOTO :EOF
  10. I'm not at all interested in any of the installed software you are using or their switches, I have simply re-written your script to correct its syntax problems. Just replace your file with mine, try it, then report back!
  11. The use of non-required double-quotes around your paths and switches is the problem. Try something like this: @echo off setlocal enableextensions disabledelayedexpansion (set CDROM=) for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do ( if exist %%i:\sources\install.wim set "CDROM=%%i:") if not defined CDROM goto :eof start /wait %cdrom%\LOGS\ADOBE\adobe.exe /sAll start /wait %cdrom%\LOGS\QT\AppleApplicationSupport.msi /qn start /wait %cdrom%\LOGS\QT\AppleSoftwareUpdate.msi /qn start /wait %cdrom%\LOGS\QT\QuickTime.msi /qn start /wait %cdrom%\LOGS\SATSUKI\satsuki.exe /S start /wait %cdrom%\LOGS\VLC\vlc.exe /S start /wait %cdrom%\LOGS\SUPERCOPIER\SUPERCOPIER2.exe /S start /wait %cdrom%\LOGS\WINRAR\WINRAR.exe /s start /wait %cdrom%\LOGS\SKYPE\skype.exe start /wait %cdrom%\LOGS\FLASH\flashi.exe -install start /wait %cdrom%\LOGS\FLASH\flashf.exe -install start "" /wait %cdrom%\LOGS\NERO\nero.exe /SILENT /NORESTART^ /SERIAL="****-****-****-****-****-****-****" /USER="ALPHA" /COMPANY="ALPHA"^ /TASKS="desktopicon,imagefile_assoc" /TYPE="Full" start /wait %cdrom%\LOGS\AVIRA10\avira.exe -y del %0
  12. Yzöwl

    Status of TC76

    I doubt that very much! First of all the supported Operating Systems are too outdated to be worth the effort. Also the batch script itself is now bloated, very badly structured for easy updating and maintenance and in many places not very well written or formatted in order to be modified by end users.
  13. Did you include the ocx file in your setup? It would need to be included, and likely registered on the target PC.
  14. As jaclaz said, not only was the ENDLOCAL not required neither was the EXIT command, (I only added it so that the Topic starter would recognise that it was effectively still their entire file and prevent them from messing with it). RTK999 even with the non-required last line the script I provided would have worked perfectly, yours however would not. Also If changing the CDROM variable as you did, Id have preferred to have seen you use: (SET CDROM=%~dp0) Based on the level of knowledge shown by the Topic starter, I'd be inclined to advise against them adding additional code to the script. It'd likely require debugging to work properly and we're not here to debug a script at several stages through its development.
  15. The start command would only require the 'title' double-quotes in the single case where I've provided them in my re-write above. This was because archmonde11's example command needed quoting due to the space in their path on that line and without the title, that quoted string may be mistaken for one.
  16. @ECHO OFF & SETLOCAL ENABLEEXTENSIONS TITLE Windows XP SP3 - Unattended Installation (SET CDROM=%~d0) CLS ECHO= ECHO=Installing Unikey 4.0 ECHO=Please wait... START /WAIT %CDROM%\Apps\UKEY4.0\Unikey4.0.exe /s ECHO= ECHO=Installing WinRAR 3.2 ECHO=Please wait... START /WAIT %CDROM%\Apps\winrar3.2\winrar3.2.exe /s ECHO= ECHO=Installing Foxit Reader 3.0 ECHO=Please wait... START "" /WAIT "%CDROM%\Apps\Foxit Reader3\FoxitRead3.exe" /s ECHO= ECHO=Installing Copy File name 3.1 ECHO=Please wait... START /WAIT %CDROM%\Apps\CopyFilename31\copyfilenames31.exe /s ECHO= ECHO=Restarting the PC in 30 seconds... SHUTDOWN.EXE -r -f -t 30 -c "Windows XP will now restart in 1/2 minute" EXIT
  17. These messages are generally nothing to worry about. If I remember the code from the distant past well enough I seem to remember that no supression of error messages was employed in the hotfix extraction processes.
  18. You either: don't want any delimiters... FOR /F "DELIMS=" %%A IN ('DIR/S/B *.JAVA') DO ECHO=%%~dpnA ...or you want all tokens FOR /F "TOKENS=*" %%A IN ('DIR/S/B *.JAVA') DO ECHO=%%~dpnA
  19. Would something like this do you? @ECHO OFF FOR %%# IN (ALIVE NOSYSAID) DO IF EXIST %%#.TXT DEL %%#.TXT FOR /F %%# IN ('FINDSTR/VG:"BLACKLIST.TXT" "WIN-SEGMENT.TXT" 2^>NUL') DO ( (>NUL PING %%# -n 1 -w 20)&&(>>alive.txt ECHO=%%#))
  20. You need to better explain what you are trying to do! If I look at your example script this is what appears to be performed: Go through each line of win-segment.txt one at a time, (your list of IPs). For the first string of that line search blacklist.txt for a match If a match is found ping that IP and upon success write that address to alive.txt. Are you simply wanting a listing of live blacklisted IPs? or was your intention to get a listing of all non-blacklisted live IPs? BTW, your biggest problem in your example was that the found variable was being changed multiple times throughout the loops, as you had already enabled delayed expansion you'd certainly have been better advised to use !found! instead of %found%.
  21. To install using HFSLIP just extract the .reg file to the HFSVCPACK directory. If you want it only to run on a particular platform then your best bet would be to use a .cmd script, integrated with the registry changes, which firstly identifies that platform. Then place that .cmd file in the HFSVCPACK directory.
  22. I feel compelled to ask, "why are you downloading it? First thing I'd try is the built-in Internet Explorer Troubleshooter; Control Panel\All Control Panel Items\Troubleshooting\All Categories > Internet Explorer Performance If that fails to resolve your issue try turning IE8 off, rebooting and turning IE8 back on again; Control Panel\Programs > Turn Windows features on or off
  23. The use of that Windows Operating System on that machine would not be allowed; neither would its discussion here.
  24. Here is an example based on your sample which may help. @ECHO OFF ECHO=%~1 | FINDSTR/BI [//-][UI] >NUL || ( ECHO=To use this file you must use an appropriate switch & ECHO= ECHO= -u ^| -U ^| /u ^| /U Unistallation Routine & ECHO= ECHO= -i ^| -I ^| /i ^| /I Istallation Routine & ECHO= PAUSE & GOTO :EOF) SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION SET "_P=%~1" IF /I %_P:~1,1% EQU U GOTO UNI REM Installation tasks go below here ::Example ECHO=COPY .... GOTO :EOF :UNI REM Uninstall tasks go below here ::Example ECHO=DEL ...
×
×
  • Create New...