From noreply at rubyforge.org Fri Jul 8 04:43:13 2005 From: noreply at rubyforge.org (noreply@rubyforge.org) Date: Mon Jul 11 01:40:11 2005 Subject: [Win32utils-devel] [ win32utils-Bugs-2093 ] unable to open existing shortcut Message-ID: <200507080843.j688hD3K014641@rubyforge.org> Bugs item #2093, was opened at 2005-07-08 04:43 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=2093&group_id=85 Category: win32-shortcut Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: unable to open existing shortcut Initial Comment: # ## My RUBY version # C:\>ruby -v ruby 1.8.2 (2004-12-25) [i386-mswin32] # ## Shortcut execution log with error # C:\>ruby M:\CDD\ruby\win32\shortcut\bug.rb Version: 0.1.3 Link C:/test.lnk created M:/CDD/ruby/win32/shortcut/bug.rb:22:in `open': The system cannot find the file specified. (Win32::ShortcutError) from M:/CDD/ruby/win32/shortcut/bug.rb:22 # ## Test script # === M:\CDD\ruby\win32\shortcut\bug.rb === #!/usr/bin/ruby require 'win32/shortcut' include Win32 puts "Version: " + Shortcut::VERSION link = 'C:/test.lnk' File.delete(link) if File.exists?(link) s = Shortcut.new(link) s.description = "test link" s.path = 'c:\winnt\notepad.exe' s.show_cmd = Shortcut::SHOWNORMAL s.working_directory = "C:\" s.save fail "LNK creation failed: #{link}" unless File.exists?(link) puts "Link #{link} created" s = Shortcut.open(link) puts "Path: #{s.path}" __END__ ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=2093&group_id=85 From Daniel.Berger at qwest.com Tue Jul 12 14:13:37 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue Jul 12 14:08:26 2005 Subject: [Win32utils-devel] [ win32utils-Bugs-2093 ] unable to open existingshortcut Message-ID: <39AA6550E5AA554AB1456707D6E5563D0DCC06@QTOMAE2K3M01.AD.QINTRA.COM> Hi all, After looking at this bug, I think the current implementation (sc_open calling sc_init + sc_load) needs to be largely scrapped in favor of a single function that calls CoGetInstanceFromFile(). As soon as I figure out how... Regards, Dan From zdennis at mktec.com Fri Jul 15 18:02:02 2005 From: zdennis at mktec.com (Zach Dennis) Date: Fri Jul 15 17:56:44 2005 Subject: [Win32utils-devel] Win32OLE ? Message-ID: <42D8325A.9020004@mktec.com> Dan/Park, What are your thoughts about implemented portion of the win32utils family that are written in ruby utilizing WIN32OLE. I have found myself writing decent amount of ruby code accessing the Windows Scripting Host (WSH) object models. I have a few scripts which could be added. I do not believe the functionality is currently available with win32utils: - map network drives - determine all drive letters in use - return system information about each drive - determine next available drive letter (including local and remotely mapped drives) Thanks, Zach From djberg96 at gmail.com Sun Jul 17 16:19:54 2005 From: djberg96 at gmail.com (Daniel Berger) Date: Sat Jul 16 09:59:31 2005 Subject: [Win32utils-devel] Need shortcut help Message-ID: <42DABD6A.30206@gmail.com> Heesob, Can you please take a look at win32-shortcut and get Shortcut.open to work? Check out the latest from CVS. I have a non-working version at the moment. I'm not sure why CoGetInstanceFromFile() fails, or if it's even the right approach. Thanks. Dan From djberg96 at gmail.com Sun Jul 17 16:23:49 2005 From: djberg96 at gmail.com (Daniel Berger) Date: Sat Jul 16 10:03:26 2005 Subject: [Win32utils-devel] Win32OLE ? In-Reply-To: <42D8325A.9020004@mktec.com> References: <42D8325A.9020004@mktec.com> Message-ID: <42DABE55.9030000@gmail.com> Zach Dennis wrote: > Dan/Park, > > What are your thoughts about implemented portion of the win32utils > family that are written in ruby utilizing WIN32OLE. > > I have found myself writing decent amount of ruby code accessing the > Windows Scripting Host (WSH) object models. I have a few scripts which > could be added. I do not believe the functionality is currently > available with win32utils: > - map network drives > - determine all drive letters in use > - return system information about each drive > - determine next available drive letter (including local and remotely > mapped drives) > > Thanks, > > Zach Generally speaking, I tend to favor C over WIN32OLE, except when a WMI/ADSI approach is easier and better, e.g. sys-proctable. As for drive info, you can take a look at win32-driveinfo in CVS. This is something I've been meaning to go back and look over. Regards, Dan From phasis at nownuri.net Sat Jul 16 20:50:39 2005 From: phasis at nownuri.net (Park Heesob) Date: Sat Jul 16 20:45:20 2005 Subject: [Win32utils-devel] Need shortcut help References: <42DABD6A.30206@gmail.com> Message-ID: <004101c58a69$8e2c6340$ee0d5bd2@2xnm9896kmqn5b9> Hi Dan, > Heesob, > > Can you please take a look at win32-shortcut and get Shortcut.open to > work? Check out the latest from CVS. I have a non-working version at the > moment. I'm not sure why CoGetInstanceFromFile() fails, or if it's even > the right approach. > > Thanks. > > Dan I just fixed sc_open bug and committed to CVS. No need of CoGetInstanceFromFile. Refer to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_programming/shortcuts/shortcut.asp Regard, Park Heesob From noreply at rubyforge.org Tue Jul 12 12:10:21 2005 From: noreply at rubyforge.org (noreply@rubyforge.org) Date: Sun Jul 17 22:54:01 2005 Subject: [Win32utils-devel] [ win32utils-Bugs-2093 ] unable to open existing shortcut Message-ID: <200507121610.j6CGALjr020284@rubyforge.org> Bugs item #2093, was opened at 2005-07-08 01:43 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=2093&group_id=85 Category: win32-shortcut >Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: unable to open existing shortcut Initial Comment: # ## My RUBY version # C:\>ruby -v ruby 1.8.2 (2004-12-25) [i386-mswin32] # ## Shortcut execution log with error # C:\>ruby M:\CDD\ruby\win32\shortcut\bug.rb Version: 0.1.3 Link C:/test.lnk created M:/CDD/ruby/win32/shortcut/bug.rb:22:in `open': The system cannot find the file specified. (Win32::ShortcutError) from M:/CDD/ruby/win32/shortcut/bug.rb:22 # ## Test script # === M:\CDD\ruby\win32\shortcut\bug.rb === #!/usr/bin/ruby require 'win32/shortcut' include Win32 puts "Version: " + Shortcut::VERSION link = 'C:/test.lnk' File.delete(link) if File.exists?(link) s = Shortcut.new(link) s.description = "test link" s.path = 'c:\winnt\notepad.exe' s.show_cmd = Shortcut::SHOWNORMAL s.working_directory = "C:\" s.save fail "LNK creation failed: #{link}" unless File.exists?(link) puts "Link #{link} created" s = Shortcut.open(link) puts "Path: #{s.path}" __END__ ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2005-07-12 09:10 Message: Confirmed. In addition to requiring an absolute pathname (which I will handle internally), there is a problem with the approach I used for Shortcut#open in general. I'll fix it this week. Thanks for the report. Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=2093&group_id=85 From noreply at rubyforge.org Sun Jul 17 16:43:14 2005 From: noreply at rubyforge.org (noreply@rubyforge.org) Date: Sun Jul 17 22:54:01 2005 Subject: [Win32utils-devel] [ win32utils-Bugs-2093 ] unable to open existing shortcut Message-ID: <200507172043.j6HKhEfm025155@rubyforge.org> Bugs item #2093, was opened at 2005-07-08 01:43 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=2093&group_id=85 Category: win32-shortcut Group: Code >Status: Closed Resolution: None Priority: 3 Submitted By: Nobody (None) >Assigned to: Park Heesob (phasis68) Summary: unable to open existing shortcut Initial Comment: # ## My RUBY version # C:\>ruby -v ruby 1.8.2 (2004-12-25) [i386-mswin32] # ## Shortcut execution log with error # C:\>ruby M:\CDD\ruby\win32\shortcut\bug.rb Version: 0.1.3 Link C:/test.lnk created M:/CDD/ruby/win32/shortcut/bug.rb:22:in `open': The system cannot find the file specified. (Win32::ShortcutError) from M:/CDD/ruby/win32/shortcut/bug.rb:22 # ## Test script # === M:\CDD\ruby\win32\shortcut\bug.rb === #!/usr/bin/ruby require 'win32/shortcut' include Win32 puts "Version: " + Shortcut::VERSION link = 'C:/test.lnk' File.delete(link) if File.exists?(link) s = Shortcut.new(link) s.description = "test link" s.path = 'c:\winnt\notepad.exe' s.show_cmd = Shortcut::SHOWNORMAL s.working_directory = "C:\" s.save fail "LNK creation failed: #{link}" unless File.exists?(link) puts "Link #{link} created" s = Shortcut.open(link) puts "Path: #{s.path}" __END__ ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2005-07-17 13:43 Message: Fixed in 0.1.4 by Heesob. ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2005-07-12 09:10 Message: Confirmed. In addition to requiring an absolute pathname (which I will handle internally), there is a problem with the approach I used for Shortcut#open in general. I'll fix it this week. Thanks for the report. Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=2093&group_id=85