Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling external .exe with parameters? 1

Status
Not open for further replies.

ErinMartell

Programmer
Sep 17, 2003
3
US
Hi all,

I have read numerous threads on this site about calling an .exe from a vbscript file. I can do this with no problem, however, I need to pass several parameters to my .exe. For example, if I was calling my program from the Start - Run function, I would do this:

"C:\Program Files\App\start.exe -resexport -r C:\test.txt"

How do I pass those along after I call the exe?
 
try this,

Set WshShell = CreateObject("WScript.Shell")
WshShell.Exec("C:\Program Files\App\start.exe -resexport -r C:\test.txt")
 
Here is one that runs pkzip in a command prompt with all the arguments.
Enjoy Bob

returncode=msgbox ("mount a 3.5 diskette for backup",65,"backup start")
if returncode=1 then
Set ss = CreateObject("WScript.Shell")
ss.run "COMMAND /C C:\util\pkzip.exe a:master02.zip y:\rds\rds02\master.txt ",1,TRUE
msgbox "backup is done please remove the diskette",64,"backup finished"
end if
 
Hi!

I have a similar problem & spazman's & ShadowFox's solutions work for me. I'm getting a message when I run it. I know it has to do with my security settings, but I'm wondering if there's a way to supress it without changing the settings. This is for an intranet app only.

Message:
An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow it?

TIA,

Jessica [ponytails2]
 
Toopp, Options , Security, Local Intranet

Change all the script stuff to Enabled
tou LAN Admin should be able to roll out a policy to change this.
 
Thanks! Unfortunately, while this is an intranet app, the users still have access to the internet, so I don't think that will work.

Actually how I have it is on a laptop with only access to the internet (not on a network).

Need to be able to run a file on the laptop.

Jessica [ponytails2]
 
use the Local Intranet it's a differnt zone. Will not affect your Internet settings.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top