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. Yzöwl

    Hey

    Welcome to MSFN Forum Membership and all that it brings! I've been in this Forum for quite a while myself
  2. Welcome to the MSFN Forums. We'd be nothing without our membership, thank you for joining!
  3. Thanks for taking this one MHz, we don't see much of you these days especially in the programming forum!
  4. It is your Removable Drive which therefore isn't working properly, not my code! which brings me full circle back to this! Your refusal to do so doesn't really hold water, it's just as quick and simple to do this as to add the install folder in the first place.In any case, if you still wished to continue to just ignore the CD-ROM querying you only need to replace "Removable Drive" with /v "CD-ROM" in my script.
  5. Try this attached version as copied/pasted by me with your included Pause! GetUsbKey.zip
  6. Of course my code works!It has worked flawlessly on hundreds of systems for many years now.
  7. If you're happy to use FSUTIL which requires Admin status to run, then you could improve on Scr1ptW1zard's example still further. Since the task is not to ignore the CD-ROM but to find the USB Drive, then this should do fine: @Echo off&Setlocal enableextensions For /f %%# In ('Mountvol^|Findstr [d-z]:\\') Do ( Fsutil fsinfo drivetype %%#|Find "Removable Drive">Nul&&( If Exist %%#Install Set "ThumbDrv=%%~d#")) If defined ThumbDrv Echo:%%ThumbDrv%%=%ThumbDrv%
  8. I'd like to provide a comment rather than a direct solution on this occasion. I'm astonished how often this kind of question arises, I could understand to a degree when using CD-ROMs but not with removable drives. All you need to do is create a Volume/Label Name for your removable drives, any script can then quickly check for that name as opposed to using a unique file/folder placed on its root. Just a quick VBS example, it doesn't directly answer your question but could if required be altered to run from a batch file: strVolName = "mythumb" Set colDrives = CreateObject("Scripting.FileSystemObject").Drives For Each drive In colDrives If drive.isReady Then If StrComp(drive.VolumeName, strVolName, 1) = 0 Then WScript.echo drive.VolumeName & " is drive letter " & drive.Path End If End If NextChange the content of the quotes on the first line (case insensitive) to your drive volume name to test it! The noticeable thing for your particular problem is that it checks to see if the drive is ready first, thus negating the not ready messages your currently getting.
  9. Did you read this first?
  10. The only reason I can see for the missing lines is that SISRAID4.inf is UNICODE (UTF-16LE-BOM) and the others are probably ASCII (CP1252).This may also be part of the cause of the errors reported by Haudy. I have found many problems in the past attempting to work with unicode inf files! <Edit> Because I'm a nice guy, I've re-hashed the script. The reason being that my previous attempt had used findstr which doesn't work with UNICODE. Because it was a relatively simple fix, I decided to add a crude duplicate check in the routine too! It's still not working without an odd error to console and certainly hasn't undergone any extensive tests but give it a shot and see if it produces workable results! </Edit> <Edit2> I stated earlier in the thread that both Command Scripts could be improved, therefore here's a re-write of the 'other one' @Echo off&Cls If %1' EQU ' Goto INFO For %%# In (%1) Do Echo:%%~$PATH:# Goto :Eof :INFO Echo: Checks to see if a file is located within the system path: Echo: %~n0 %%1 Echo: where %%1 is the file name to check for.&Echo:&Pause </Edit2> HwIDs.zip
  11. answers: The CLS is there in order to highlight any error message. I prefer, and it is considered good practice, to see Error messages echoed to the top of the console window. The pause is used in order to keep the window open so that all users can read any output. You may be working directly in the console but most batch files are invoked either directly in the GUI or via another process meaning without the pause the window will close and any important messages missed. Both of the above are only problems to you because of the way you work and my batch was created for general use with little or no input from yourself as to the full requirements, just some links you expected me to read through in order to help you. I dont like echoing pointless information to the screen, some infs may only have a couple of lines and quickly echoing their names faster than they can be read serves no purpose whatsoever to me. You are told that the process has begun, and informed when it ends. I can see no reason to list the files being parsed during that processing. This is also one of the reasons for both the CLS and PAUSE you didn't like earlier. Not only does it appear that this is a old unmentioned problem, it was also not part of the original request. It is possible code the removal of duplicates in a batch file, however this file is already using an inappropriate scripting language for the task at hand. As you should be aware, working with output containing poison characters is extremely tricky as it is. To further parse it and check for duplicates is not something I intend to do. I would therefore suggest you use an appropriate commandline utility created specifically for this purpose. This looks like STDERR output to me, it certainly isn't complete lines being missed. I will take a look at it, but I have no intention of recreating a full working environment using all possible infs in order to test. My test bed was to invoke the batch file using, HwIDs C:\WINDOWS\inf "C:\Documents and Settings\Administrator\HwIDs.log"; which is a relatively large directory too and there were no errors at all on a Windows XP System. I will look to see if I can include an STDERR redirection, but if that doesn't work then it must be your infs which contain something which I cannot see. I also note from your output that all of your directories are enclosed in double quotes and don't include PCI/VEN, since they aren't in my output files then the problem is occurring before the end of the script. I would strongly suggest that unless you really know what you're doing, then DO NOT attempt to make changes to the main code and expect it to work! <Edit> I've included a new version which redirects some more STDERR, you can see if it helps with your console output problem. </Edit> <Edit2> Attachment removed due to updated version below. </Edit2>
  12. Attached is and archive containing my uninformed attempt at something which I hope does as you wished! Just run it first without parameters for the INFO or read it below:
  13. From what I can see there are improvements which can be made, to both Windows NT Command Scripts, but without a fuller explanation of what is required, I cannot effectively update it. I have no idea what any of the input inf files may contain which is/isn't required in order to attempt to bypass SED or any other stream editor. I would also need to know exactly what the TRAVERSAL section is intended to do, with real examples.
  14. Please read this before posting another topic!
  15. @ zeezam - To whom are you replying? Your response doesn't appear to follow on from any other here!
  16. If you have a reason, (question perhaps), for posting here please let us know what it is. This should work is not a question it is a statement; adding right to the end makes it a question but a lazy one. We are not here to save you time by systematically fixing any errors and therefore save you doing the work, creating these things is a trial and error learning experience. Please try the file as part of a test install in a virtual machine. If something doesn't work search the site looking for that specific problem aspplication; if you have no luck with that then post back here with the respective lines and someone may be able to help.
  17. Is there a particular reason why you've chosen to argue about this? You appear to use your file manager tool with only a two pane system as opposed to the majority of Microsoft Windows users and as a result find the switch pointless. What you therefore mean to say is, 'Due to the way in which I use my PC, the /k switch is irrelevant'. Microsoft creates the same registry key as do the majority of tweaking websites. The method they employ works for their file explorer, in either pane and also in the third party file managers which utilise the same registry keys. For the majority of Microsoft Windows users, Microsoft, MSFN, a massive number of tweaking websites and more importantly me, recommend a flawless method for general use. If you'd like to champion some of the 'several implementations' you've come into contact with, I'm sure that I and many of our members would be only to pleased to try them and, as you did, comment accordingly.
  18. Surely your thinking is wrong, the only method working in both panes is the most useful one and that is one using the /k switch. The without switch method your touting is only useful to users working with a left tree pane which isn't often the case. Even the cmdhere.inf file as provided by Microsoft in many of their resource kits uses the /k switch!
  19. This is how I'd do it: @Echo off >C:\maplist.txt Type Nul Pushd C:\Users\User1\Documents\Backup Files\Halo\Halo CE Maps For /f "delims=" %%# In ('dir/b/s/a-d') Do >>C:\maplist.txt Echo:%%~n#Write an empty output file first, then perform the commands. You'll notice I've used -d to select only files. This is because removing extensions from files and directories you'd be unable to differentiate which was which in your output file.
  20. Sorry but the /k switch is needed. Yes, contrary to popular belief, the window will stay open; but the command will fail. What you'll actually get is the parent of the directory you right-clicked on not the directory itself!
  21. If you mean the commands as presented here, then I'd suggest it's wrong and should read: @="CMD /k cd \"%1\""Basically the /w switch should be a /k switch However, I think you'd possibly find this better: @=hex(2):25,00,43,00,4f,00,4d,00,53,00,50,00,45,00,43,00,25,00,20,00,2f,00,6b,\ 00,20,00,70,00,75,00,73,00,68,00,64,00,20,00,25,00,4c,00,00,00
  22. I'm still seeing spaces!!!
  23. Guess what? I bet you knew I was going to say this, but.… Did the working ones have spaces in their paths?
  24. Would it have something to do with using unquoted destination directories containing spaces?
  25. I don't want to sound rude, but is there a particular reason why you think that the first port of call for questions regarding RyanVM's products would be here as opposed to his own forums? As for 'more applications' please try to learn to post topics on them in this Application Installs Forum!
×
×
  • Create New...