• John Littell

    John Littell

    @jlittellpresys-com

    Viewing 15 replies - 1 through 15 (of 160 total)
    Author
    Replies
    • in reply to: Setting the Read-only Property for a Folder of files #1275951

      Thanks to Joe and Mike. You both pointed me in very different directions. Oh, I am using VB 2010 express.
      Mike: You got me to remember the File class and using SetAttributes. After some experimenting I got control of the ReadOnly attributes but for each file only. I then tried to branch out into the Directory and DirectoryInfo classes, but could find no mention of attributes or ReadOnly.

      Joe: Now that was a bit of reading. I think it said repeatedly that setting the directory flag would not set the flags in the included files. But this is not true. In my Windows 7 system, checking the RO flag in the directory properties does turn it on in every included file. And the reverse also works. I did notice that once the file attributes are set (either way), that the directory RO box simply shows a solid filler, which tells me nothing.
      As I need to do this is VB code, I suppose I could Shell to the Attrib command, but that seems awfully clumsy.

      So, as it stands, I can do the basics; that is, loop through every file in the directory and set the file attribute as needed. Or I can use Attrib to set it through the directory. Why would I want to do this? Because I need to issue a My.Computer.FileSystem.DeleteDirectory(…) method. This will fail if any of its contained files is set to read only.

      Any more ideas would be appreciated.

      John

    • in reply to: Sending a keyboard key to Windows #1267729

      Thank you. My imperfect memory was trying to get SetKeys to work.

      John

    • in reply to: Can I pre-define a window size? #1167422

      Hans,
      Thank you for introducing me to an area of Vista I did not know about. This allows you to change the default templates WE assigns to each folder displayed, but I could not see any way to change the size of one of the default windows. Any other ideas?

      Thanks,

      John Littell

    • in reply to: Can I pre-define a window size? #1167032

      Now that I’ve created all this confusion, it’s about time I jumped back in and asked a question that makes sense. Forget, of course, all mention of Firefox. Were talking plain Windows Explorer here. Re-asking the question, we now get…

      I have a medium size directory tree that I use Windows Explorer to display several dozen times a day. The window size that it defaults to is bit too small to show the entire directory structure. I have to manually increase the size (drag the borders) every time. Is there any way I can direct WE to use a larger initial window?

      Unquote. Again, I apologize for temporarily having the intelligence of a fence post.

      John Littell

    • in reply to: Rename a File (VB 2008 Express Edition) #1122817

      Danny D.
      Sorry for the delayed response. The Lounge seemed to be down yesterday.

      Does your answer mean that the VB/VBA category now applies only to version 6 and earlier?

      John

    • in reply to: Rename a File (VB 2008 Express Edition) #1122622

      My thanks go to all responders. It is so simple when you know.

      John

      PS. What determines this a .net question, not a VB question?

    • in reply to: VB Threading (VB 2008 Express Edition) #1117176

      Thanks, I will dig into them.

      John

    • in reply to: To Generate My Computer (Vista ) #1115803

      DavdA,
      Displaying or not displaying all icons (controlled by the desktop’s View setting) was never an issue. I simply did not know how to turn on the Computer shortcut icon. Of the two solutions described for me earlier in this conversion (Start, Computer, Show on Desktop. and Desktop Personalize, Change desktop Icons, select Computer check box). Both are equally valid, although the latter technique has more power. I shall try to remember both techniques. I thank you again for the information.
      John

    • in reply to: To Generate My Computer (Vista ) #1115758

      Now this idiot know of three features of Vista I’d never seen before. (And I’ve been using Windows since Version 1; I’ve been using computers since the early 1960s.)

      Thank you one and all.

      John

    • in reply to: To Generate My Computer (Vista ) #1115702

      Thank you. I think I tried everything but that.

      John

    • Dave, thanks for sticking with me.

      The problem has gone away, but it has not been solved. First some detailed responses… (In the following shutdown.exe tests, NG stands for the shutdown.exe failure described above, ie. the “Shutting down” screen freezes up (the little circle stops spinning) after a few seconds. I then achieve actual power off by holding in the power on key.)

      -f, according to my notes copied from some web site long ago, stands for “force non-closing drivers off”. Because you questioned it, I tried the command without -f, NG

      I tried the command with 00 instead of just 0, NG

      Following the script you sent me, I tried substituting /s /t 00 for -s -t 00, NG

      Following up on dodgy USB devices mentioned above, I unplugged all USB devices, except the keyboard. Shutdown worked!

      I starting putting them back one at a time to find the culpret, and while both my UPS battery backup and my external hard disk initially failed (NG), all the USB devices are now connected (USB, hard disk, DSL modem, and printer) and shutdown has worked several times. In the process of trying devices, I successfully used every USB port available, so it looks like I have one or more poor connections. I guess the solutions has to be jiggle every connection.

      Thanks again for your support,

      John Littell

    • Silly me, I forgot the switches. OK, this time I executed “shutdown.exe -s -f -t 0” the following three ways:
      1. By typing it into the Run box.
      2. By executing a shortcut pointing to the .exe file.
      3. By executing a .bat file containing the .exe file.

      The results were the same in all cases:
      1. a DOS window flashed.
      2. Shut down started – the gadgets, etc. were cleared.
      3. The “Shutting down…” screen appeared, but after a few seconds froze; ie. the spinning wheel stopped spinning.

      As I said before, this seemed to start failing about the time I upgraded from Vista Home Premium to Vista Ultra but I absolutely cannot be sure. And, Google search results on ‘Vista” and “shutdown.exe” show time and time again that the two work together.

      John

    • Dave and Paul,
      In answer to your questions:
      1. I created a shortcut to c:windowssystem32shutdown.exe. It did nothing (a DOS window flashed briefly, then nothing).
      2. I typed shutdown.exe into the Run window. Same as above.
      I’m beginning to have a complex.

      And thanks to the unsigned personage for the Vista administrator information. It is much appreciated.

      John

    • Dave,
      The copy of shutdown.exe I am using is in C:WindowsSystem32 , its size is 29 KB and the Modified date is 1/20/2008 (not that that means much). I have no recollection as to whether it came pre-loaded into Vista (which was purchased preloaded on my AlienWare PC nearly a year earlier), or whether I loaded it is from somewhere else. I can say that I did not transfer it over from my XP system as that program’s size is 19 KB with a Modefied date of 8/4/2004. And I believe I’m running SP1 because I can remember installing it; I have forgotten, however, where in Vista to look to verify this. (Finally, remember that psshutdown.exe (203 KB) that I downloaded earlier in this conversaion does not run either. After a brief flash of a DOS window, it does nothing.)

      Thanks for your time with my problem. John

    • Thank you for your suggestions. But I still cannot get shutdown.exe to work. It worked fine for the past year, and then it stopped. (It freezes in the “Shutting down” screen.) I do specify the run switches “Shutdown.exe -s -f -f 0”. I have only one user defined so it defaults to administrator. I realize that there are administrator modes and there are administrator modes. If I have suddenly switched to administrator second class, I don’t know why. In a batch file, how can I force administrator first chass?

      Another thought: It stopped working about the time I upgraded from Windows Home to Windows Ultra. (Why? Because it was there?) From the Web research I’ve done, it should’t matter. Any other suggestions would be appreciated. (In response to an earlier suggestion, I do not know how to convert gadgets to run in a batch file.)

      John

    Viewing 15 replies - 1 through 15 (of 160 total)