View Single Post
  #11   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 oups.com
Hi Miyahn

Here is the script changes I did:

Const DESTROOT = "C:\TEMP\" ' Install Target


and the following is the setup.vbs

With CreateObject("Excel.Application")
.Visible = True
.Workbooks.Open "C:\temp\test.xls"
End With


Path Should be "C:\temp\scr\test.xls

The self-extracting cabinet file create a folder under DESTROOT which
has same name of the source folder.
So in yor case, the self-extracting cabinet file is over writing already existing
files.(test.xls,Setup.vbs,etc.)

Also, instead of dragging and dropping the folder to be packaged onto
createcab.vbs script can you please let me know what changes I must do
to it so I can run in batch and specify say a command line argument of
the folder to be packaged and the destination and file name of the .exe
file.


I recommend to save MakeSCab.vbs or short-cut to the script into
SendTo folder.
Then you can invoke the script by right-clicking source folder - 'SendTo'
- MakeSCab.vbs.

If you want 2nd or 3rd parameter to specify the destination and EXE name,
change DESTROOT from constant to variable, and using Wscript.Argumets'
item, change DESTROOT value and rename the output file.

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