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. For /R without a path should walk the tree rooted from the current directory. If the file is run from within that directory you will be fine, if you run it from elsewhere or the 'compiler' runs it from a temporary directory, it will walk the wrong path structure. What I would suggest is that if your 'compiler' is unable to handle something as simple as %0 derivatives , then it really doesn't serve much purpose unless you always have control over the environment within which it will be run. The script could be edited/modified to run each update echoing a count to the screen.
  2. I have no idea how the 'compiler' runs your batch file. (I cannot guarantee that it runs the script from its own location). Looking at the screenshot of your chosen 'compiler' it does appear that there is a temporary location in use, so you would need to either hard code the location of the parent of your directory structure or create a unique file there and let the batch search for its location first. (You could then PUSHD to that location instead of %~dp0).
  3. @ECHO OFF ECHO=_%~1|FINDSTR/X "_-123456 _/123456">NUL 2>&1||GOTO Error SETLOCAL ENABLEEXTENSIONS SET "_=" PUSHD %~dp0 FOR /R %%A IN (Windows*-KB*.EXE) DO ( SET _=T ECHO= Installazione di %%~nA in corso... >NUL PING -n 4 127.0.0.1 "%%A" /quiet /norestart) IF NOT DEFINED _ GOTO Error ECHO= ECHO= == Press any key to restart. == >NUL PAUSE SHUTDOWN.EXE /r /t 0 GOTO :EOF :Error ECHO= Error. ECHO= ECHO= Press any key to exit... >NUL PAUSE
  4. A couple of things to mention: You don't need to enable delayed expansion. If for some reason the file is run in the wrong location and there are no hotfixes found, your script would still restart the system As far as your problem goes, I'd suggest that your 'compiler' may not be designed to pass parameters provided to it through to the script.
  5. Not an answer to your last question but, if you use a batch file like this: @ECHO OFF ECHO=_%~1|FINDSTR/X "_-? _/?">NUL 2>&1||GOTO Sorry REM Your scripting starts below here ECHO=Welcome! PAUSE REM Your scripting ends above here GOTO :EOF :Sorry ECHO= Sorry! ECHO= ECHO=Press any key to Exit. PAUSE>NULOnly users entering a parameter of /? or -? will run the script. The idea behind this is that they should be the most obvious switches to run by someone 'switched on' an unknowing user will always get the Sorry message.
  6. I have no idea what the contents of your layout files or which files are available for use by the inf. BTW, since I have only added whitespace to lines containing Winboot.sys, I'd suggest that using a DIRID of 30 for the Boot disk is possibly problematic. Try changing [DestinationDirs] Copy.Boot = 30to [DestinationDirs] Copy.Boot = 24so that it references the System disk.
  7. If you fix the lines as stated above, you can also remove the unnecessary CustomDestination.Section above it and then fix the invalid references, (49001, and 35353), to the custom locations you had created. Program Files\Common could also be changed to %16427% [ProgramFilesDir] HKLM, "%CurrentVersion%", "ProgramFilesDir", "", %16422% [CommonFilesDir] HKLM, "%CurrentVersion%", "CommonFilesDir", "", %16427% [DestinationDirs] Copy.Boot = 30 Copy.Cab = 11, Precopy Copy.Command = 13 Copy.EBD = 13, EBD Copy.GFWin = 10, MsApps\Grphflt Copy.GFOffice = 16427, Micros~1\Grphflt Copy.Help = 18 Copy.HT = 16422, Access~1\Hypert~1 Copy.Inf = 17 Copy.IOSubSys = 12 Copy.Machine = 10 Copy.Media = 10, Media Copy.MSDA = 16427, System\Oledb~1 Copy.Mspaint = 16422, Access~1 Copy.MUI = 11, MUI\%LCID% Copy.System = 11 Copy.System32 = 10, System32\Drivers Copy.Sysbckup = 10, Sysbckup Copy.TC = 16427, Micros~1\TextConv Copy.TEdit = 16427, Micros~1\Triedit Copy.Themes = 16422, Plus! Copy.TViewer = 16427, Tvview~1 Copy.VMM32 = 22 Copy.891711 = 11, KB891711 Copy.918547 = 11, KB918547 Del.Uninstall = 13 Del.Windows = 25There are a few more references to 35353 below this which look like they should read 16427 to match the above. Additionally you appear to have an incomplete line: ; TSHOOT.OCX HKLM,"Software\Microsoft\Internet Explorer\ActiveX Compatibility\{4B106874-DD36-11D0-8B44-00A024DD9EFF}","Compatibility Flags A fixed version of your file is included as an attachment. fixed.zip
  8. This may sound silly but what happens if you change the last of those lines to read: CopyFiles=Copy.Themes,Copy.Mspaint
  9. Try changing the single line to this: CopyFiles=Copy.Boot,Copy.Cab,Copy.Command,Copy.EBD,Copy.GFWin,Copy.GFOffice CopyFiles=Copy.Help,Copy.HT,Copy.Inf,Copy.IOSubSys,Copy.Machine,Copy.Media CopyFiles=Copy.MSDA,Copy.MUI,Copy.System,Copy.System32,Copy.SysBckup,Copy.TC CopyFiles=Copy.TEdit,Copy.TViewer,Copy.VMM32,Copy.891711,Copy.918547 CopyFiles=Copy.themes,Copy.mspaint
  10. Due to the fact you appear to have a large tree structure I've decided to change the script instead of 'fixing' the previous one: @ECHO Off SETLOCAL EnableExtensions DisableDelayedExpansion SET "LISTOF=D:\Scripts\USB_Backup\shadowcopieslist.txt" SET "USB=G:" SET "BRANCH=C:\Program Files\Microsoft DPM\DPM\Volumes\ShadowCopy" SET "BRANCH=%BRANCH%\Non VSS Datasource Writer" (SET RCOPTS=/E /ZB /MIR) (SET RCOPTS=%RCOPTS% /XD "System Volume Information") (SET RCOPTS=%RCOPTS% /XF "*.mp*" "*.avi" "*.mkv" "*.wm*" "*.m4*") (SET RCOPTS=%RCOPTS% /LOG+:"%LOG%" /TEE /NP) SET "DESTIS=%USB%\DPM" FOR /f "UseBackQ Tokens=*" %%# IN ("%LISTOF%") DO ( FOR /f "Tokens=*" %%$ IN ('DIR/B/S/AD "%BRANCH%\%%#"2^>Nul') DO ( CALL :CopyIt %%$ ) ) PAUSE GOTO :Eof :CopyIt ECHO=ROBOCOPY "%*" "%DESTIS%" %RCOPTS%I have not changed anything with your Robocopy command, I'll leave that to you!
  11. Welcome to the Forums. Whilst here be sure to expand your knowledge by looking at more up to date Operating Systems too!
  12. Since the code I provided uses those lines it scans, as you requested, every single directory below your given path and checks each directory name against that listed in your listfile. Are you sure that you didn't actually change something other than the two lines containing variables you hadn't provided me with? (shadowcopieslist.txt, and your USB drive letter)
  13. In a console window, run the following three lines and then take a look at the content of _OUT_PUT.LOG. PUSHD C:\Program Files\Microsoft DPM\DPM\Volumes\ShadowCopy @FOR /d /r %# IN (*) DO @ECHO=%~nx#>>_OUT_PUT.LOG POPD Does the log file provide you with every directory name located below your structure? and is that not what you asked for?
  14. As both jaclaz and CoffeeFiend mentioned earlier, if your systems are Windows Vista or newer then: @(wmic computersystem get pcsystemtype|find "2">nul 2>&1)&&@(call [encryption stuff]) Using the other WMI class mentioned by jaclaz and used earlier by gunsmokingman: @ECHO OFF SETLOCAL ENABLEEXTENSIONS (SET _=) FOR /F "DELIMS={}" %%# IN ( '2^>NUL WMIC SystemEnclosure GET ChassisTypes^|FIND "}"') DO ( FOR %%$ IN (8 9 10 11 12 14 18 21) DO IF %%#==%%$ SET "_=T") IF NOT DEFINED _ GOTO :EOF REM [Encryption stuff here] ECHO=This is a line of text only visible to a 'portable'
  15. This post has been moved out of the HFSLIP Forum because the version of HFSLIP you have used is an 'aftermarket' production not supported by the original developers. You may be better off contacting Mim0, directly with questions regarding their production.
  16. Try something like this: @ECHO off SETLOCAL enableextensions disabledelayedexpansion REM Set the two variables below SET "LISTOF=Path to file with search list" SET "USB=Path to USB drive" SET "BRANCH=C:\Program Files\Microsoft DPM\DPM\Volumes\ShadowCopy" (SET RCOPTS=/E /ZB /MIR) (SET RCOPTS=%RCOPTS% /XD "System Volume Information") (SET RCOPTS=%RCOPTS% /XF "*.mp*" "*.avi" "*.mkv" "*.wm*" "*.m4*") (SET RCOPTS=%RCOPTS% /LOG+:"%LOG%" /TEE /NP) SET "DESTIS=%USB%\DPM" PUSHD %BRANCH% FOR /d /r %%# IN (*) DO ( ECHO=%%~nx# | FINDSTR/ixg:"%LISTOF%" >NUL 2>&1 && (CALL :CopyIt %%#) ) POPD GOTO :Eof :CopyIt ROBOCOPY "%*" "%DESTIS%" %RCOPTS%
  17. Unless you provide a genuine path with genuine directory names the solution you receive will only be generic and not specific. Generic solutions are prone to problems specific to you.
  18. I have removed the links to more than one of your addons, please read the Rules.
  19. Here's a Mediafire archive containing the supplied PDF.
  20. Would you not be better off including links to the actual authors pages of some of the tools you are using, e.g. CabPack and Reg2Inf. Not only does this allow the reader to keep directly up to date with those products, it also allows them to read information on them, such as a requirement of .Net FW 2.0. Then possibly an explanation of what exactly MSCF.sfx is; I'm sure that it couldn't just be a pre hex-edited Microsoft file when you could have provided instruction on how the end user could do that themselves without distributing it.
  21. Summary from Windows XP and DOS 7 (above) They dont appear to be contradictory so why would NT4 2000 have changed in between them
  22. Basically, you should only require to use it when merging files into one. Read more about it, (Notes: 3.).
  23. The Topic is currently subject to approval due to a belief that it may be in breach of the following section of our rules!
  24. Powershell to disable System Restore on C: drive. disable-computerrestore "C:\"
×
×
  • Create New...