質問編集履歴
2
追記
    
        title	
    CHANGED
    
    | 
            File without changes
         | 
    
        body	
    CHANGED
    
    | @@ -44,6 +44,9 @@ | |
| 44 44 | 
             
            https://qiita.com/kanedaq/items/e65507878c52ad67d002
         | 
| 45 45 | 
             
            この方法で.specファイルにhiddenimportに'comtypes'を追加する
         | 
| 46 46 |  | 
| 47 | 
            +
            https://qiita.com/bwtakacy/items/51b765b4da77a76d6f32#modulenotfounderror-%E3%81%8C%E5%87%BA%E3%82%8B
         | 
| 48 | 
            +
            この方法で pyinstaller のhiddenimport オプションにcomtypesを追加する
         | 
| 49 | 
            +
             | 
| 47 50 | 
             
            やりたいこと
         | 
| 48 51 | 
             
            ---
         | 
| 49 52 | 
             
            「comtypesをつかってファイルのショートカットを作るプログラム」pyinstallerで本プログラムと一緒に同梱して正常に実行させたい。
         | 
1
追記
    
        title	
    CHANGED
    
    | 
            File without changes
         | 
    
        body	
    CHANGED
    
    | @@ -6,6 +6,8 @@ | |
| 6 6 | 
             
            ---
         | 
| 7 7 | 
             
            mklnk.py
         | 
| 8 8 | 
             
            ```python
         | 
| 9 | 
            +
            import comtypes
         | 
| 10 | 
            +
            import os
         | 
| 9 11 | 
             
            def mksc(link,placement):
         | 
| 10 12 | 
             
                #リンク先のファイル名
         | 
| 11 13 | 
             
                target_file=os.path.join(os.path.dirname(__file__), link)
         | 
