Jump to content

Outbreaker

Member
  • Posts

    367
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Luxembourg

Everything posted by Outbreaker

  1. 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
  2. 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
  3. I tried this 2 scripts but if i open the batch file nothing happens but i have now put the Script on to my Win7 laptop to test and there it works i don't get i why it doesn't work on my WinXP PC.
  4. I tested your script also but it does not work no file start ore message.
  5. I set the path to the file and there is also no disk in the floppy drive but if i start the VBScript i get a "No Disk" Error MsgBox Do you have a also a floppy drive artefact in your Computer ?
  6. 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
  7. 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.
  8. HI agan I use the command "%~dp0" in the batch file so that i also get the subdirectory for the UNC path. But i have a problem if i want to go down a folder i normally used "..\" but this unfortunately doesn't work in a UNC path. I couldn't find anything in google for 2 days now
  9. 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 ?
  10. 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 ?
  11. 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.
  12. 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]
  13. HI Im new to this and im looking to copy a file "GuiRunOnce.bat" that is in the I386 folder to the hard disk How can i do this without the us of $OEM$ folder ?
  14. @MSFN SuperB THX this work excellent. I also understandit it now how it works last night i was little bit tired.
  15. 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"
  16. Deleting line numbers wont work because the line numbers can change so it not always 19-24.
  17. This here are the exactly lines (19-24) that i try to remove from a Batch file: ECHO. ECHO Launching program XY... START "" /WAIT "%SystemDrive%\XY.exe" ECHO Deleting file "%SystemDrive%\XY.exe"... DEL /Q "%SystemDrive%\XY.exe"
  18. HI Im stuck again at my batch script i try to delete 3 lines from a text file google was not really helpful does someone here know how to do this ?
  19. Yes but then the batch file must be also in the same folder where the files are. Like in the exemples i want to set a folder where the files are that should be deleted.
  20. 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
×
×
  • Create New...