Skip to content

Commit

Permalink
Add substitution variables to command-line program.
Browse files Browse the repository at this point in the history
  • Loading branch information
basildane committed Jul 4, 2016
1 parent f964af9 commit de86d81
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 188 deletions.
2 changes: 1 addition & 1 deletion AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Imports System.Runtime.InteropServices
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:

<Assembly: AssemblyVersion("2.11.10.0")>
<Assembly: AssemblyVersion("2.11.10.10")>

<Assembly: ComVisibleAttribute(False)>
<Assembly: NeutralResourcesLanguageAttribute("en-US")>
9 changes: 8 additions & 1 deletion Console/WakeOnLanC/Module1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,14 @@ Public Module Module1
AquilaWolLibrary.Shutdown(machine.Netbios, flags, machine.UserID, encryption.EnigmaDecrypt(machine.Password), machine.Domain)

Case machine.ShutdownMethods.Custom
Shell(machine.ShutdownCommand, AppWinStyle.Hide, False)
Dim cmd As String = machine.ShutdownCommand
cmd = cmd.Replace("$PF", Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles))
cmd = cmd.Replace("$PFX86", Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86))
cmd = cmd.Replace("$USER", machine.UserID)
cmd = cmd.Replace("$PASS", encryption.EnigmaDecrypt(machine.Password))
cmd = cmd.Replace("$HOST", machine.Netbios)
Debug.WriteLine("Custom command: " & cmd)
Shell(cmd, AppWinStyle.Hide, False)

Case machine.ShutdownMethods.Legacy
Select Case flags
Expand Down
4 changes: 2 additions & 2 deletions Console/WakeOnLanC/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2.11.10.0")>
<Assembly: AssemblyFileVersion("2.11.10.0")>
<Assembly: AssemblyVersion("2.11.10.10")>
<Assembly: AssemblyFileVersion("2.11.10.10")>

<Assembly: NeutralResourcesLanguageAttribute("en-US")>
Loading

0 comments on commit de86d81

Please sign in to comment.