title: is there script for: REFRESH desktop and explorer (xp pro, to .vbs file)
body: <p>hi,  am a novice with excel vb. with a .vbs file attempt, will probably need a working example thanks.  (trying to get line spacing to work here..)</p>
  
  <p>i have a .vbs file i paste directly to desktop, to toggle setting for hide file name extensions that does work. It does not refresh the desktop and explorer (on the first click of the file), the same as if set it manually (as below). I need help with the refresh portion.</p>
  
  <p>i have an example of the .vbs file using:</p>
  
  <p>MANUAL SETTING: (of hide extension: gets you 1 free refresh of desktop &amp; explorer)</p>
  
  <p>explorer, tools, options, view,  check box for: hide extensions for known file types  (that item auto updates both the desktop &amp; the windows explorer).</p>
  
  <p>i would like to incorporate that into my script.  same basic idea:  my script to a text / .vbs file so i can click in on my desktop  (as a toggle, ie 1 click turns it on, the next  click turns it off;  got that/ it works),  i need to add to it to spawn a refresh same as,  or equivalent for both:  desktop &amp; explorer).</p>
  
  <p>paste the following to a text file  (or equivalent that will make same result):</p>
  
  <pre><code>FileExt = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt"
  
  Set Sh = WScript.CreateObject("WScript.Shell")
  
  St = Sh.RegRead(FileExt)
  
  If St = 1 Then
  
  Sh.RegWrite FileExt, 0, "REG_DWORD"
  
  Else
  
  Sh.RegWrite FileExt, 1, "REG_DWORD"
  
  End If
  
  Sh.SendKeys("{F5}") 
  </code></pre>
  
  <p>rename the text file to: HIDE EXT.vbs  instead of .txt, and pasting it to the desktop.</p>
  
  <p>WHAT NEED:</p>
  
  <p>what i need added to it is the refresh of the desktop &amp; the explorer window(s).  same as when making the setting manually.  the F5 here does not seem to be working on the first time around.  on 2nd click of file, it works to send view to opposite of that for which view "state" is actually in.</p>