Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
ea618b2b
Commit
ea618b2b
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Register the tray app for auto-start on user login.
Fixes
#30
parent
a4fd172d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Updater/Update-Service.ps1
+22
-0
22 additions, 0 deletions
Updater/Update-Service.ps1
with
22 additions
and
0 deletions
Updater/Update-Service.ps1
+
22
−
0
View file @
ea618b2b
...
...
@@ -66,6 +66,26 @@ function Stop-TrayApp() {
}
function
Create-TrayAppStartupShortcut
()
{
$StartupDir
=
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
$ShortcutFile
=
"
$(
$StartupDir
)
\AutoTxTray.lnk"
if
(
Test-Path
-Type
Leaf
$ShortcutFile
)
{
Write-Verbose
"Startup menu shortcut already existing."
Return
}
try
{
$WshShell
=
New-Object
-ComObject
WScript.Shell
$Shortcut
=
$WshShell
.
CreateShortcut
(
$ShortcutFile
)
$Shortcut
.
TargetPath
=
"
$(
$InstallationPath
)
\ATxTray.exe"
$Shortcut
.
Save
()
Log-Debug
"Created startup menu shortcut for tray app."
}
catch
{
Log-Debug
"Creating tray app shortcut failed:
$(
$_
.
Exception
.
Message
)
"
}
}
function
Exit-IfDirMissing
([
string
]
$DirName
,
[
string
]
$Desc
)
{
if
(
Test-Path
-PathType
Container
$DirName
)
{
Write-Verbose
"Verified
$(
$Desc
)
path: [
$(
$DirName
)
]"
...
...
@@ -674,6 +694,8 @@ catch {
Log-Error
$UpdDetails
}
Create-TrayAppStartupShortcut
Send-MailReport
-Subject
"
$UpdSummary
"
-Body
"
$UpdDetails
"
...
...
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