473,495 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Loop a shell command (batch file)

I have a form with a command button. When the command button is
clicked, it runs a batch file via the Shell command. The batch file is
run with a few variables coming from the database such as %1 and %2 for
different fields, so that a user is added to a group in active
directory, and then one of my access database fields (Date_Added) is
set to Me!Date_Added = Date.

I would like to make this more of a batch type process, where the file
is run against a query instead of pushing the button on each record. I
dont know where to start with this.

I have a query with the database field (the user ID) and I get back 25
records I want to run the batch file against. How do I loop these and
update my "Date_Added" field on each one?

Thanks for your help,
Eric

Mar 9 '06 #1
2 2602
Br
er******@gmail.com wrote:
I have a form with a command button. When the command button is
clicked, it runs a batch file via the Shell command. The batch file is
run with a few variables coming from the database such as %1 and %2
for different fields, so that a user is added to a group in active
directory, and then one of my access database fields (Date_Added) is
set to Me!Date_Added = Date.

I would like to make this more of a batch type process, where the file
is run against a query instead of pushing the button on each record.
I dont know where to start with this.

I have a query with the database field (the user ID) and I get back 25
records I want to run the batch file against. How do I loop these and
update my "Date_Added" field on each one?

Thanks for your help,
Eric


Maybe communicate directly with AD instead?
(I only use SQL Server T-SQL to modify SQL accounts or giving existing
Windows accounts access to SQL Server).
--
regards,

Br@dley
Mar 9 '06 #2
Do you have any examples on how to do that?

Mar 9 '06 #3

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

Similar topics

0
7063
by: Kyle | last post by:
To any who chose to provide an answer, or even any suggestions to this problem, I thank you greatly in advance. +200 pts. for any valid solutions. I am currently in the process of converting a...
1
15166
by: Rob | last post by:
I'm running a batch file using the Shell function. When I manually launch the batch file, the window remains open, since I use the 'pause' statement. But when I launch the batch file within...
1
15973
by: Dennis Gaida | last post by:
Hi there, I want to upload some exported reports to a FTP Server, for this I use a command line FTP utility. My Database sits in C:\Documents and Settings\Dennis\My Documents\Database The FTP...
1
1736
by: robboll | last post by:
I have a batch file (RunFiles.bat) as follows: Dir C: *.* /s > C:\AllFiles.txt It copies all directories and subdirectories to a text file in the C:\ drive called AllFiles.txt When I run...
9
9311
by: Amjad | last post by:
I'm trying to create a folder, append text file to another, and delete files using the "Shell" command. But I always get the error "File Not Found". How do I use DOS commands from Visual Basic?...
6
7627
by: Hugh Janus | last post by:
Hi group, I am executing a shell command that calls a .BAT file. I have to wait for this batch file to finish so I use the wait = true parameter in the shell command. However, this means that...
4
2348
by: G. Miller | last post by:
Hey, I'm trying to automate an import routine by using the shell command to call a batch file that will run a vendor export utility before continuing with the import. The problem is that...
25
62421
by: dennijr | last post by:
ok, shell always used to be easy for me, now its starting to get annoying cause i dont know wats wrong heres the simplist code possible: Private Sub IExplorer_Click() a = Shell("C:\Program...
3
6715
by: Max Vit | last post by:
I have come across a strange issue whilst trying to use a shell command call from Access and have spent some time trying to figure this out but can't find the cause as yet. The issue is: I need...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7196
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7373
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.