Content Type
Profiles
Forums
Events
Everything posted by Outbreaker
-
THX the script works now. I used the GOTO command a lots in my 4 batch file but i thought the :EOF was the same as the quit command The last script that i was testing was this one here it works the same as the VBScript only problem is that it has a little bug it wont give out the driver letter. And is it also possible to do it that this batch script searches also in Fixed (Hard disk drives) and not only in the CD-ROM drives ? This Script would be a good one to avoid the No Disk popup error on drives like the Floppy drive. @ECHO OFF FOR /F "tokens=1,2 delims=\" %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO ( FOR /F "tokens=1,* delims=-" %%B IN ('fsutil fsinfo drivetype %%A^|FIND /I "CD-ROM"') do ( ECHO Checking drive %%B ... IF EXIST "%%B\OEM\RunOnce\Auto Setup.bat" CALL "%%B\OEM\RunOnce\Auto Setup.bat"&GOTO :EOF ) ) ECHO \OEM\RunOnce\Auto Setup.bat NOT FOUND PAUSE
-
I found out on how to include in the VBScript so that the Hard disk drive will be also searched ny simply replacing this line in the code: FORM -> If Obj.IsReady And Obj.DriveType = 4 Then TO -> If Obj.IsReady And Obj.DriveType = 2 or Obj.DriveType = 4 Then Now the VBScript will search CD/DVD-ROM disk drives and Hard disk drives 0 = Unknown / 1 = Removable / 2 = Fixed / 3 = Network / 4 = CD-ROM / 5 = RAM Disk This Batch script works also good only problem i have is that if i put this code in a batch file then everything that is under this script causes a code conflict because it get also called into the Script by the :SUB
-
I tested it but i get always a drive A: error is there no workaround for this i think this also happens to other drives like Card Readers or is it olny the drive A that makes this problem ? The olny way i found that could work is this here hop someone can make a script with the option 2 and 4 or do even a better script http://www.devguru.com/technologies/vbscript/quickref/drive_drivetype.html
-
Ok after testing all this script i have some questions How can i do it so the script will also search in the Harddisk drives and USB flash drives ? Is there also a batch script that can check like the VBScript if it can read on the driver and then searches for the file so i will get no popup errors on Card Readers and ohter drives.
-
This script looks better then my noob script ^_^ but i have a question to understand this script better how it works. I played little bit around and change [C-Z] to [A-Z] i didn't get this "No Disk" error on the Floppy driver but if i change it to [A-B] i get the error that's what i don't get [A-Z] and [A-B] should have the same effect or not O_o ?
-
HI I can't find any infos about this 2 folders some people say is save to remove but for what are this folders exactly ?
-
HI My little script to finde a file on the CD-ROMs IF EXIST "D:\OEM\RunOnce\Auto Setup.bat" set CDROM=D: IF EXIST "E:\OEM\RunOnce\Auto Setup.bat" set CDROM=E: IF EXIST "F:\OEM\RunOnce\Auto Setup.bat" set CDROM=F: IF EXIST "G:\OEM\RunOnce\Auto Setup.bat" set CDROM=G: ... IF EXIST "Z:\OEM\RunOnce\Auto Setup.bat" set CDROM=Z: START "" /WAIT "%CDROM%\OEM\RunOnce\Auto Setup.bat" But how can i do if the file gets not found that it will write a ECHO message like put the CD in and press enter to try agan.
-
How to copy a file from the CD to the hard disk.
Outbreaker replied to Outbreaker's topic in Unattended Windows 2000/XP/2003
Me problem is i don't know where i must put the entry in the TXTSETUP.SIF or DOSNET.INF [EDIT] I have now fixed my problem i found another way to fix my problem. [/EDIT] -
I try to do a batch file that searches for this text in a file and if the text exists in there then it should be removed. I like also to do this without an extra .exe if it doesn't work in Batch then a VBScript would do the jop also. ECHO. ECHO Launching program XY... START "" /WAIT "%SystemDrive%\XY.exe" ECHO Deleting file "%SystemDrive%\XY.exe"... DEL /Q "%SystemDrive%\XY.exe"
-
HI Is it possible to only delete same files in a folder with only one command line. Exemple DEL /Q "C:\test\folder\" file1.inf, file2.gif, file3.sys ... Or: DEL /Q "C:\test\folder\" file1.inf file2.gif file3.sy ...... Or: DEL /Q "C:\test\folder\" "a_list_of_filenames_for_deleting.txt" I couldn't not find anything in goolge