mirror of
https://github.com/glennrice/PortableDesktop.git
synced 2025-04-20 00:06:23 +10:00
Compare commits
No commits in common. "master" and "v0.1" have entirely different histories.
7
README.md
Executable file → Normal file
7
README.md
Executable file → Normal file
@ -4,11 +4,8 @@ This README would normally document whatever steps are necessary to get your app
|
|||||||
|
|
||||||
### What is this repository for? ###
|
### What is this repository for? ###
|
||||||
|
|
||||||
* A wrapper script for PortableApps.com & VeraCrypt to take apps, docs and work environment to any computer that you might need to work on.
|
* Quick summary
|
||||||
|
* Version
|
||||||
We all often need to work with some of our own apps and data but often can't, or don't want to install them on an employer's computer - especially if it is sometimes shared by other people. With this script you can have your own environment off of a USB drive which is encrypted when not in use.
|
|
||||||
|
|
||||||
* Version... Alpha, alpha, alpha! Definitely consider this "pre-release" as it only ever been for my own use although I still periodically update and tidy this up. If anyone else starts using it it may encourage me to update it more.
|
|
||||||
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
|
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
|
||||||
|
|
||||||
### How do I get set up? ###
|
### How do I get set up? ###
|
||||||
|
83
Work-Start.au3
Executable file → Normal file
83
Work-Start.au3
Executable file → Normal file
@ -1,20 +1,11 @@
|
|||||||
#NoTrayIcon
|
#include <Array.au3>
|
||||||
#include <Constants.au3>
|
#include <Constants.au3>
|
||||||
#include <WindowsConstants.au3>
|
#include <WindowsConstants.au3>
|
||||||
#include <StaticConstants.au3>
|
#include <StaticConstants.au3>
|
||||||
#include <ProgressConstants.au3>
|
#include <ProgressConstants.au3>
|
||||||
#include <MsgBoxConstants.au3>
|
|
||||||
#include <ButtonConstants.au3>
|
|
||||||
#include <EditConstants.au3>
|
|
||||||
#include <GUIConstantsEx.au3>
|
|
||||||
#include <TrayConstants.au3> ; Required for the $TRAY_ICONSTATE_SHOW constant.#include <Array.au3>
|
|
||||||
|
|
||||||
Opt("GUIOnEventMode", 1)
|
|
||||||
|
|
||||||
OnAutoItExitRegister ( 'OnAutoItExit' )
|
OnAutoItExitRegister ( 'OnAutoItExit' )
|
||||||
|
|
||||||
Opt("TrayMenuMode", 3) ; The default tray menu items will not be shown and items are not checked when selected.
|
|
||||||
|
|
||||||
$HostDrive = StringLeft(@AutoItExe, 2)
|
$HostDrive = StringLeft(@AutoItExe, 2)
|
||||||
|
|
||||||
$hProgressSplash = _SplashTextProgress("Portable Desktop",$HostDrive&"work_portal.jpg","... Opening Portal ...","O")
|
$hProgressSplash = _SplashTextProgress("Portable Desktop",$HostDrive&"work_portal.jpg","... Opening Portal ...","O")
|
||||||
@ -125,13 +116,13 @@ Sleep(500)
|
|||||||
|
|
||||||
; setup some desktop icons
|
; setup some desktop icons
|
||||||
|
|
||||||
$FileName = "P:\Utility\cmder\cmder.exe"
|
;$FileName = "P:\Start.exe"
|
||||||
$LinkFileName = @DesktopDir & "\Start Cmder prompt.lnk"
|
;$LinkFileName = @DesktopDir & "\Start Personal Desktop.lnk"
|
||||||
$WorkingDirectory = "P:\"
|
;$WorkingDirectory = "P:\"
|
||||||
$Description = "This starts customised command prompt"
|
;$Description = "This starts my mobile personal MojoPac desktop"
|
||||||
$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE
|
;$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE
|
||||||
|
|
||||||
FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description)
|
;FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description)
|
||||||
|
|
||||||
;$FileName = $drive&"\mobile-backup.exe"
|
;$FileName = $drive&"\mobile-backup.exe"
|
||||||
;$LinkFileName = @DesktopDir & "\Mobile Backup.lnk"
|
;$LinkFileName = @DesktopDir & "\Mobile Backup.lnk"
|
||||||
@ -203,39 +194,9 @@ FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description)
|
|||||||
|
|
||||||
GUIDelete($hProgressSplash)
|
GUIDelete($hProgressSplash)
|
||||||
|
|
||||||
; --- Setup Tray menu
|
|
||||||
Global $iSettings = TrayCreateMenu("Settings") ; Create a tray menu sub menu with two sub items.
|
|
||||||
Global $iDisplay = TrayCreateItem("Display", $iSettings)
|
|
||||||
Global $iPrinter = TrayCreateItem("Printer", $iSettings)
|
|
||||||
TrayCreateItem("") ; Create a separator line.
|
|
||||||
|
|
||||||
Local $idAbout = TrayCreateItem("About")
|
|
||||||
TrayCreateItem("") ; Create a separator line.
|
|
||||||
|
|
||||||
Local $idExit = TrayCreateItem("Exit")
|
|
||||||
|
|
||||||
TraySetState($TRAY_ICONSTATE_SHOW) ; Show the tray menu.
|
|
||||||
|
|
||||||
; wait until it finishes
|
; wait until it finishes
|
||||||
Sleep(16000)
|
Sleep(16000)
|
||||||
; ---ProcessWaitClose("PortableAppsPlatform.exe")
|
ProcessWaitClose("PortableAppsPlatform.exe")
|
||||||
|
|
||||||
While ProcessExists("PortableAppsPlatform.exe")
|
|
||||||
|
|
||||||
; Poll the system tray menu
|
|
||||||
Switch TrayGetMsg()
|
|
||||||
Case $idAbout ; Display a message box about the AutoIt version and installation path of the AutoIt executable.
|
|
||||||
Global $hAbout = AboutForm()
|
|
||||||
|
|
||||||
Case $iDisplay, $iPrinter
|
|
||||||
MsgBox($MB_SYSTEMMODAL, "", "A sub menu item was selected from the tray menu.")
|
|
||||||
|
|
||||||
Case $idExit ; Exit the loop.
|
|
||||||
ExitLoop
|
|
||||||
|
|
||||||
EndSwitch
|
|
||||||
|
|
||||||
Wend
|
|
||||||
|
|
||||||
$hProgressSplash = _SplashTextProgress("Portable Desktop",$HostDrive&"close_portal.jpg","... Locking Vault ...","C")
|
$hProgressSplash = _SplashTextProgress("Portable Desktop",$HostDrive&"close_portal.jpg","... Locking Vault ...","C")
|
||||||
|
|
||||||
@ -266,32 +227,6 @@ Func _SplashTextProgress($sText,$sPic,$sDesc,$sWhich) ;Creates a Splash Text Scr
|
|||||||
Return SetExtended($iProgressBar, $hSplash)
|
Return SetExtended($iProgressBar, $hSplash)
|
||||||
EndFunc ; end _SplashTextProgress
|
EndFunc ; end _SplashTextProgress
|
||||||
|
|
||||||
Func AboutForm()
|
|
||||||
#Region ### START Koda GUI section ### Form=G:\Tools\Koda\Forms\frmAbout.kxf
|
|
||||||
$frmAbout = GUICreate("About", 445, 348, 186, 149)
|
|
||||||
$lblTitle = GUICtrlCreateLabel("PortableDesktop", 168, 24, 258, 41)
|
|
||||||
GUICtrlSetFont(-1, 24, 800, 0, "Arial")
|
|
||||||
$btnOK = GUICtrlCreateButton("OK", 344, 312, 75, 25)
|
|
||||||
GUICtrlSetOnEvent(-1, "btnOKClick")
|
|
||||||
$lblVersion = GUICtrlCreateLabel("Version 0.1", 168, 80, 57, 17)
|
|
||||||
$grpConfig = GUICtrlCreateGroup("Configuration:", 32, 152, 385, 145)
|
|
||||||
$txtHost = GUICtrlCreateInput(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1) - 1), 224, 192, 121, 21)
|
|
||||||
GUICtrlSetState(-1, $GUI_DISABLE)
|
|
||||||
$Label1 = GUICtrlCreateLabel("Host Drive:", 112, 192, 57, 17)
|
|
||||||
$Label2 = GUICtrlCreateLabel("Portable Desktop:", 112, 232, 89, 17)
|
|
||||||
$txtPortable = GUICtrlCreateInput($HostDrive, 224, 232, 121, 21)
|
|
||||||
GUICtrlCreateGroup("", -99, -99, 1, 1)
|
|
||||||
GUICtrlSetState(-1, $GUI_DISABLE)
|
|
||||||
GUISetState(@SW_SHOW)
|
|
||||||
#EndRegion ### END Koda GUI section ###
|
|
||||||
|
|
||||||
Return $frmAbout
|
|
||||||
EndFunc ; end AboutForm
|
|
||||||
|
|
||||||
Func btnOKClick()
|
|
||||||
GUIDelete($hAbout)
|
|
||||||
EndFunc
|
|
||||||
|
|
||||||
Func OnAutoItExit()
|
Func OnAutoItExit()
|
||||||
Sleep(5000)
|
Sleep(5000)
|
||||||
|
|
||||||
@ -331,7 +266,7 @@ Func OnAutoItExit()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
; remove some desktop icons
|
; remove some desktop icons
|
||||||
FileDelete(@DesktopDir & "\Start Cmder prompt.lnk")
|
; FileDelete(@DesktopDir & "\Start Personal Desktop.lnk")
|
||||||
; FileDelete(@DesktopDir & "\Mobile Backup.lnk")
|
; FileDelete(@DesktopDir & "\Mobile Backup.lnk")
|
||||||
; FileDelete($WorkDrive & $My_Nimi_Places & "Tools\mRemote.lnk")
|
; FileDelete($WorkDrive & $My_Nimi_Places & "Tools\mRemote.lnk")
|
||||||
; FileDelete($WorkDrive & $My_Nimi_Places & "Tools\jungledisk-usb.lnk")
|
; FileDelete($WorkDrive & $My_Nimi_Places & "Tools\jungledisk-usb.lnk")
|
||||||
|
0
close_portal.jpg
Executable file → Normal file
0
close_portal.jpg
Executable file → Normal file
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
0
contributors.txt
Executable file → Normal file
0
contributors.txt
Executable file → Normal file
0
work_portal.jpg
Executable file → Normal file
0
work_portal.jpg
Executable file → Normal file
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Loading…
x
Reference in New Issue
Block a user