View Single Post
  #13   Report Post  
Posted to microsoft.public.scripting.vbscript,microsoft.public.excel.programming
Miyahn Miyahn is offline
external usenet poster
 
Posts: 9
Default How to create a self extracting zip file that starts excel with a macro

wrote in message ups.com
Hi Miyahn

Many thanks for taking time to clarify everything works fine the only
issue I have is I do not want to run the MakeSCab.vbs by right clicking
on it.

Is it possible I can specify c:\temp\scr which is the folder I am
packaging as an argument to MakeSCab.vbs and I want to create the
package by running MakeScab.vbs from command line.


Hi Karen,

My script accept one command line parameter, as it is.
If you drag and drop or use sendto, shell program invoke the script
passing the full path of the source folder as the 1st. parameter.
The script is accepting this parameter by Wscript.Arguments(0).
Please read carefully the code( and post).

So you can run the script by this syntax.
wscript full-path-of-MakeSCab.vbs full-path-of-source-folder
Note:
If full path is including space, you must put it in double quotation marks.

For example,
wscript "C:\Program Files\VBS\MakeSCab.vbs" C:\temp\scr

# I think, this way is hard to use.

--
Miyahn (Masataka Miya****a) JPN
Microsoft MVP for Microsoft Office - Excel(Jan 2005 - Dec 2005)