CodySfe: Pre- and Post-run Scripts implemented!This option was added following multiple requests of advanced users. It provides you with simple yet powerful way to execute commands and applications before launching autorun applications (pre-run script) and/or upon exiting CodySafe. It may be a very useful feature.
We would like to show here just one simple example of using scripts.
If you want to clean traces of your activity when you finish working on a public PC (Internet café) you will need to run several scripts that remove temporary files, cookies, history, etc. You may write these scripts manually, but we suggest using portable CCleaner, as a simple and convenient way.

If you have portable CCleaner installed on your CodySafe drive in "\PortableApps\CCleaner" folder, all you need to clean up every time you are leaving a public computer, is to schedule CCleaner to run on every CodySafe exit.

To enable this, first run CCleaner, set the desired options and close it. Then open "Scripts" tab of the CodySafe Applications Manager.

CodySafe Applications Manager - Scripts

In Post-run section write the following line in edit box:

 \PortableApps\CCleaner\ccleaner.exe /auto

Set Script language to "Batch Script" and click "Close" button.

You are done! Now on each exit of the CodySafe the CCleaner will perform all defined tasks and exit. Simple, isn′t it?

For those who do not want to run CCleaner on every exit, but want to be prompted, let′s write another simple script there:

 dim PostRun
PostRun=MsgBox("Do you want to execute post-run script?",vbYesNo,"CodySafe Post-run script")
If PostRun = vbYes Then
Sub Run(ByVal sFile,sParam)
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run Chr(34) & sFile & Chr(34) & sParam, 1, false
Set shell = Nothing
End Sub
Run "\PortableApps\CCleaner\CCleaner.exe", "/auto"
' NO CODE HERE... Skip the script.

End If

Set Script language to "VB Script" and click "Close" button.
Now when you exit CodySafe you will be prompted with following message box:

Post-run script prompt

Click "Yes" if you want to run CCleaner this time or "No" to skip...

We believe that you will find this feature useful. You can share your scripts in the special section of the forum.

Subscribe to RSS feed...

Who's Online

We have 29 guests and 1 member online