all groups > inetserver asp db > september 2004 >
inetserver asp db :
Executing a command line applications...
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
Take a look at the .Run method of the WScript.Shell method in the Microsoft Windows Scripting Host documentation. ( http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9) Ray at work [quoted text, click to view] "Brad Pears" <donotreply@notreal.com> wrote in message news:erULpdZpEHA.868@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 > >
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%23DW0gZpEHA.3392@TK2MSFTNGP15.phx.gbl... [quoted text, click to view] > Take a look at the .Run method of the WScript.Shell method in the Microsoft > Windows Scripting Host documentation. >
( http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1 -8A76-1C4099D7BBB9) [quoted text, click to view] > > Ray at work > > "Brad Pears" <donotreply@notreal.com> wrote in message > news:erULpdZpEHA.868@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 > > > > > >
yes [quoted text, click to view] "Brad Pears" <donotreply@notreal.com> wrote in message news:%2306ofrvpEHA.556@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%23DW0gZpEHA.3392@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/details.aspx?FamilyId=01592C48-207D-4BE1 > -8A76-1C4099D7BBB9) >> >> Ray at work >> >> "Brad Pears" <donotreply@notreal.com> wrote in message >> news:erULpdZpEHA.868@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 >> > >> > >> >> > >
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:e5LaovvpEHA.3524@TK2MSFTNGP15.phx.gbl... [quoted text, click to view] > yes > > "Brad Pears" <donotreply@notreal.com> wrote in message > news:%2306ofrvpEHA.556@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%23DW0gZpEHA.3392@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/details.aspx?FamilyId=01592C48-207D-4BE1 > > -8A76-1C4099D7BBB9) > >> > >> Ray at work > >> > >> "Brad Pears" <donotreply@notreal.com> wrote in message > >> news:erULpdZpEHA.868@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 > >> > > >> > > >> > >> > > > > > >
[quoted text, click to view] "Brad Pears" <donotreply@notreal.com> wrote in message news:OSDKQ2vpEHA.3668@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! [quoted text, click to view] > 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
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:OVWr78vpEHA.2032@TK2MSFTNGP10.phx.gbl... [quoted text, click to view] > > > "Brad Pears" <donotreply@notreal.com> wrote in message > news:OSDKQ2vpEHA.3668@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 > >
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 [quoted text, click to view] "Brad Pears" <donotreply@notreal.com> wrote in message news:%23pBUXUwpEHA.324@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:OVWr78vpEHA.2032@TK2MSFTNGP10.phx.gbl... >> >> >> "Brad Pears" <donotreply@notreal.com> wrote in message >> news:OSDKQ2vpEHA.3668@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 >> >> > >
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:e8dETYwpEHA.3668@TK2MSFTNGP15.phx.gbl... [quoted text, click to view] > 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" <donotreply@notreal.com> wrote in message > news:%23pBUXUwpEHA.324@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:OVWr78vpEHA.2032@TK2MSFTNGP10.phx.gbl... > >> > >> > >> "Brad Pears" <donotreply@notreal.com> wrote in message > >> news:OSDKQ2vpEHA.3668@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 > >> > >> > > > > > >
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 [quoted text, click to view] "Brad Pears" <donotreply@notreal.com> wrote in message news:egijebwpEHA.3424@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:e8dETYwpEHA.3668@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" <donotreply@notreal.com> wrote in message >> news:%23pBUXUwpEHA.324@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:OVWr78vpEHA.2032@TK2MSFTNGP10.phx.gbl... >> >> >> >> >> >> "Brad Pears" <donotreply@notreal.com> wrote in message >> >> news:OSDKQ2vpEHA.3668@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 >> >> >> >> >> > >> > >> >> > >
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:OtDghhwpEHA.1816@TK2MSFTNGP09.phx.gbl... [quoted text, click to view] > 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" <donotreply@notreal.com> wrote in message > news:egijebwpEHA.3424@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:e8dETYwpEHA.3668@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" <donotreply@notreal.com> wrote in message > >> news:%23pBUXUwpEHA.324@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:OVWr78vpEHA.2032@TK2MSFTNGP10.phx.gbl... > >> >> > >> >> > >> >> "Brad Pears" <donotreply@notreal.com> wrote in message > >> >> news:OSDKQ2vpEHA.3668@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 > >> >> > >> >> > >> > > >> > > >> > >> > > > > > >
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 [quoted text, click to view] "Brad Pears" <donotreply@notreal.com> wrote in message news:egraYKxpEHA.3068@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:OtDghhwpEHA.1816@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, 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:edDkbQxpEHA.3252@TK2MSFTNGP14.phx.gbl... [quoted text, click to view] > 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" <donotreply@notreal.com> wrote in message > news:egraYKxpEHA.3068@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:OtDghhwpEHA.1816@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. > >> > >
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 [quoted text, click to view] "Brad Pears" <donotreply@notreal.com> wrote in message news:%23ZxUuP9pEHA.3520@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...
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:Oyluwp9pEHA.2032@TK2MSFTNGP10.phx.gbl... [quoted text, click to view] > 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" <donotreply@notreal.com> wrote in message > news:%23ZxUuP9pEHA.3520@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... > >
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 [quoted text, click to view] "Brad Pears" <donotreply@notreal.com> wrote in message news:us7ZXN%23pEHA.324@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:Oyluwp9pEHA.2032@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" <donotreply@notreal.com> wrote in message >> news:%23ZxUuP9pEHA.3520@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... >> >> > >
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:Oyluwp9pEHA.2032@TK2MSFTNGP10.phx.gbl... [quoted text, click to view] > 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" <donotreply@notreal.com> wrote in message > news:%23ZxUuP9pEHA.3520@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... > >
[quoted text, click to view] "Brad Pears" <donotreply@notreal.com> wrote in message news:eZdv$i%23pEHA.3012@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
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:eZ1pQv%23pEHA.3592@TK2MSFTNGP09.phx.gbl... [quoted text, click to view] > > "Brad Pears" <donotreply@notreal.com> wrote in message > news:eZdv$i%23pEHA.3012@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 > >
Don't see what you're looking for? Try a search.
|
|
|