473,322 Members | 1,846 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,322 software developers and data experts.

Pass ASP variable to Execute in a .bat file

I'm using ASP to run a batch file. I need to know how to pass a variable to
this .bat file.

Is this possible? I'm using the following code but need to know how to pass
ASP variable.

set wshell = server.createobject("wscript.shell")
wshell.run "c:\file.bat"
set wshell = nothing

Any ideas? Or a work around?

Cory

Jul 19 '05 #1
2 6479
Okay, I did use the below code from your web site. I put the variable 'x' in
the .bat file and it did not work.

I am a little slow to catch on... But I cannot quite see how to get a
variable through to this file.bat i.e. x=value1. How can the bat file
recognize the value of x?

set wshell = server.createobject("wscript.shell")
wshell.run "c:\file.bat"
set wshell = nothing

Can you briefly explain?

Thank you,
Cory


"Cory" <co**@agency-online.com> wrote in message
news:es**************@TK2MSFTNGP11.phx.gbl...
I'm using ASP to run a batch file. I need to know how to pass a variable to this .bat file.

Is this possible? I'm using the following code but need to know how to pass ASP variable.

set wshell = server.createobject("wscript.shell")
wshell.run "c:\file.bat"
set wshell = nothing

Any ideas? Or a work around?

Cory

Jul 19 '05 #3

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

Similar topics

5
by: eagletender | last post by:
I am simply trying to pass a variable to another page. I know my second page can do Request("str") to retrieve that variable, but how do I pass it in the first place? I tried...
7
by: Zlatko Matiæ | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the...
11
by: DFS | last post by:
Architecture: Access 2003 client, Oracle 9i repository, no Access security in place, ODBC linked tables. 100 or so users, in 3 or 4 groups (Oracle roles actually): Admins, Updaters and ReadOnly....
3
by: JezB | last post by:
I know I can use the querystring mechanism to pass simple parameters to a Page using Response.Redirect, but Im having problems getting this to work using Server.Transfer or Server.Execute - is this...
3
by: ILCSP | last post by:
Hello, I'm fairly new to the concept of running action pass through queries (insert, update, etc.) from Access 2000. I have a SQL Server 2000 database and I'm using a Access 2K database as my...
9
by: One | last post by:
I have a main.php file that calls a php navigation menu. I want to pass the menu file a parameter to tell it which menu to display. Inside the main.php I have : include...
5
by: techbuddha | last post by:
Hi new to the forum and visual basic. I am attempting to fix a migration of excel to access. The excel sheets where simple copied as is into access. for example one table lists the academic...
6
by: rdstevenson | last post by:
Hi, Something I've never come across before and has given me a headache. I have a txt file with content similar to below I want to read in each line do a split on the = and then create a...
13
by: magickarle | last post by:
Hi, I got a pass-through query (that takes about 15 mins to process) I would like to integrate variables to it. IE: something simple: Select EmplID from empl_Lst where empl_lst.timestamp between...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.