Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Winapps
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMGW
Winapps
Commits
4e3d5bd4
"scripts/pmlnk.pm" did not exist on "e144fe8d3e49df33ea2303abf343dc06eacab79b"
Unverified
Commit
4e3d5bd4
authored
10 months ago
by
Oskar Manhart
Committed by
GitHub
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: catch error if exe has no version info
parent
95daa5d8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
install/ExtractPrograms.ps1
+3
-8
3 additions, 8 deletions
install/ExtractPrograms.ps1
with
3 additions
and
8 deletions
install/ExtractPrograms.ps1
+
3
−
8
View file @
4e3d5bd4
...
@@ -103,11 +103,9 @@ function GetApplicationName {
...
@@ -103,11 +103,9 @@ function GetApplicationName {
[
string
]
$exePath
[
string
]
$exePath
)
)
if
((
Get-Item
$exePath
)
.
VersionInfo
.
FileDescription
)
{
try
{
# Remove leading/trailing whitespace and replace multiple spaces with a single space.
$productName
=
(
Get-Item
$exePath
)
.
VersionInfo
.
FileDescription
.
Trim
()
-replace
'\s+'
,
' '
$productName
=
(
Get-Item
$exePath
)
.
VersionInfo
.
FileDescription
.
Trim
()
-replace
'\s+'
,
' '
}
else
{
}
catch
{
# Get the executable file name without the file extension.
$productName
=
[
System.IO.Path
]::
GetFileNameWithoutExtension
(
$exePath
)
$productName
=
[
System.IO.Path
]::
GetFileNameWithoutExtension
(
$exePath
)
}
}
...
@@ -125,10 +123,7 @@ function GetUWPApplicationName {
...
@@ -125,10 +123,7 @@ function GetUWPApplicationName {
# Query the application executable for the application name.
# Query the application executable for the application name.
if
(
Test-Path
$exePath
)
{
if
(
Test-Path
$exePath
)
{
if
((
Get-Item
$exePath
)
.
VersionInfo
.
FileDescription
)
{
$productName
=
GetApplicationName
-exePath
$exePath
# Remove leading/trailing whitespace and replace multiple spaces with a single space.
$productName
=
(
Get-Item
$exePath
)
.
VersionInfo
.
FileDescription
.
Trim
()
-replace
'\s+'
,
' '
}
}
}
# Use the 'DisplayName' (if available) if the previous method failed.
# Use the 'DisplayName' (if available) if the previous method failed.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment