Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Automate Folder Options?
#1
Solved: 10 Years, 9 Months ago
Hi,

Can anyone help me to solve he following problem?

-> I have developed many scripts and some of them requires to hide the extensions of files (Which is done via Tools->Folder Options->View) and in some it should not be hidden.

Every time to run these scripts I have to manually set these options.

Can this be automated without using VBscript?

I do not wan't to use UI approach i.e, adding objects in 'OR'; since this is the pre requsite of my script it should be done without opening any window.
Reply
#2
Solved: 10 Years, 9 Months ago
Hi,
I have got the solution to this problem.
The below code does the job.. Smile



Code:
Dim objShell, RegLocate
Set objShell = CreateObject("WScript.Shell")
RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt"
objShell.RegWrite RegLocate,"0","REG_DWORD"
Set objShell = nothing

Use "0" to unhide extensions and "1" to Hide them.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Executing via create "RES"xx folder? nishitd 0 1,106 03-07-2018, 01:09 AM
Last Post: nishitd
  code for validation to create a sub folder smiley 0 1,430 10-19-2016, 10:08 PM
Last Post: smiley
  [UFT] Close opened folder robertosalemi 1 3,152 02-10-2016, 07:06 PM
Last Post: robertosalemi
  Run scripts from folder badri 1 2,636 11-26-2014, 06:18 PM
Last Post: vinod123
  Folder dineshreddymca 0 2,164 03-08-2013, 09:50 AM
Last Post: dineshreddymca

Forum Jump:


Users browsing this thread: 1 Guest(s)