File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 43
43
<!-- Default value of Checkbox of starting PowerShell after installation -->
44
44
<Property Id =" WixShellExecTarget" Value =" [$(var.ProductVersionWithName)]pwsh.exe" />
45
45
<CustomAction Id =" LaunchApplication" BinaryKey =" WixCA" DllEntry =" WixShellExec" Impersonate =" yes" />
46
+ <CustomAction Id =" SaveShortcutPath" Property =" ShortcutPath" Value =" [$ApplicationProgramsMenuShortcut]$(var.ProductSemanticVersionWithNameAndOptionalArchitecture).lnk" />
47
+ <CustomAction Id =" FixShortcutWorkingDirectory" Script =" vbscript" HideTarget =" no" Impersonate =" no" >
48
+ shortcutPath = Session.Property("ShortcutPath")
49
+ Set fso = CreateObject("Scripting.FileSystemObject")
50
+ if (fso.FileExists(shortcutPath)) Then
51
+ Set wshShell = CreateObject("WSCript.Shell")
52
+ Set shortcut = wshShell.CreateShortcut(shortcutPath)
53
+
54
+ shortcut.workingdirectory = "%HOMEDRIVE%%HOMEPATH%"
55
+ shortcut.save
56
+ End If
57
+ </CustomAction >
46
58
<UI >
47
59
<Dialog Id =" MyExitDialog" Width =" 370" Height =" 270" Title =" !(loc.ExitDialog_Title)" >
48
60
<Control Id =" LaunchCheckBox" Type =" CheckBox" X =" 10" Y =" 243" Width =" 170" Height =" 17" Property =" LAUNCHAPPONEXIT" Hidden =" yes" CheckBoxValue =" 1" Text =" Launch $(env.ProductName)" >
185
197
</Directory >
186
198
</Directory >
187
199
</Directory >
200
+ <InstallExecuteSequence >
201
+ <Custom Action =" SaveShortcutPath" After =" InstallFinalize" />
202
+ <Custom Action =" FixShortcutWorkingDirectory" After =" SaveShortcutPath" >
203
+ NOT Installed OR NOT REMOVE OR UPGRADINGPRODUCTCODE
204
+ </Custom >
205
+ </InstallExecuteSequence >
188
206
</Product >
189
207
190
208
<!-- Explorer Context Menu Dialog -->
You can’t perform that action at this time.
0 commit comments