Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Executing a command line applications...

Reply
Thread Tools

Executing a command line applications...

 
 
Brad Pears
Guest
Posts: n/a
 
      09-28-2004
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


 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-28-2004
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" <> wrote in message
news:...
> 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
>
>



 
Reply With Quote
 
 
 
 
Brad Pears
Guest
Posts: n/a
 
      09-30-2004
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%...
> 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" <> wrote in message
> news:...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-30-2004
yes

"Brad Pears" <> wrote in message
news:%...
> 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%...
>> 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" <> wrote in message
>> news:...
>> > 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
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Brad Pears
Guest
Posts: n/a
 
      09-30-2004
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:...
> yes
>
> "Brad Pears" <> wrote in message
> news:%...
> > 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%...
> >> 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" <> wrote in message
> >> news:...
> >> > 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
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-30-2004


"Brad Pears" <> wrote in message
news:...
> 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


 
Reply With Quote
 
Brad Pears
Guest
Posts: n/a
 
      09-30-2004
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:...
>
>
> "Brad Pears" <> wrote in message
> news:...
> > 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
>
>



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-30-2004
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" <> wrote in message
news:%...
> 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:...
>>
>>
>> "Brad Pears" <> wrote in message
>> news:...
>> > 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
>>
>>

>
>



 
Reply With Quote
 
Brad Pears
Guest
Posts: n/a
 
      09-30-2004
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:...
> 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" <> wrote in message
> news:%...
> > 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:...
> >>
> >>
> >> "Brad Pears" <> wrote in message
> >> news:...
> >> > 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
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-30-2004
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" <> wrote in message
news:...
> 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:...
>> 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" <> wrote in message
>> news:%...
>> > 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:...
>> >>
>> >>
>> >> "Brad Pears" <> wrote in message
>> >> news:...
>> >> > 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
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing Command Line In C# jerry8989 Software 0 12-04-2008 08:05 PM
Executing a Java application from command line Sharp Tool Java 7 07-20-2005 12:10 AM
Executing a string related to source code, not the command line Arun Java 4 01-03-2005 03:26 PM
executing from command line Monkey Man Perl Misc 8 02-11-2004 07:03 AM
Perl CGI executing command line functions Nick Perl Misc 14 10-03-2003 03:05 PM



Advertisments