By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,855 Members | 1,970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,855 IT Pros & Developers. It's quick & easy.

Executing a command line applications...

P: n/a
Can someone give me some sample code on how one would go about executing a
command line "command" from within an ASP form?

We need to run an application called GnuPG which allows us to encrypt an
email.

Preferably some documentation directly on this would be good but any other
docuemtnation on executing a command line "command" would be great!

Thanks,

Brad
Jul 19 '05 #1
Share this Question
Share on Google+
18 Replies


P: n/a
Take a look at the .Run method of the WScript.Shell method in the Microsoft
Windows Scripting Host documentation.
(http://www.microsoft.com/downloads/d...6-1C4099D7BBB9)

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:er*************@TK2MSFTNGP10.phx.gbl...
Can someone give me some sample code on how one would go about executing a
command line "command" from within an ASP form?

We need to run an application called GnuPG which allows us to encrypt an
email.

Preferably some documentation directly on this would be good but any other
docuemtnation on executing a command line "command" would be great!

Thanks,

Brad

Jul 19 '05 #2

P: n/a
This will work in an ASP script? ( I know nothing about ASP) I am getting
this documetnation for someone who only knows a bit more than me!!!

Thanks,

Brad
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:O%****************@TK2MSFTNGP15.phx.gbl...
Take a look at the .Run method of the WScript.Shell method in the Microsoft Windows Scripting Host documentation.
(http://www.microsoft.com/downloads/d...2C48-207D-4BE1
-8A76-1C4099D7BBB9)
Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:er*************@TK2MSFTNGP10.phx.gbl...
Can someone give me some sample code on how one would go about executing a command line "command" from within an ASP form?

We need to run an application called GnuPG which allows us to encrypt an
email.

Preferably some documentation directly on this would be good but any other docuemtnation on executing a command line "command" would be great!

Thanks,

Brad


Jul 19 '05 #3

P: n/a
yes

"Brad Pears" <do********@notreal.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
This will work in an ASP script? ( I know nothing about ASP) I am getting
this documetnation for someone who only knows a bit more than me!!!

Thanks,

Brad
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:O%****************@TK2MSFTNGP15.phx.gbl...
Take a look at the .Run method of the WScript.Shell method in the

Microsoft
Windows Scripting Host documentation.

(http://www.microsoft.com/downloads/d...2C48-207D-4BE1
-8A76-1C4099D7BBB9)

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:er*************@TK2MSFTNGP10.phx.gbl...
> Can someone give me some sample code on how one would go about
> executing a > command line "command" from within an ASP form?
>
> We need to run an application called GnuPG which allows us to encrypt
> an
> email.
>
> Preferably some documentation directly on this would be good but any other > docuemtnation on executing a command line "command" would be great!
>
> Thanks,
>
> Brad
>
>



Jul 19 '05 #4

P: n/a
OK, do you have to add a reference somewhere to "wscript.shell" in order to
use it's methods within an ASP script or will it "just be available"??

To use this in a VB or Access project, what reference would you add?

Thanks,

brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:e5**************@TK2MSFTNGP15.phx.gbl...
yes

"Brad Pears" <do********@notreal.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
This will work in an ASP script? ( I know nothing about ASP) I am getting this documetnation for someone who only knows a bit more than me!!!

Thanks,

Brad
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:O%****************@TK2MSFTNGP15.phx.gbl...
Take a look at the .Run method of the WScript.Shell method in the

Microsoft
Windows Scripting Host documentation.

(http://www.microsoft.com/downloads/d...2C48-207D-4BE1 -8A76-1C4099D7BBB9)

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:er*************@TK2MSFTNGP10.phx.gbl...
> Can someone give me some sample code on how one would go about
> executing

a
> command line "command" from within an ASP form?
>
> We need to run an application called GnuPG which allows us to encrypt
> an
> email.
>
> Preferably some documentation directly on this would be good but any

other
> docuemtnation on executing a command line "command" would be great!
>
> Thanks,
>
> Brad
>
>



Jul 19 '05 #5

P: n/a


"Brad Pears" <do********@notreal.com> wrote in message
news:OS**************@TK2MSFTNGP15.phx.gbl...
OK, do you have to add a reference somewhere to "wscript.shell" in order
to
use it's methods within an ASP script or will it "just be available"??
You'd just create the object with CreateObject("WScript.Shell"). The object
will have its properties and methods available to itself!

To use this in a VB or Access project, what reference would you add?


Windows Script Host Object Model, I'd imagine. But as this is an ASP group,
I wouldn't trust this answer as fact.

Ray at work
Jul 19 '05 #6

P: n/a
in ASP would you this then...

set WshShell = CreateObject("Wscript.Shell")
WshShell.run "some command to run"

the documentation you pojted me to uses
"set WshShell = Wscript.CreateObject not just the CreateObject function...

WHich is correct in ASP?

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:OV**************@TK2MSFTNGP10.phx.gbl...


"Brad Pears" <do********@notreal.com> wrote in message
news:OS**************@TK2MSFTNGP15.phx.gbl...
OK, do you have to add a reference somewhere to "wscript.shell" in order
to
use it's methods within an ASP script or will it "just be available"??
You'd just create the object with CreateObject("WScript.Shell"). The

object will have its properties and methods available to itself!

To use this in a VB or Access project, what reference would you add?
Windows Script Host Object Model, I'd imagine. But as this is an ASP

group, I wouldn't trust this answer as fact.

Ray at work

Jul 19 '05 #7

P: n/a
Yes, just CreateObject. Have you even made an ASP page yet? Instead of
just talking about the theoreticals, you may find it more helpful to start
playing with some code in an ASP page.

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
in ASP would you this then...

set WshShell = CreateObject("Wscript.Shell")
WshShell.run "some command to run"

the documentation you pojted me to uses
"set WshShell = Wscript.CreateObject not just the CreateObject function...

WHich is correct in ASP?

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:OV**************@TK2MSFTNGP10.phx.gbl...


"Brad Pears" <do********@notreal.com> wrote in message
news:OS**************@TK2MSFTNGP15.phx.gbl...
> OK, do you have to add a reference somewhere to "wscript.shell" in
> order
> to
> use it's methods within an ASP script or will it "just be available"??


You'd just create the object with CreateObject("WScript.Shell"). The

object
will have its properties and methods available to itself!

> To use this in a VB or Access project, what reference would you add?


Windows Script Host Object Model, I'd imagine. But as this is an ASP

group,
I wouldn't trust this answer as fact.

Ray at work


Jul 19 '05 #8

P: n/a
Yes, our graphic designer already has the page done. We do not have ASP
here - she can only run it on our providers windows box. I'll will give her
this test code to see if she can get simehting simply like a "dir" to
work...

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:e8**************@TK2MSFTNGP15.phx.gbl...
Yes, just CreateObject. Have you even made an ASP page yet? Instead of
just talking about the theoreticals, you may find it more helpful to start
playing with some code in an ASP page.

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
in ASP would you this then...

set WshShell = CreateObject("Wscript.Shell")
WshShell.run "some command to run"

the documentation you pojted me to uses
"set WshShell = Wscript.CreateObject not just the CreateObject function...
WHich is correct in ASP?

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:OV**************@TK2MSFTNGP10.phx.gbl...


"Brad Pears" <do********@notreal.com> wrote in message
news:OS**************@TK2MSFTNGP15.phx.gbl...
> OK, do you have to add a reference somewhere to "wscript.shell" in
> order
> to
> use it's methods within an ASP script or will it "just be available"??
You'd just create the object with CreateObject("WScript.Shell"). The

object
will have its properties and methods available to itself!
> To use this in a VB or Access project, what reference would you add?

Windows Script Host Object Model, I'd imagine. But as this is an ASP

group,
I wouldn't trust this answer as fact.

Ray at work



Jul 19 '05 #9

P: n/a
Well, just remember that is ASP, there is no interface to see when you
execute DIR... You'd have to dump the results to a file on the server and
read that or read the StdOut of the command... Good luck trying to write
and debug code without a server to work on there! That's rough! You don't
have any Windows NT, 2000, or XP Pro machines even? All you have to do is
install IIS, which comes with those OSes, and there you have ASP support.

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
Yes, our graphic designer already has the page done. We do not have ASP
here - she can only run it on our providers windows box. I'll will give
her
this test code to see if she can get simehting simply like a "dir" to
work...

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:e8**************@TK2MSFTNGP15.phx.gbl...
Yes, just CreateObject. Have you even made an ASP page yet? Instead of
just talking about the theoreticals, you may find it more helpful to
start
playing with some code in an ASP page.

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
> in ASP would you this then...
>
> set WshShell = CreateObject("Wscript.Shell")
> WshShell.run "some command to run"
>
> the documentation you pojted me to uses
> "set WshShell = Wscript.CreateObject not just the CreateObject function... >
> WHich is correct in ASP?
>
> Thanks,
>
> Brad
>
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
> message news:OV**************@TK2MSFTNGP10.phx.gbl...
>>
>>
>> "Brad Pears" <do********@notreal.com> wrote in message
>> news:OS**************@TK2MSFTNGP15.phx.gbl...
>> > OK, do you have to add a reference somewhere to "wscript.shell" in
>> > order
>> > to
>> > use it's methods within an ASP script or will it "just be available"?? >>
>> You'd just create the object with CreateObject("WScript.Shell"). The
> object
>> will have its properties and methods available to itself!
>>
>>
>> > To use this in a VB or Access project, what reference would you add?
>>
>> Windows Script Host Object Model, I'd imagine. But as this is an ASP
> group,
>> I wouldn't trust this answer as fact.
>>
>> Ray at work
>>
>>
>
>



Jul 19 '05 #10

P: n/a
Hey, I never knew that!!!

Yes, we have NT, 2000 and XP... IIS is installed on one of our win2k
servers. How do I setup a test ASP page???

Remember, I'm knew to this!

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ot**************@TK2MSFTNGP09.phx.gbl...
Well, just remember that is ASP, there is no interface to see when you
execute DIR... You'd have to dump the results to a file on the server and
read that or read the StdOut of the command... Good luck trying to write
and debug code without a server to work on there! That's rough! You don't have any Windows NT, 2000, or XP Pro machines even? All you have to do is
install IIS, which comes with those OSes, and there you have ASP support.

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
Yes, our graphic designer already has the page done. We do not have ASP
here - she can only run it on our providers windows box. I'll will give
her
this test code to see if she can get simehting simply like a "dir" to
work...

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:e8**************@TK2MSFTNGP15.phx.gbl...
Yes, just CreateObject. Have you even made an ASP page yet? Instead of just talking about the theoreticals, you may find it more helpful to
start
playing with some code in an ASP page.

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
> in ASP would you this then...
>
> set WshShell = CreateObject("Wscript.Shell")
> WshShell.run "some command to run"
>
> the documentation you pojted me to uses
> "set WshShell = Wscript.CreateObject not just the CreateObject

function...
>
> WHich is correct in ASP?
>
> Thanks,
>
> Brad
>
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in > message news:OV**************@TK2MSFTNGP10.phx.gbl...
>>
>>
>> "Brad Pears" <do********@notreal.com> wrote in message
>> news:OS**************@TK2MSFTNGP15.phx.gbl...
>> > OK, do you have to add a reference somewhere to "wscript.shell" in
>> > order
>> > to
>> > use it's methods within an ASP script or will it "just be

available"??
>>
>> You'd just create the object with CreateObject("WScript.Shell"). The > object
>> will have its properties and methods available to itself!
>>
>>
>> > To use this in a VB or Access project, what reference would you add? >>
>> Windows Script Host Object Model, I'd imagine. But as this is an ASP > group,
>> I wouldn't trust this answer as fact.
>>
>> Ray at work
>>
>>
>
>



Jul 19 '05 #11

P: n/a
Put your asp page in the home directory of your Web site. If you're looking
for tutorials on things like this, try www.iisfaq.com or results from
Google. IIS configuration is beyond the scope of this group.

Ray at work
"Brad Pears" <do********@notreal.com> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
Hey, I never knew that!!!

Yes, we have NT, 2000 and XP... IIS is installed on one of our win2k
servers. How do I setup a test ASP page???

Remember, I'm knew to this!

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ot**************@TK2MSFTNGP09.phx.gbl...
Well, just remember that is ASP, there is no interface to see when you
execute DIR... You'd have to dump the results to a file on the server
and
read that or read the StdOut of the command... Good luck trying to write
and debug code without a server to work on there! That's rough! You

don't
have any Windows NT, 2000, or XP Pro machines even? All you have to do
is
install IIS, which comes with those OSes, and there you have ASP support.

Jul 19 '05 #12

P: n/a
Ray, I am able to run ASP using IIS BUT, are there any freely available
tools out there I can use to modify ASP pages?

I was able to downlaod and install a trial version of ASPRunner which
generates a bunch of ASP pages automatically for you from given DB tables.
However, if you need to make any mods to them, you need an ASP SDK of some
sort. We do not have an ASP product installed here. There must be some
freebie tool out there...

Thanks,

Brad
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:ed**************@TK2MSFTNGP14.phx.gbl...
Put your asp page in the home directory of your Web site. If you're looking for tutorials on things like this, try www.iisfaq.com or results from
Google. IIS configuration is beyond the scope of this group.

Ray at work
"Brad Pears" <do********@notreal.com> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
Hey, I never knew that!!!

Yes, we have NT, 2000 and XP... IIS is installed on one of our win2k
servers. How do I setup a test ASP page???

Remember, I'm knew to this!

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ot**************@TK2MSFTNGP09.phx.gbl...
Well, just remember that is ASP, there is no interface to see when you
execute DIR... You'd have to dump the results to a file on the server
and
read that or read the StdOut of the command... Good luck trying to write and debug code without a server to work on there! That's rough! You

don't
have any Windows NT, 2000, or XP Pro machines even? All you have to do
is
install IIS, which comes with those OSes, and there you have ASP support.


Jul 19 '05 #13

P: n/a
All you need is a text editor. Notepad will do. Personally, I use Textpad.
Here's a breakdown of some popular editors that people use.
http://www.aspfaq.com/show.asp?id=2500

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Ray, I am able to run ASP using IIS BUT, are there any freely available
tools out there I can use to modify ASP pages?

I was able to downlaod and install a trial version of ASPRunner which
generates a bunch of ASP pages automatically for you from given DB tables.
However, if you need to make any mods to them, you need an ASP SDK of some
sort. We do not have an ASP product installed here. There must be some
freebie tool out there...

Jul 19 '05 #14

P: n/a
So what do I do? Do I just edit the .asp form then?

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Oy**************@TK2MSFTNGP10.phx.gbl...
All you need is a text editor. Notepad will do. Personally, I use Textpad. Here's a breakdown of some popular editors that people use.
http://www.aspfaq.com/show.asp?id=2500

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Ray, I am able to run ASP using IIS BUT, are there any freely available
tools out there I can use to modify ASP pages?

I was able to downlaod and install a trial version of ASPRunner which
generates a bunch of ASP pages automatically for you from given DB tables. However, if you need to make any mods to them, you need an ASP SDK of some sort. We do not have an ASP product installed here. There must be some
freebie tool out there...


Jul 19 '05 #15

P: n/a
What does one normally do with a text editor? Yes, you open
C:\Inetpub\wwwroot\yourfile.asp and write your html and ASP code.

<html>
<head>
</head>
<body>
Date and time: <%=Now%>
</body>
</html>

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:us***************@TK2MSFTNGP11.phx.gbl...
So what do I do? Do I just edit the .asp form then?

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Oy**************@TK2MSFTNGP10.phx.gbl...
All you need is a text editor. Notepad will do. Personally, I use

Textpad.
Here's a breakdown of some popular editors that people use.
http://www.aspfaq.com/show.asp?id=2500

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> Ray, I am able to run ASP using IIS BUT, are there any freely available
> tools out there I can use to modify ASP pages?
>
> I was able to downlaod and install a trial version of ASPRunner which
> generates a bunch of ASP pages automatically for you from given DB tables. > However, if you need to make any mods to them, you need an ASP SDK of some > sort. We do not have an ASP product installed here. There must be some
> freebie tool out there...



Jul 19 '05 #16

P: n/a
Ok, we have Visual Studio .NET loaded and I was able to open an ASP page
using that.

Now I have a direct ASP related question for you ...

In Access or VB (non web based) if I wanted to edit check the value a user
is entering into a field, I would place some code on the text field, or on a
command button somewhere to validate - basic editing we are talking about...
How do I do this in ASP?? There isn't a "form" per se, so where do I place
code that I want to run when a user clicks a button or enters data in a
particular field?

For instance, If I wanted to do a test, and duplicated a line defining a
button and give it a different name, I suspect I would then see this new
buttoin show up on the form when I run the project next time, but how would
I reference this in the code so that whenever I click it, the code will run?

Here is a button definition line I added...

input class=button type=button value="Test" ID="Test1" NAME="Test1"

How do I reference this so that when it is clicked, the code will run? I am
used to on click events and such so this is very new to me...

Thanks,

Brad

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Oy**************@TK2MSFTNGP10.phx.gbl...
All you need is a text editor. Notepad will do. Personally, I use Textpad. Here's a breakdown of some popular editors that people use.
http://www.aspfaq.com/show.asp?id=2500

Ray at work

"Brad Pears" <do********@notreal.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Ray, I am able to run ASP using IIS BUT, are there any freely available
tools out there I can use to modify ASP pages?

I was able to downlaod and install a trial version of ASPRunner which
generates a bunch of ASP pages automatically for you from given DB tables. However, if you need to make any mods to them, you need an ASP SDK of some sort. We do not have an ASP product installed here. There must be some
freebie tool out there...


Jul 19 '05 #17

P: n/a

"Brad Pears" <do********@notreal.com> wrote in message
news:eZ****************@TK2MSFTNGP10.phx.gbl...
Ok, we have Visual Studio .NET loaded and I was able to open an ASP page
using that.

Now I have a direct ASP related question for you ...


I suggest you start a new thread for a new question. Otherwise you'll
probably only get an answer from me instead of getting a handful of answers,
some of which may be better than mine. :]

Ray at work
Jul 19 '05 #18

P: n/a
Good point - thanks Ray I appreciate your help thus far.

Brad
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eZ****************@TK2MSFTNGP09.phx.gbl...

"Brad Pears" <do********@notreal.com> wrote in message
news:eZ****************@TK2MSFTNGP10.phx.gbl...
Ok, we have Visual Studio .NET loaded and I was able to open an ASP page
using that.

Now I have a direct ASP related question for you ...
I suggest you start a new thread for a new question. Otherwise you'll
probably only get an answer from me instead of getting a handful of

answers, some of which may be better than mine. :]

Ray at work

Jul 19 '05 #19

This discussion thread is closed

Replies have been disabled for this discussion.