473,287 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Run Self-extracting exe

Hi
I have an exe which is actually a self-extracting zip file that i would like
to run to extract all the files.
I have the code showing how to use the j# classes and library to extract zip
files however it looks like these work on zip files only, not exe.

Does anyone know how to get around this? I would like to do it all without
having any user input. Using process.start() works however this asks the
user where to extract the files to which I don't want to do.
Nov 16 '05 #1
3 5484
Hello to anyone else who is interested in this issue.
I have had no joy in finding a way of making the code itself extract the exe
therefore i have created a workaround. I have created a vb script that runs
the exe file and sends the required commands to work through the user
interface. A copy of this is below.
I hope this is useful to others.

wenz
Option Explicit

Dim objShell

Set objShell = WScript.CreateObject("WScript.Shell")

'Run the application
objShell.Run "CdData.exe", 9

'Sleep and then send the tab, tab and enter keys to select the unzip button
on
'the zip dialog box
WScript.Sleep 500
objShell.sendKeys "{tab}"
objShell.sendKeys "{tab}"
objShell.SendKeys "{enter}"

'sleep and then select enter to accept the dialog box advising files have
'been unzipped
WScript.Sleep 1000
objShell.SendKeys "{enter}"

'send four tabs and then the enter key to select the close button
objShell.sendKeys "{tab}"
objShell.sendKeys "{tab}"
objShell.sendKeys "{tab}"
objShell.sendKeys "{tab}"
objShell.SendKeys "{enter}"
"wenz" wrote:
Hi
I have an exe which is actually a self-extracting zip file that i would like
to run to extract all the files.
I have the code showing how to use the j# classes and library to extract zip
files however it looks like these work on zip files only, not exe.

Does anyone know how to get around this? I would like to do it all without
having any user input. Using process.start() works however this asks the
user where to extract the files to which I don't want to do.

Nov 16 '05 #2
Are there no command-line arguments to the self-extracting exe that
tell it to extract "silently" to a specific directory, rather than
throwing up the user interface?

I would think that you could just execute the exe from your j# program
and pass it the required command-line parameters...?

Nov 16 '05 #3
Thanks Bruce, that's a good suggestion. I'm a complete newbie at this and
running the vbscript was the first option I thought of after searching for
ages for a possible solution in c#. There may be a way to run it silently
however I couldn't find in my searching.

wenz

"Bruce Wood" wrote:
Are there no command-line arguments to the self-extracting exe that
tell it to extract "silently" to a specific directory, rather than
throwing up the user interface?

I would think that you could just execute the exe from your j# program
and pass it the required command-line parameters...?

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Marc | last post by:
Hi all, I was using Tkinter.IntVar() to store values from a large list of parts that I pulled from a list. This is the code to initialize the instances: def initVariables(self): self.e =...
15
by: Ralf W. Grosse-Kunstleve | last post by:
****************************************************************************** This posting is also available in HTML format: http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html...
18
by: Ralf W. Grosse-Kunstleve | last post by:
My initial proposal (http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html) didn't exactly get a warm welcome... And Now for Something Completely Different: class autoinit(object):...
4
by: David Coffin | last post by:
I'd like to subclass int to support list access, treating the integer as if it were a list of bits. Assigning bits to particular indices involves changing the value of the integer itself, but...
4
by: marek.rocki | last post by:
First of all, please don't flame me immediately. I did browse archives and didn't see any solution to my problem. Assume I want to add a method to an object at runtime. Yes, to an object, not a...
7
by: Andrew Robert | last post by:
Hi Everyone, I am having a problem with a class and hope you can help. When I try to use the class listed below, I get the statement that self is not defined. test=TriggerMessage(data) var...
24
by: Peter Maas | last post by:
The Python FAQ 1.4.5 gives 3 reasons for explicit self (condensed version): 1. Instance variables can be easily distinguished from local variables. 2. A method from a particular class can be...
84
by: braver | last post by:
Is there any trick to get rid of having to type the annoying, character-eating "self." prefix everywhere in a class? Sometimes I avoid OO just not to deal with its verbosity. In fact, I try to...
13
by: Kurda Yon | last post by:
Hi, I found one example which defines the addition of two vectors as a method of a class. It looks like that: class Vector: def __add__(self, other): data = for j in range(len(self.data)):...
6
by: Bart Kastermans | last post by:
I am playing with some trees. In one of the procedures I wrote for this I am trying to change self to a different tree. A tree here has four members (val/type/left/right). I found that self = SS...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.