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. It looks to me as if it's just a badly written batch file! Use IF EXIST statements if you wish to not have 'Could Not Find...' messages. Also please make sure that all paths containing spaces are enclosed in double quotes, (").
  2. @ Stealth111 What about this 'batch file' example: 1: @ECHO OFF 2: REG ADD HKLM\SOFTWARE\Classes\.egp /VE /D "egpfile" /F >NUL 3: REG ADD HKLM\SOFTWARE\Classes\egpfile /VE /D "Easy Grade Pro File" /F >NUL 4: REG ADD HKLM\SOFTWARE\Classes\egpfile\shell\open\command /VE /T REG_EXPAND_SZ /D "\"\\SERVERNAME\Redirect\%%USERNAME%%\Easy Grade Pro\egp.exe\" %%1" /F >NULPlease remove the line numbers, they are only added to identify wrapped lines.
  3. What is supposed to be doing?You should be using something a little more along the lines of rar a -m5 -mdg -v2097152k "%destpath%\%destname%.rar" "%my_folder%\%my_file%"Also with a probable massive filesize you may wish to decrease the split archive sizes and use the -rv and /or -rr switches. type rar -?in the appropriate directory for a full command and switch listing.
  4. I once posted here on these boards a reboot to safe mode `compiled` batch file. It ran a key in LM RunOnce for the revert to normal mode on next boot, so I know that LM RunOnce works everytime, (when you know how). <Edit> Here's the attachment from the said post </Edit>
  5. Vbscripting is built into your operating system! But you said That not only shows the command prompt, but forces the user to key in dates from the command console, not from the Windows itself!
  6. Two things As you are using a command line you should have something like this in your sif file DetachedProgram = CMD.EXE Arguments = "/C 7za x "And why goto so much trouble, I know an sfx can be slightly larger, but why not sfx them and run the exes to extract.
  7. and the question is?
  8. You should probably be looking at using vbscript example.vbs Dim sh Set sh = WScript.CreateObject("WScript.Shell") Dim fromis fromis = Inputbox("Please enter the 'date from'", "From Date") Dim uptois uptois = Inputbox("Please enter the 'date to'", "To Date") sh.Run "check_failures " & fromis & " " & uptois Set sh = NothingThis is a very basic example with no error trapping etc. If you require any further help with this you should post your request in the Programming (C++, Delphi, VB, etc.) forum
  9. Thanks for the admission! I was only trying to highlight the possible problem which may have occurred by using the word toggle. It may appear that your explanation was clear enough but we have here a rather diverse community from non-english speaking countries. In my experience here, nothing can really be considered as crystal clear! I actually find the script a better solution to the registry method usually employed and appreciate your effort in offering it to the community.
  10. Try again!This time tell us what good a toggle is from a clean install only, it isn't is it? As I stated, it assumes that each time you run it you are already in a specific 'taskbar locked' state. <Edit> Anytime you want to argue just let me know...but please check that your argument has substance first. </Edit>
  11. @ PaulIA Does this not assume that all users of the script have their taskbar locked prior to running it? A Sendkeys script is not what I would consider as programming
  12. Something like this may help you out @ECHO OFF &SETLOCAL :: CREATE YOUR SPECIFIC VARIABLES SET "PATHTOAPP=%SYSTEMDRIVE%\INSTALL\PHOTOSHOP" SET "UNINSTKEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall SET "KEYCLSID={236BB7C4-4419-42FD-0407-1E257A25E34D}" :: START THE INSTALL START "" /WAIT MSIEXEC /I "%PATHTOAPP%\ADOBE PHOTOSHOP CS2.MSI" /QN :: ADD YOUR REGISTRY KEYS REG ADD HKLM\SOFTWARE\Adobe\Updater /V Enterprise /T REG_DWORD /D 1 /F >NUL REG ADD %UNINSTKEY%\%KEYCLSID% /V EPIC_REGS_TYPE /T REG_DWORD /D 4 /F >NUL REG ADD %UNINSTKEY%\%KEYCLSID% /V EPIC_REGS_STATE /T REG_DWORD /D 2 /F >NUL REG ADD %UNINSTKEY%\%KEYCLSID% /V EPIC_REGS_LANG /T REG_DWORD /D 0 /F >NUL REG ADD %UNINSTKEY%\%KEYCLSID% /V EPIC_REGS_COUNT /T REG_DWORD /D 0 /F >NUL ENDLOCAL &GOTO :EOF
  13. Point of noteThis is not my script 'modified a bit', in fact the only bit that really bears any resemblence is: <Re-Edit> Here is one way of doing it, which has been simplified and may therefore be easier to understand You can remove the red text after testing if you so wish</Re-Edit>
  14. @ gunsmokingman Yes that's line I told you was wrong, however, as in my example, the label is on a different line to the following commands. @ IcemanND Using nested for loops is not particularly good practice, delayed expansion can also be troublesome when using unknown filenames. Your code will also continue to search all letters in the loop once the matches have already been found. Using the filename without extension however was a good idea, even though for the required output, creating variables and using setlocal wasn't necessary.
  15. Look at line 6 and then tell me why you get the error 'The system canot find the batch label specified - SETVARS'
  16. Not only do all of the scripts, (except for yours), work for me, they do, (with results published to prove it), for jaclaz too!
  17. Well if you have copied and pasted correctly and you have not altered my code, then I suppose it must be. I can say that because as you can see from my posting, it says (IF EXIST %%? (not (IF EXIST " %%?" (
  18. None, the cmd interpreter will see XPIZE xpize XPize xPiZe xpIZE etc. as the same.
  19. It is one already! %CD%
  20. Certainly not before you both refrain from, and apologize for, using foul language.
  21. I guess that its part of explorer /Windows GUI which accesses the drive; so in testing, to prevent it, I usually use('MOUNTVOL^|FIND ":\"^|FIND /V "A:\"')During setup the GUI is not loaded so the floppy drive is not accessed and the script I suggested is fine.
  22. If both files are expected on the same drive then jaclaz' solution will serve you a little better. The only thing that I'm wondering is why Z»C as opposed to C»Z The following version will break out of the loop as soon as the files are found: @ECHO OFF FOR %%? 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 ( CALL :SETVARS %%?:\NTLDR %%?:\boot.ini ||GOTO :ABORT) :ABORT PAUSE &GOTO :EOF :SETVARS IF EXIST %1 (IF EXIST %2 ( ECHO/&ECHO/%1 size is %~z1 bytes&ECHO/%2 size is %~z2 bytes&ECHO/&&EXIT/B 1)) EXIT/B 0What that means is that as soon as boot.ini and NTLDR are found on the same drive it will not continue checking any remaining drives. You can of course still have your drive letters in whichever order you prefer!
  23. My learned friend is correct, that file will not work flawlessly! here is an alternative method for you @ECHO OFF &SETLOCAL ENABLEEXTENSIONS FOR /F %%? IN ('MOUNTVOL^|FIND ":\"') DO (CALL :GETSIZE %%?) ECHO/&ECHO/ ntldr location is %ntldr% ECHO/ boot.ini location is %boot.ini% ECHO/&ECHO/ Size of ntldr is %ntldrz% bytes ECHO/ Size of boot.ini is %boot.iniz% bytes PAUSE &ENDLOCAL &GOTO :EOF :GETSIZE PUSHD %1 2>NUL FOR %%? IN (BOOT.INI NTLDR) DO (IF EXIST %%? ( SET "%%?=%CD:~0,2%" &SET "%%?z=%%~z?")) POPD &GOTO :EOF
  24. I still think that you should be using the syntax I gave KB[0-9]{6}\.exethe 'backslash' escapes the period, (which matches any printable or nonprintable character). Your current implementation should technically match KB123456jexe. I know that filename is not a likely one to come accross however it is still a possibility.
  25. What have you got so far? and will either of these help! KB\d{6}\.exeor KB[0-9]{6}\.exe
×
×
  • Create New...