Dec 09

Apple, Google, Facebook must Pay!

I seldom bring news from other sites into my sites but this cauge my eye in one of the sites I visit and I think I’d like to share
So Apple, Google and Facebook (not in any specific order) might need to pay for Data consumption from Mobile operators in the EU.

Read below for the info and tell me what you think….
Original Post at – Linky

With the increasing dependence on Internet services such as those fromGoogle and Facebook, it’s no surprise that carriers are reporting juicy revenues from mobile data usage. Of course, that itself presents another problem as carriers are often faced with bandwidth problems and need to build bigger networks. Word is going around that Vodafone, Orange, Telefonica and Telecom Italia actually want content providers such as Google, Facebook, and Apple to pay fees linked to usage. Stephane Richard, CEO of France Telecom (which operates under the Orange brand) stated that “Service providers are flooding networks with no incentive to cut costs. It’s necessary to put in place a system of payments by service providers as a function of their use.” Do you think those Internet giants will need to pay additional fees to carriers in the near future?

Posted in From Other Sites | Tagged , , , , , | Leave a comment
Nov 12

VBScript – Passing Arguments

So you want to pass some arguments to your VBScript either with a shortcut or command prompt…

Why do you need this at all? let’s say I have some customer I want to deploy some software or do something on their system and as well all know (Or we might not… at least not me) there is no way to Compress/UnCompress (Zip’d) files via VBScript in a nice way.

Or I want to automate a procedure to upgrade and if needed do a downgrade.

So the idea here is simple, I create a VBScript that will preform an UnZip and I want to specify what file ti UnZip and where to extract it to (I know you can always use WinZip Self Extractor of some sort but this is just an example for Arguments).

So here goes, simple start of the script with some objects (if you want you can open explicits I don’t think it’s needed with this one)

set objShell = CreateObject("Wscript.Shell")

set objFSO = CreateObject("Scripting.FileSystemObject")

Next line is where we set to get arguments from the script

Set args = WScript.Arguments

Now i’m going to do some verification here that if no arguments are passed i’m going to show an error with a MSGBOX as you can see in the screenshot below, and when they hit OK i’ll quit the script.

If Wscript.Arguments.Count = 0 Then

