Content Type
Profiles
Forums
Events
Everything posted by Yzöwl
-
Can you start the script from the command line using your folder as a parameter? MyBatch.cmd C:\æøå @ECHO OFF & SETLOCAL ENABLEEXTENSIONS FOR /F "TOKENS=*" %%# IN ("%*") DO (SET _=%%~#) IF EXIST "%_%\START.EXE" "%_%\START.EXE" If that is not an option, another is to use 'Terminal' font in your batch script editor. It may look like this in another font/editor @ECHO OFF & SETLOCAL ENABLEEXTENSIONS IF EXIST "C:\‘›†\START.EXE" "C:\‘›†\START.EXE"but it should be correct!
-
The command I gave you which runs the batch file is seen to have worked and the batch content I provided is seen to have worked. Since the folder structure you provided contains the tag file required I can see only two likely problems, your winnt.sif or your PostInstall.cmd. If you are convinced that your batch script, (the content of which you have hidden from us), is okay then your issue is with the .sif file. However since you reported the script not running from my command earlier, and your folder structure clearly shows it should with a working command line, I am not ruling out the script as the most likely problem. In order to find a solution, attach both files exactly as they are to be examined, otherwise you are on your own.
-
Yes, but run it from a command prompt not the run box. FOR /F %# IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO IF EXIST %#PostInstall.cmd CALL %#PostInstall.cmd recreate the original set-up, replacing only the content of the batch file. This should isolate the problem area to either your batch file or the implementation of the set-up.
-
What happens if you change the content of PostInstall.cmd temporarily to: @ECHO OFF TITLE Testing Script ECHO=%%CDROM%%=%~d0 ECHO=Delaying tactics employed PING -n 11 127.0.0.1 1>NUL BTW, which part of exact contents and no editing did you not understand?
-
Now the exact contents, (no editing), of your PostInstall.cmd.
-
Can you provide a directory listing? Type the following into a command prompt and copy/paste the output into your response. for %# in (%systemdrive% X:) do @(echo/---%#---&dir/b/a/og %#)Replace X with the drive letter for your inserted unattended media
-
Because they are both incorrect commands, one of them I've already told you about twice! Really you should concentrate on learning how to correctly create single boot install media before you take the multi boot route.
-
I'll trust your interpretation and move the post to the Multi-Boot Forum. (I'll remind the OP however that the original script they posted is wrong and that the cmdlines.txt command is too!)
-
I've never been much of a fan of cryptic crosswords so please try to ask a properly formed question, (without posting any more graphics)! We have no idea what the contents of TEST.CMD are, (I'm assuming that the previous code you posted was INSTALL.CMD). We still do not know what help you are requiring, but I'll tell you that CMDLINES.TXT is unlikely to know what %CDROM% means.
-
VBS question
Yzöwl replied to kyler123's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Posting Rules 2.c Requesting help with academic material, such as assignments, is not permitted on MSFN. Receiving such help is often viewed as plagiarism in many schools, and therefore cannot be allowed. This is for your own protection in your academic career. Topic Closed -
What help are you requiring? Posting a screenshot and ill thought out batch file doesn't tell us anything. Here's the script again, changed a little. @CMDOW @ /HID SETLOCAL (SET _SI=%SYSTEMDRIVE%\install) START "" /WAIT "%_SI%\Applications\Setup_1_32bit.exe" -install -force START "" /WAIT "%_SI%\Applications\Setup_2_32bit.exe" -install -force START "" /WAIT "%_SI%\Applications\Setup_4.exe" START "" /WAIT "%_SI%\Applications\Setup_6.exe" /sAll /norestart START "" /WAIT "%_SI%\Applications\Setup_7.exe" /S /noreboot START "" /WAIT "%_SI%\Applications\Setup_8.exe" -ms START "" /WAIT "%_SI%\Applications\Setup_9.exe" /silent /install START "" /WAIT "%_SI%\Applications\Setup_10.exe" START "" /WAIT "%_SI%\Applications\Setup_11.exe" /SILENT START "" /WAIT "%_SI%\Applications\Setup_12.exe" START "" /WAIT "%_SI%\Applications\Setup_13.exe" /SILENT START "" /WAIT "%_SI%\Applications\Setup_14.exe" /S /install=SFQDRA START "" /WAIT "%_SI%\Applications\Setup_15_32bit.exe" /s START "" /WAIT "%_SI%\Applications\Setup_16.exe" /s START "" /WAIT "%_SI%\windows\Setup_1.exe" /passive /no-default /closeprograms /norestart START "" /WAIT "%_SI%\windows\Setup_2_32bit.exe" /s REBOOT=Suppress START "" /WAIT "%_SI%\windows\Setup_3.exe" /q:a /c:"install.exe /qb" START "" /WAIT "%_SI%\windows\Setup_3.exe" /passive /norestart START "" /WAIT "%_SI%\windows\Setup_6.exe" /passive /norestart START "" /WAIT "%_SI%\windows\Setup_7_32bit.exe" /Q START "" /WAIT "%_SI%\windows\Setup_8_32bit.exe" /Q START "" /WAIT "%_SI%\windows\Setup_9_32bit.exe" /q /norestart START "" /WAIT "%_SI%\windows\Setup_10.exe" /q /norestart START "" /WAIT "%_SI%\windows\Setup_11.exe" /q /norestart START "" /WAIT "%_SI%\windows\Setup_12.exe" /q /norestart START "" /WAIT "%_SI%\windows\Setup_13.exe" /q /norestart START "" /WAIT "%_SI%\windows\Setup_14.exe" /q /norestart RD/S/Q "%_SI%" (SET _HF=%SYSTEMROOT%\SYSTEM32\DRIVERS\ETC\HOSTS) ATTRIB -R "%_HF%" FOR %%a IN (127.0.0.1 acdid.acdsystems.com) DO ( FINDSTR/IV "^#" "%_HF%"|FIND /I "%%a"||(>>"%_HF%" ECHO=127.0.0.1 %%a) ) SHUTDOWN.EXE -r -f -t 3 -c "Windows XP will restart in 3 seconds..."
-
Welcome to MSFN, we look forward to your contribution.
-
I know that the question has been well and truly answered, but I had a few minutes to spare and decided to play around. Here is the resulting script, it uses ideas from that which I've seen above. @echo off & setlocal enableextensions enabledelayedexpansion (set _t=m:\pathto\textfile.txt) & (set _s=unbound) set "_u=!_s!_disks" & set "_z=!_u!_with_size" & set "!_u!=0" for /f "delims=:" %%f in ('findstr/nil "!_s!" "%_t%"') do ( set "_=%%f" & set/a "!_u!+=1" & set/a "_-=1" for /f "tokens=3 delims=: " %%c in ( 'findstr/n .* "%_t%"^|findstr "^^!_!:"') do ( if not defined !_z!_%%c (set "!_z!_%%c=1") else (set/a "!_z!_%%c+=1")) set "_=") for /f %%a in ('set %_u%') do set "_=%%a" & echo=!_:_= !The end user needs only to set the two variables on line two, i.e. the text file (M:\PathTo\TextFile.txt), the drive state (unbound | enabled) Please bear in mind that this script is not intended as a better solution than what has gone before, it was done purely for the purpose of interest and because I'm back on a Windows PC today.
-
read dir from text
Yzöwl replied to sweept's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
If you exclude -hidden directories then it will not see the hidden Default User directory. -
The command is typing the content of a given parameter, the parameter is intended to be your .txt file. drive:\path\name.extension The following are two methods of running the batch file with the given parameter: drag and drop the .txt file onto the batch file enter the following into a command prompt X:\pathto\batchfile.cmd M:\pathto\textfile.txt Alternatively replace: FOR /F "tokens=1,2 delims=:" %%A IN ('TYPE "%~dpnx1"') DO (with FOR /F "usebackq tokens=1-2 delims=:" %%A IN ("M:\pathto\textfile.txt") DO (
-
Bear in mind that we'd need to be talking NTFS for the timestamps to be 'touched' on modification of its content, (DOS suggests pre-NTFS). If we knew more about the Operating System and what exactly these random directories were there may be a more appropriate solution. I'm not keen on trusting a solution to remove all except one. Are these directories modified on a particular frequency?
-
Binary Data Compare Batch - [fc]
Yzöwl replied to AceInfinity's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Just bear something in mind if I wanted to verify that myfile.dll was not in some way altered, in order to check it against a known good myfile.dll using your script they would both need to be in the same directory to drag and drop them. As you know they could not both be in the same directory because they have the same name. It would seem crazy to take one or the other of them, rename it and then move its directory location along side the other one in order to then drag and drop it onto a batch file! -
Folder/File auditing
Yzöwl replied to sentinel1705's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Here's a 'batch' script I've thrown together possibly a little too quickly (I have been unable to test this as today I'm logged into a Linux Operating System): @ECHO OFF SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION (SET PD=D:\TSProfiles) (SET PF=profile.ini) IF /I "%CD%" NEQ "%PD%" ( SET "_=T" 2>NUL PUSHD %PD%||( ECHO=Cannot find profile directory %PD% >NUL PING -n 6 127.0.0.1 ) ) FOR /D %%# IN (*) DO CALL :SON %%# IF DEFINED $ ( IF EXIST Badfile.txt ( DEL Badfile.txt ) IF NOT EXIST _n$.txt ( REN _b$.txt Badfile.txt ) ELSE ( IF NOT EXIST _b$.txt ( REN _n$.txt Badfile.txt ) ELSE ( >NUL COPY _n$.txt + _b$.txt Badfile.txt DEL _n$.txt _b$.txt ) ) ) IF DEFINED _ POPD GOTO :EOF :SON SET "UN=%*" PUSHD %UN% FOR /F "TOKENS=*" %%# IN ('2^>NUL DIR/B/S %PF%') DO ( SET "FP=%%#" CALL SET "LP=%%FP:%PD%\=%%" ) POPD IF NOT DEFINED FP ( SET "$=T" IF NOT EXIST _n$.txt ( >_n$.txt ( ECHO=No profile.ini found in the following directories: ECHO= ) ) >>_n$.txt ECHO= %UN% ) ELSE ( FIND /I "%UN%"<"%FP%">NUL 2>&1||( SET "$=T" IF NOT EXIST _b$.txt ( >_b$.txt ( ECHO= ECHO=Profile mismatch found in the following files: ECHO= ) ) >>_b$.txt ECHO= %LP% ) ) FOR %%# IN (UN FP LP) DO SET "%%#="It looks a little long, but that's the price I paid for trying to have a neater looking output file. -
If you create a directory, SCRIPTS, in for instance, YourCD:\SUPPORT\TOOLS you can place MyScript.cmd inside it and run something like this from winnt.sif: [GuiRunOnce] DetachedProgram = CMD.EXE Arguments = "/Q /C FOR /F %# IN ('%SYSTEMROOT%\SYSTEM32\MOUNTVOL.EXE^|FINDSTR [C-Z]:\\') DO IF EXIST %#WIN51 CALL %#SUPPORT\TOOLS\SCRIPTS\MyScript.cmd"The above is three lines in total. That should run the script from your CDROM meaning that all commands within that script can be designed to be local to the CDROM e.g. %~d0
-
It quite clearly shows you on the two enlargeable images within the eBay description! http://www.r3cube.com/A-Ric/regan/usb-ttl-cable-1.JPG http://www.r3cube.com/A-Ric/regan/usb-ttl-cable-2.JPG
-
Folder/File auditing
Yzöwl replied to sentinel1705's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Does TSProfiles contain only directories named with UserNames? Is it likely that UserNames will be found elsewhere within the .ini file or that more than one UserName may appear in the same file? Is the script being run locally/per machine or is this intended to be ran from a Network? Which Operating System(s) is this aimed at?