Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - en-us names for ShellApp.GetDetailsOf columns, plz

Reply
 
Old 10-17-2009   #1 (permalink)
Alexander Mueller


 
 

en-us names for ShellApp.GetDetailsOf columns, plz

Hi

The following script lists the names of detail
identifiers as returned by ShellApp.GetDetailsOf
for the MyVideo or MyDocuments Shell folder.

Since Shell automation returns the names in
localized manner, e.g. I get German names on my
German XP machine, I would like to ask, if s.o.
could be as kind as to run the script on his/her
English Windows machine, pipe the output to file
and copy the file's content into a reply to
this post


//------ GetDetailsNames.js
var sh = new ActiveXObject("Shell.Application");
var CSIDL_PERSONAL = 0x0005; // My Documents
var CSIDL_MYVIDEO = 0x000e; // "My Videos" folder

var ns = null;
if (null == (ns = GetFolder(CSIDL_MYVIDEO)))
if (null == (ns = GetFolder(CSIDL_PERSONAL)))
WSH.Quit();

WSH.Echo("Folder:", ns.Self.Path);
WSH.Echo("ID => DETAIL-NAME");
for (var i = 0; i < 100; i++) {
try {
var name = ns.GetDetailsOf(null, i);
if (typeof name == "string" && name.length > 0)
WSH.Echo( i, i <10 ? " ":"" ,"=>", name)
}
catch(ex) {
WSH.Echo(i, ex.number, ex.description)
}
};

function GetFolder(id) {
try {
return sh.Namespace(id);
}
catch(ex) {
return null;
}
}
//------ END GetDetailsNames.js

Btw you can redirect the output with the cmd-batch file
below


Thx very much for your help,
sorry for crossposting,
sorry for posting JS in m.p.s.vbscript,
Alex



//------ pipeNames.cmd
REM make sure pipeNames.cmd and GetDetailsNames.js
REM are locate din the same folder and that this folder is
REM is the active Directory of the CMD-prompt while running
REM this cmd-script

cmd /c cscript //NOLOGO .\GetDetailsNames.js > .\GetDetailsNames.txt


//------ END pipeNames.cmd

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Same Columns EVERYWHERE!!! Vista file management
explorer columns Vista General
getDetailsOf method does not work VB Script
Specified Columns For Different Folders Live Mail
file names and folder names have been changed into some values automatically Vista file management


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46