Content Type
Profiles
Forums
Events
Everything posted by Yzöwl
-
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, (").
-
adding a reg file with VBS
Yzöwl replied to tulik23's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
@ 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. -
Winrar batch file?
Yzöwl replied to kabucek's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
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. -
Auto-Reboot Into SafeMode on WinXP
Yzöwl replied to TriPPiN's topic in Unattended Windows 2000/XP/2003
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> -
Passing Parameters From Desktop Shortcut To Batch File
Yzöwl replied to itman2000my's topic in Windows Tips 'n' Tweaks
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! -
Using the "DetachedProgam" section in Winnt.sif
Yzöwl replied to MykeV's topic in Unattended Windows 2000/XP/2003
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. -
and the question is?
-
Passing Parameters From Desktop Shortcut To Batch File
Yzöwl replied to itman2000my's topic in Windows Tips 'n' Tweaks
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 -
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.
-
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>
-
@ 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
-
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
-
Expand to file size (%~zI) doesn't work in XP
Yzöwl replied to spacesurfer's topic in Unattended Windows 2000/XP/2003
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> -
Expand to file size (%~zI) doesn't work in XP
Yzöwl replied to spacesurfer's topic in Unattended Windows 2000/XP/2003
@ 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. -
Expand to file size (%~zI) doesn't work in XP
Yzöwl replied to spacesurfer's topic in Unattended Windows 2000/XP/2003
Look at line 6 and then tell me why you get the error 'The system canot find the batch label specified - SETVARS' -
Expand to file size (%~zI) doesn't work in XP
Yzöwl replied to spacesurfer's topic in Unattended Windows 2000/XP/2003
Not only do all of the scripts, (except for yours), work for me, they do, (with results published to prove it), for jaclaz too! -
Expand to file size (%~zI) doesn't work in XP
Yzöwl replied to spacesurfer's topic in Unattended Windows 2000/XP/2003
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 " %%?" ( -
None, the cmd interpreter will see XPIZE xpize XPize xPiZe xpIZE etc. as the same.
-
It is one already! %CD%
-
Certainly not before you both refrain from, and apologize for, using foul language.
-
Expand to file size (%~zI) doesn't work in XP
Yzöwl replied to spacesurfer's topic in Unattended Windows 2000/XP/2003
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. -
Expand to file size (%~zI) doesn't work in XP
Yzöwl replied to spacesurfer's topic in Unattended Windows 2000/XP/2003
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! -
Expand to file size (%~zI) doesn't work in XP
Yzöwl replied to spacesurfer's topic in Unattended Windows 2000/XP/2003
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 -
VbScript RegExp Question
Yzöwl replied to wolfh3art's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
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. -
VbScript RegExp Question
Yzöwl replied to wolfh3art's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
What have you got so far? and will either of these help! KB\d{6}\.exeor KB[0-9]{6}\.exe