diff --git a/Work-Start.au3 b/Work-Start.au3 index 40ba0f5..82c156e 100644 --- a/Work-Start.au3 +++ b/Work-Start.au3 @@ -1,34 +1,42 @@ #include #include +#include +#include +#include OnAutoItExitRegister ( 'OnAutoItExit' ) +$HostDrive = StringLeft(@AutoItExe, 2) + +$hProgressSplash = _SplashTextProgress("Portable Desktop",$HostDrive&"work_portal.jpg","... Opening Portal ...","O") + ;CONFIGURE THESE PATHS!!! ;These files should be on the non-encrypted drive ; Truecrypt volumes to mount -$WorkVolume = "\Profiles\Drives\glenn-workspace.tc" -$WorkDrive = "W" +$WorkVolume = "\Drives\PortableApps.vc" +$WorkDrive = "P" -$DocsVolume = "\Profiles\Drives\Documents.tc" -$MailVolume = "\Profiles\Drives\mail-profiles.tc" +;$DocsVolume = "\Profiles\Drives\Documents.tc" +;$MailVolume = "\Profiles\Drives\mail-profiles.tc" -$Work2Volume = "\Profiles\Drives\FilingCabinet.tc" +;$Work2Volume = "\Profiles\Drives\FilingCabinet.tc" -$TrueCrpytExe = "\Profiles\Tools\TrueCrypt\TrueCrypt.exe" +$TrueCrpytExe = "\Tools\VeraCrypt\VeraCrypt.exe" $CoffeeExe = ":\Utility\Coffee\Coffee.exe" $JungleDisk = ":\Utility\jungledisk-usb\JungleDiskMonitor.exe" ;These files should be on the encrypted drive ;$MainSandboxieFolder = ":\PortableApps\SandboxiePortable\" -$My_Nimi_Places = ":\Utility\my_nimi_places\" +$NimiExe = ":\Utility\Nimi Places\Nimi Places.exe" +$My_Nimi_Places = ":\Utility\Nimi Places\Places\" $PStartExe = ":\Start.exe" ;$MojoStartExe = "P:\Start.exe" -$KeepassExe = ":\Utility\keepass\KeePass.exe" +;$KeepassExe = ":\Utility\keepass\KeePass.exe" ;END OF CONFIGURATION @@ -49,10 +57,10 @@ $KeepassExe = ":\Utility\keepass\KeePass.exe" ; Exit ;EndIf -$HostDrive = StringLeft(@AutoItExe, 2) + $volumefile = $HostDrive&$WorkVolume $password = InputBox("Password", "Please input the unlock code","","*",225,110) -$TCPID = RunWait($TrueCrpytExe&" /v "&$volumefile&" /lw /p "&$password&" /q") +$TCPID = RunWait($TrueCrpytExe&" /v "&$volumefile&" /l P /p "&$password&" /q") ;If StringLen($TCPID)<3 Then ; MsgBox(0,"Drive Launcher","Problem encountered while launching TrueCrypt.exe ["&$TCPID&"]"&@error) @@ -63,11 +71,14 @@ $TCPID = RunWait($TrueCrpytExe&" /v "&$volumefile&" /lw /p "&$password&" /q") ; Exit ;EndIf +; Wait a tad... VeraCrypt takes a little longer than TC did to mount +Sleep(8000) + ; main W: drive now mounted ; mount our two supplemental volumes -$volumefile = $HostDrive&$DocsVolume -RunWait($TrueCrpytExe&" /v "&$volumefile&" /lp /p "&$password&" /q") +;$volumefile = $HostDrive&$DocsVolume +;RunWait($TrueCrpytExe&" /v "&$volumefile&" /lp /p "&$password&" /q") ;$volumefile = $HostDrive&$WorkVolume ;RunWait($TrueCrpytExe&" /v "&$volumefile&" /lr /p "&$password&" /q") @@ -85,19 +96,23 @@ RunWait($TrueCrpytExe&" /v "&$volumefile&" /lp /p "&$password&" /q") ; ...start the PortableApps menu... Run($WorkDrive&$PStartExe) -Sleep(500) +Sleep(1000) ; ... start JungleDisk ... -Run($WorkDrive&$JungleDisk) -Sleep(500) +;Run($WorkDrive&$JungleDisk) +;Sleep(500) ; ... start Nimi ... -Run($WorkDrive&":\Utility\nimi\Nimi Places.exe") +Run($WorkDrive&$NimiExe) Sleep(500) +; ... start Dexpot - multiple desktops ... +Run($WorkDrive&":\Utility\dexpot_portable\dexpot.exe") +Sleep(2500) + ; Now start Coffee for portable file associations... Run($WorkDrive&$CoffeeExe) -;Sleep(500) +Sleep(500) ; setup some desktop icons @@ -119,76 +134,105 @@ Run($WorkDrive&$CoffeeExe) ;FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description,$icon,"","47",$State) -$FileName = $WorkDrive&":\Utility\mremoteNG\mRemoteNG.exe" -$LinkFileName = $WorkDrive & $My_Nimi_Places & "Quick Links\mRemote.lnk" -$WorkingDirectory = $WorkDrive&":\Utility\mremoteNG\" -$Description = "mRemoteNG - remote server access tool" -$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE +;$FileName = $WorkDrive&":\Utility\mremoteNG\mRemoteNG.exe" +;$LinkFileName = $WorkDrive & $My_Nimi_Places & "Quick Links\mRemote.lnk" +;$WorkingDirectory = $WorkDrive&":\Utility\mremoteNG\" +;$Description = "mRemoteNG - remote server access tool" +;$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE -FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) +;FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) -$FileName = $WorkDrive&":\Utility\jungledisk-usb\junglediskmonitor.exe" -$LinkFileName = $WorkDrive & $My_Nimi_Places & "Tools\jungledisk-usb.lnk" -$WorkingDirectory = $WorkDrive&":\Utility\jungledisk-usb\" -$Description = "JungleDisk" -$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE +;$FileName = $WorkDrive&":\Utility\jungledisk-usb\junglediskmonitor.exe" +;$LinkFileName = $WorkDrive & $My_Nimi_Places & "Tools\jungledisk-usb.lnk" +;$WorkingDirectory = $WorkDrive&":\Utility\jungledisk-usb\" +;$Description = "JungleDisk" +;$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE -FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) +;FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) -$FileName = $HostDrive&"\Profiles\Tools\truecrypt\truecrypt.exe" -$LinkFileName = $WorkDrive & $My_Nimi_Places & "Tools\Truecrypt Portable.lnk" -$WorkingDirectory = $HostDrive&"\Profiles\Drives\" -$Description = "TrueCrypt - encryption tool" -$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE +;$FileName = $HostDrive&"\Profiles\Tools\truecrypt\truecrypt.exe" +;$LinkFileName = $WorkDrive & $My_Nimi_Places & "Tools\Truecrypt Portable.lnk" +;$WorkingDirectory = $HostDrive&"\Profiles\Drives\" +;$Description = "TrueCrypt - encryption tool" +;$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE -FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) +;FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) -$FileName = $WorkDrive&":\Utility\KeePass\keepass.exe" -$LinkFileName = $WorkDrive & $My_Nimi_Places & "Tools\KeePass Portable.lnk" -$WorkingDirectory = "P:\Documents\" -$Description = "KeePass" -$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE +;$FileName = $WorkDrive&":\Utility\KeePass\keepass.exe" +;$LinkFileName = $WorkDrive & $My_Nimi_Places & "Tools\KeePass Portable.lnk" +;$WorkingDirectory = "P:\Documents\" +;$Description = "KeePass" +;$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE -FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) +;FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) -$FileName = $WorkDrive&":\Utility\UltraRecall\UltraRecall.exe" -$LinkFileName = $WorkDrive & $My_Nimi_Places & "Quick Links\UltraRecall Portable.lnk" -$WorkingDirectory = "P:\Documents\" -$Description = "UltraRecall PIM" -$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE +;$FileName = $WorkDrive&":\Utility\UltraRecall\UltraRecall.exe" +;$LinkFileName = $WorkDrive & $My_Nimi_Places & "Quick Links\UltraRecall Portable.lnk" +;$WorkingDirectory = "P:\Documents\" +;$Description = "UltraRecall PIM" +;$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE -FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) +;FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) -$FileName = $WorkDrive&":\Utility\EPIM\EssentialPIM.exe" -$LinkFileName = $WorkDrive & $My_Nimi_Places & "Quick Links\EssentialPIM Pro Portable.lnk" -$WorkingDirectory = "P:\Documents\" -$Description = "EssentialPIM Pro" -$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE +;$FileName = $WorkDrive&":\Utility\EPIM\EssentialPIM.exe" +;$LinkFileName = $WorkDrive & $My_Nimi_Places & "Quick Links\EssentialPIM Pro Portable.lnk" +;$WorkingDirectory = "P:\Documents\" +;$Description = "EssentialPIM Pro" +;$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE -FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) +;FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) -$FileName = $WorkDrive&":\Utility\fossil\fossil.exe" -$LinkFileName = $WorkDrive & $My_Nimi_Places & "Quick Links\Fossil.lnk" -$WorkingDirectory = "P:\PrimeTech\Projects\" -$Description = "Fossil SCM" -$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE +;$FileName = $WorkDrive&":\Utility\fossil\fossil.exe" +;$LinkFileName = $WorkDrive & $My_Nimi_Places & "Quick Links\Fossil.lnk" +;$WorkingDirectory = "P:\PrimeTech\Projects\" +;$Description = "Fossil SCM" +;$State = @SW_SHOWNORMAL ;Can also be @SW_SHOWNORMAL or @SW_SHOWMINNOACTIVE -FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) +;FileCreateShortcut($FileName,$LinkFileName,$WorkingDirectory,"",$Description) +GUIDelete($hProgressSplash) ; wait until it finishes Sleep(16000) ProcessWaitClose("PortableAppsPlatform.exe") +$hProgressSplash = _SplashTextProgress("Portable Desktop",$HostDrive&"close_portal.jpg","... Locking Vault ...","C") +; --------------- Functions -------------------- + +Func _SplashTextProgress($sText,$sPic,$sDesc,$sWhich) ;Creates a Splash Text Screen with a progress bar. + SplashOff() ;Turn previous splash text screens off. + Select + Case $sWhich = "O" + $WinPos = 1 + Case $sWhich = "C" + $WinPos = -1 + EndSelect + $hSplash = GUICreate("", 300, 460, $WinPos, $WinPos, BitOR($WS_POPUP, $WS_BORDER), BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE, $WS_EX_TOOLWINDOW)) + GUICtrlCreatePic($sPic, 1, 50, 300, 360) +;~ $iProgressBar = GUICtrlCreateProgress(100, 325, 305, 25, $PBS_SMOOTH) ;A standard progress bar. + $iProgressBar = GUICtrlCreateProgress(0, 435, 300, 25, $PBS_MARQUEE) ;A marquee progress bar. + GUICtrlSendMsg(-1, $PBM_SETMARQUEE, True, 80) ;last parameter is update time in ms. Sends message to run the marquee progress bar. + $iMessage = GUICtrlCreateLabel($sText, 0, 0, 300, 50, $SS_CENTER) + GUICtrlSetFont(-1, 22, 700, 0, "Arial") + + $iMessage = GUICtrlCreateLabel($sDesc, 0, 412, 300, 20, $SS_CENTER) + GUICtrlSetFont(-1, 12, 400, 2, "Arial") + + GUISetState(@SW_SHOW) + + Return SetExtended($iProgressBar, $hSplash) +EndFunc ; end _SplashTextProgress Func OnAutoItExit() Sleep(5000) - ProcessClose("Coffee.exe") + if ProcessExists("Coffee.exe") then + ProcessClose("Coffee.exe") + endif if ProcessExists("thunderbird.exe") then ProcessClose ( "thunderbird.exe") @@ -224,21 +268,31 @@ Func OnAutoItExit() ; remove some desktop icons ; FileDelete(@DesktopDir & "\Start Personal Desktop.lnk") ; FileDelete(@DesktopDir & "\Mobile Backup.lnk") - FileDelete($WorkDrive & $My_Nimi_Places & "Tools\mRemote.lnk") - FileDelete($WorkDrive & $My_Nimi_Places & "Tools\jungledisk-usb.lnk") - FileDelete($WorkDrive & $My_Nimi_Places & "Tools\KeePass Portable.lnk") - FileDelete($WorkDrive & $My_Nimi_Places & "Tools\Truecrypt Portable.lnk") - FileDelete($WorkDrive & $My_Nimi_Places & "Quick Links\UltraRecall Portable.lnk") - FileDelete($WorkDrive & $My_Nimi_Places & "Quick Links\EssentialPIM Pro Portable.lnk") - FileDelete($WorkDrive & $My_Nimi_Places & "Quick Links\Fossil.lnk") +; FileDelete($WorkDrive & $My_Nimi_Places & "Tools\mRemote.lnk") +; FileDelete($WorkDrive & $My_Nimi_Places & "Tools\jungledisk-usb.lnk") +; FileDelete($WorkDrive & $My_Nimi_Places & "Tools\KeePass Portable.lnk") +; FileDelete($WorkDrive & $My_Nimi_Places & "Tools\Truecrypt Portable.lnk") +; FileDelete($WorkDrive & $My_Nimi_Places & "Quick Links\UltraRecall Portable.lnk") +; FileDelete($WorkDrive & $My_Nimi_Places & "Quick Links\EssentialPIM Pro Portable.lnk") +; FileDelete($WorkDrive & $My_Nimi_Places & "Quick Links\Fossil.lnk") if ProcessExists("Nimi Places.exe") then ProcessClose ( "Nimi Places.exe" ) + Sleep(1000) endif - Sleep(1000) + if ProcessExists("dexpot.exe") then + ProcessClose ( "dexpot.exe") + Sleep(1000) + endif + + Sleep(2000) ShellExecuteWait($HostDrive&$TrueCrpytExe,"/d /q") + + Sleep(2000) + + GUIDelete($hProgressSplash) ; ShellExecute($HostDrive&"\psshutdown.exe","-k -c") -EndFunc +EndFunc ; end OnAutoItExit() diff --git a/close_portal.jpg b/close_portal.jpg new file mode 100644 index 0000000..0b3e7f0 Binary files /dev/null and b/close_portal.jpg differ diff --git a/work_portal.jpg b/work_portal.jpg new file mode 100644 index 0000000..dd0d958 Binary files /dev/null and b/work_portal.jpg differ