Prev | Current Page 441 | Next

John Paul Mueller

"Administering Windows Server 2008 Server Core"

Shell???)
` Create variables to hold the information.
strExtension = ?????? ` File extension that we??™re looking for.
strFileType = ?????? ` Holds the main file type.
strFileOpen = ?????? ` File open command.
strFilePrint = ?????? ` File print command.
strDefaultIcon = ?????? ` Default icon for file type.
` See if the user provided a file extension to look for.
` If not, assign strExtension a default file extension.
if (WScript.Arguments.Length > 0) then
strExtension = WScript.Arguments.Item(0)
else
strExtension = ???.txt???
end if
` Get the file type.
strFileType = WshShell.RegRead(???HKEY_CLASSES_ROOT\??? +_
strExtension + ???\???)
` Use the file type to get the file open and file print
` commands, along with the default icon.
strFileOpen = WshShell.RegRead(???HKEY_CLASSES_ROOT\??? +_
strFileType +_
???\shell\open\command\???)
strFilePrint = WshShell.RegRead(???HKEY_CLASSES_ROOT\??? +_
strFileType +_
???\shell\print\command\???)
strDefaultIcon = WshShell.RegRead(???HKEY_CLASSES_ROOT\??? +_
strFileType +_
???\DefaultIcon\???)
` Display the results.
WshShell.Popup ???File Type:??? + vbTab + vbTab + vbTab + strFileType +_
vbCrLf + ???File Open Command:??? + vbTab + strFileOpen +_
vbCrLf + ???File Print Command:??? + vbTab + vbTab + strFilePrint +_
176 CHAPTER 6 WORKING WITH SCRIPTS
vbCrLf + ???Default Icon:??? + vbTab + vbTab + strDefaultIcon,_
0,_
???RegRead Results???,_
intOK + intInformation
When you run this script, it reads the command line.


Pages:
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453
bilety lotnicze serwery vps wydruki wielkoformatowe klocki lego download print music