[#50466] [ruby-trunk - Bug #7492][Open] Segmentation fault at DL::TestDL#test_call_double on x64 Windows 8 — "phasis68 (Heesob Park)" <phasis@...>

23 messages 2012/12/02

[#50558] [ruby-trunk - Feature #7511][Open] short-circuiting logical implication operator — "rits (First Last)" <redmine@...>

12 messages 2012/12/04

[#50575] [ruby-trunk - Feature #7517][Open] Fixnum::MIN,MAX — "matz (Yukihiro Matsumoto)" <matz@...>

20 messages 2012/12/05

[#50755] Becoming a committer — Charlie Somerville <charlie@...>

Hi ruby-core,

21 messages 2012/12/11
[#50759] Re: Becoming a committer — Yukihiro Matsumoto <matz@...> 2012/12/11

Hi,

[#50784] Re: Becoming a committer — Charles Oliver Nutter <headius@...> 2012/12/11

It's really this easy? If so, I'll send over my public key today :)

[#50795] Re: Becoming a committer — Yukihiro Matsumoto <matz@...> 2012/12/11

Hi,

[#50806] [ruby-trunk - Feature #7548][Open] Load and Require Callbacks — "trans (Thomas Sawyer)" <transfire@...>

12 messages 2012/12/12

[#50810] [ruby-trunk - Feature #7549][Open] A Ruby Design Process — "brixen (Brian Ford)" <brixen@...>

34 messages 2012/12/12

[#50867] [ruby-trunk - Bug #7556][Assigned] test error on refinement — "usa (Usaku NAKAMURA)" <usa@...>

14 messages 2012/12/13

[#50900] [ruby-trunk - Bug #7564][Open] r38175 introduces incompatibility — "tenderlovemaking (Aaron Patterson)" <aaron@...>

14 messages 2012/12/14

[#50951] [ruby-trunk - Bug #7584][Open] Ruby hangs when shutting down an ssl connection in gc finalization — "bpot (Bob Potter)" <bobby.potter@...>

12 messages 2012/12/17

[#51076] [ruby-trunk - Feature #7604][Open] Make === comparison operator ability to delegate comparison to an argument — "prijutme4ty (Ilya Vorontsov)" <prijutme4ty@...>

12 messages 2012/12/22

[#51170] [ruby-trunk - Bug #7629][Open] Segmentation fault — "atd (Antonio Tapiador)" <atapiador@...>

13 messages 2012/12/28

[ruby-core:50618] [ruby-trunk - Bug #6843] win32ole save shortcut fail on Windows XP

From: "mghomn (Justin Peal)" <yujianbin@...>
Date: 2012-12-06 08:00:19 UTC
List: ruby-core #50618
Issue #6843 has been updated by mghomn (Justin Peal).


Thank you very much!
----------------------------------------
Bug #6843: win32ole save shortcut fail on Windows XP
https://bugs.ruby-lang.org/issues/6843#change-34460

Author: mghomn (Justin Peal)
Status: Rejected
Priority: High
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20) [i386-mingw32]


The following program will success on Windows 7, but fail on Windows XP
=======================================================================
Error message:
(in OLE method `Save': )
    OLE error code:80070003 in WshShortcut.Save
                                 C:\Documents and Settings\......
    HResult error code:0x80020009
      Exception occurred.
=======================================================================
#!/usr/bin/env ruby -w -Eutf-8:utf-8
# encoding: utf-8

require 'win32ole'

module Shortcut
  USERPROFILE = ENV['USERPROFILE']

  def self.gen my_exe, my_params, my_dir, my_desc
    wsh = WIN32OLE.new('WScript.Shell')
    link = wsh.CreateShortcut("#{USERPROFILE}\\Desktop\\#{my_desc}.lnk")
    link.TargetPath = my_exe
    link.Arguments = my_params
    link.Description = my_desc
    link.WindowStyle = 3   # WindowsStyle.showmaximized
    link.WorkingDirectory = my_dir
    link.Save
  end
end

if $0 == __FILE__
  ComSpec = ENV['ComSpec']
  Shortcut.gen(ComSpec, '/c ver', Shortcut::USERPROFILE, 'OSVER')
  system("#{ComSpec} /c #{Shortcut::USERPROFILE}\\Desktop\\OSVER.lnk")
end



-- 
http://bugs.ruby-lang.org/

In This Thread

Prev Next