MsgBox ("Add some arugments this will not work without them...." & vbNewLine & _

"Please add MainFile and Locaion do unzip like Script.vbs C:\Temp\ C:\Temp\")


Here is where i’m going to assign the arguments to a value, each arogument is passed as a number where the first argument is (0) and moving on.

In this case my command would be UnZip.vbs C:\Temp\ C:\Temp\SoftwareUpgrade1234\


args.Item(0) = C:\Temp\  <-- First one And args.Item(1) =  C:\Temp\SoftwareUpgrade1234\ <-- Second one I think you catch what i'm talking about... [code lang="vb"] Else PathOfZipFile = args.Item(0) ExtractZipTo = args.Item(1) End If [/code] And this is what I do to UnZip the files.... (simple but make sure that you create folders if needed ETC...) [code lang="vb"] set UnZipIt = CreateObject("Shell.Application") set FilesInzip=UnZipIt.NameSpace(PathOfZipFile).items UnZipIt.NameSpace(ExtractZipTo).CopyHere(FilesInzip) [/code] So here is the whole code.... just so it's easy on the copy/paste (That you can't do on WP7... YET) [code lang="vb"] set objShell = CreateObject("Wscript.Shell") set objFSO = CreateObject("Scripting.FileSystemObject") Set args = WScript.Arguments If Wscript.Arguments.Count = 0 Then MsgBox ("Add some arugments this will not work without them...." &amp; vbNewLine &amp; _ "Please add MainFile and Locaion do unzip like Script.vbs C:\Temp\ C:\Temp\") WScript.Quit Else PathOfZipFile = args.Item(0) ExtractZipTo = args.Item(1) End If set UnZipIt = CreateObject("Shell.Application") set FilesInzip=UnZipIt.NameSpace(PathOfZipFile).items UnZipIt.NameSpace(ExtractZipTo).CopyHere(FilesInzip) [/code]

Posted in Development, Scripting | Tagged , , , | 2 Comments
Aug 16

VBScript – In the beginning LOGGING

So what is VBScript? I’m not going to go into the whole what and why… you can read it all on WiKiPeDiA.
Sort Story
VBScript (Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft that is modelled on Visual Basic. It is designed as a “lightweight” language with a fast interpreter for use in a wide variety of Microsoft environments. VBScript uses the Component Object Model to access elements of the environment within which it is running; for example, the FileSystemObject (FSO) is used to create, read, update and delete files.
Read more on Wiki –

So now they what we can do with it and why as there are other solutions.
What did I use VBS for?
Anything from Go-Live with user intervention to enter details for Machine name changes, IP Changes, Registry Changes, DB Changes and much more to automate Go-Live and System staging.
Automate backup and restore, tie into active solutions via MS solutions…
HTA files are a nice touch to make everything look somewhat up to date.
VBScript is a simple but sofisticated way of automating enviromentatal solutions.

But before I start with anything i’m going to recommend LOGGING!!! so add the following code to the end of your scripts and LOG away.
There are many variations but I like the following one and it does have some variations, but here is what I like about it.
1. Create a few log files with the same SUB
2. Consistency with all your log files

In this example we use one log and one line, the log write line

WriteToLog("Generic Log.vbs - Write This")

The output line in the log file will be
8/16/2010 11:26:00 PM    :    Generic Log    :    Generic Log.vbs – Write This

Full Code

' Filename:  Generic Log.vbs
' Copyright (c) Yeshai Bouskila 2009
' All Rights Reserved
' Please Enter Updates with date and name including line of Change
 set objShell = CreateObject("Wscript.Shell")
 set objFSO = CreateObject("Scripting.FileSystemObject")

'--- Main Begins ---------------------------------------

 WriteToLog("Generic Log.vbs - Write This")

'--- Main Ends -----------------------------------------

'--- Write to log --------------------------------------
Sub WriteToLog(strLogMessage)
 Const ForAppending = 8
 Const vbsName = "Generic Log"
 strLogFileName = "C:\GenericLog.log"
 strLogEntryTime = NOW
 'test whether file exists To either write/append to file
 if objFSO.FileExists(strLogFileName) Then
 Set objLogFileTransaction = objFSO.OpenTextFile(strLogFileName, ForAppending)
 Set objLogFileTransaction = objFSO.CreateTextFile(strLogFileName)
 End if
 objLogFileTransaction.WriteLine strLogEntryTime &amp; chr(9) &amp; chr(58) &amp; chr(9) &amp; vbsName &amp; chr(9) &amp; chr(58) &amp; chr(9) &amp; strLogMessage
 WScript.StdOut.WriteLine strLogMessage
 WScript.StdOut.WriteLine ""
End Sub

Now let’s say I want to write in one script to a few log files but want to keep it constant.
We will change our SUB line to request another parameter from the WriteToLog line in the script

Sub WriteToLog(strLogMessage,strLogFileName)

As well another change to the log name in the function

strLogFileName = "C:\"& strLogFileName & ".log"

So what did we just do if our write to log like looks like this?

WriteToLog "Something for the VBScript Log","WhatAlog"

first area is our strLogMessage, second area is the log name strLogName
strLogMessage = “Something for the VBScript Log”
strLogName = “WhatAlog”

There are unlimited options here, have fun and ask away if you need.

Posted in Scripting | Tagged , , , , | 3 Comments
Aug 07

Android Development Book – Recommendation

Android Development Book – Recommendation
When I started developing it was for fun, most of my development was not really development but programming.
What’s the difference between development and programing? that’s a whole new story.
Back to programing, most of what I’ve done was for fun (with the exception of VB scripting for customers and work) with PHP and C# and mostly on my websites.
With my move from WM to RIM and then to iPhone I thought let’s pick up Cocoa but I was not willing to vest major $$$ on a Mac that will not help me in the real world.
So Android was the right way and my new HTC Aria is amazing but we are getting off topic here.
I wanted to start playing around with Android SDK and build my own simple apps so I looked around for some books and this one is by far the best one I’ve found.
It takes you through the “Fast Trak” of Android developmetn and it’s written in a fun and simple language and it’s one of the best development books I’ve read.

Well the book is called – Hello, Android: Introducing Google’s Mobile Development Platform, 3rd Edition
And can be picked up for around $25 “+” or “-” just google the name.
Check out his blog –,_Android.jpg?w=640

Posted in Android | Tagged , , , | Leave a comment
Jul 27

VBSEdit and HTA Edit Quick Recommendation

VBSEdit what’s it all about…
For the past two years I’ve been scripting for customers.
At first I used simple text editors as NotePad ++ or UltraEdit but I simply wanted much more and while reviewing more then one option on the market VBS Edit seemed like the perfect fit (price and value).
With built in debugger, EXE conversions, HTA Editor included in the package, great GUI and sample scripts all for the  small price of $59 you can’t really go wrong here.
Click on read more for some screen shots and a review (not mine)

AderSoft VBS Edit website – – There is a free version but the Debugger will increment a wait timer

Read More »

Posted in Development, Scripting | Tagged , , , , , , | Leave a comment