Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: ShortCutInfo Return Empty Blank Target Path
************************************************************ *** Debug Initialized *** ============================== Mon 5/10/2010 10:49:40 AM WinBatch 32 2009C WIL DLL 6.09cic O:\WINBATCH\Routines\Setup.exe Windows platform: NT, version: 5.1, build: 2600 (Service Pack 3) ErrorMode: @CANCEL ============================== rpth = "\\main\dummy\" (16) VALUE STRING => "\\main\dummy\" rslt = WinMetrics(-7) (16) VALUE INT => 0 Select rslt (16) CASE TRUE==>0 msk = "R*32.*" (16) VALUE STRING => "R*32.*" Break (16) END OPERATOR dirlst = DirItemize(Strcat(rpth,msk)) (16) VALUE UNICODE => R2011Networkx32 R2011Standalonex32 RMEP2011Networkx32 RMEP2011Standalonex32 dfldr = AskItemList("Deployment Folders",dirlst,@TAB,@SORTED,@SINGLE,@TRUE) (4469) VALUE UNICODE => R2011Standalonex32 lnkfil = Strcat(rpth,dfldr,"\",dfldr,".lnk") (4469) VALUE UNICODE => \\main\dummy\R2011Standalonex32\R2011Standalonex32.lnk lst = ShortcutInfo(lnkfil) (4516) VALUE STRING => " /qb /I \\Main\dummy\R2011Standalonex32\AdminImage\R2011Standalonex32.ini \\Main\dummy\R2011Standalonex32\AdminImage 2 0" exit (4516) VALUE INT => 0 --- Normal termination --- ;;;END OF JOB;;;
#DefineFunction udfShortCutInfo( lnkfile ) ; ShortcutInfo returns a TAB-delimited list containing the following items (some of which may be blank): ; ; Arguments ; Contains a link's arguments. ; ; Description ; Gets the description of the link. ; ; Hotkey ; Gets the keyboard shortcut for the link. ; ; Path ; Gets the path to the link object. ; ; ShowCommand ; Gets the initial display state (sized, minimized, or maximized) of the link's command. ; ; WorkingDirectory ; Gets working directory specified in the link. objShApp = CreateObject("shell.application") objNamespace = objShApp.namespace(FilePath(lnkfile)) objFile = objNamespace.parsename(StrCat(FileRoot(lnkfile),".",FileExtension(lnkfile))) objShellLink = objFile.GetLink path = objShellLink.path args = objShellLink.arguments workdir = objShellLink.workingdirectory desc = objShellLink.description hotkey = objShellLink.hotkey showcmd = objShellLink.showcommand objShellLink = 0 objFile = 0 objNamespace = 0 objShApp = 0 Return path:@TAB:args:@TAB:workdir:@TAB:desc:@TAB:hotkey:@TAB:showcmd #EndFunction desktop = ShortCutDir( 'Desktop' ) lnkfile = desktop: '\dummy.lnk' info = udfShortCutInfo( lnkfile ) AskItemlist(lnkfile, info, @TAB, @UNSORTED, @SINGLE) ExitReference: http://msdn.microsoft.com/en-us/library/bb774004(VS.85).aspx
Article ID: W18279
Filename: ShortCutInfo Returns Blank Target.txt
File Created: 2010:05:12:09:41:08
Last Updated: 2010:05:12:09:41:08