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

after executing system(), how can I pass "Y" to system by php?

I want to use the system command to set user's priority

$cmd = "cacls d:\\appserv\\www\\accountMng\\$userName /G $userName:F";
system($cmd);

Then it appears
Are you sure (Y/N)?

How can I pass the "Y" to system by php?

Thanks in advance.
-jiing-

Jul 17 '05 #1
3 2131
ji********@gmail.com wrote:
I want to use the system command to set user's priority

$cmd = "cacls d:\\appserv\\www\\accountMng\\$userName /G $userName:F";
system($cmd);

Then it appears
Are you sure (Y/N)?

How can I pass the "Y" to system by php?

Thanks in advance.
-jiing-


Use proc_open instead.

It's been a while since I had to dirty my hands on a Microsoft machine, and
I've never used 'cacls' but IME most MS CLI commands have a switch for
running non-interactively.

HTH

C.
Jul 17 '05 #2

$cmd =
"ECHO Y | cacls d:\\appserv\\www\\accountMng\\$userName /G
$userName:F";

---
Steve

Jul 17 '05 #3
thank you :p
Steve wrote:
$cmd =
"ECHO Y | cacls d:\\appserv\\www\\accountMng\\$userName /G
$userName:F";

---
Steve


Jul 17 '05 #4

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

Similar topics

1
by: | last post by:
When I execute the following (with an OleDBDataAdapter), wanting to add a row to a visual foxpro table: myrow= datasetTarget.Tables(0).NewRow 'fill all columns here like.. row(i)= myvalue '...
1
by: mfraser | last post by:
What is the difference between System.SystemException and System.Exception?
1
by: u022318 | last post by:
I am writing a program with MS Visual Studio .Net 2003, which reads data from a MS SQL DB. Reading the data is fine, but when I push update, so it writes the data, it get the error message invald...
2
by: Edel | last post by:
I have installed SDK 1.1 and the redist then I run : sdkvars.bat to set up the the environment. I copy a little program just try , this program is trying to connect to Yahoo mail. when I...
1
by: Hifni Shahzard | last post by:
Hi, I got a stored procedure, where it returns a value. But if I execute it. It gives an error as "Invalid cast from System.Int32 to System.Byte.". To make clear how do I execute this, below I'm...
0
by: Luis Esteban Valencia | last post by:
Hello I have this error when I submit the page with the following code. I had never see this kind of errors. Thanks private void btnsubmit_Click(object sender, System.EventArgs e) { ...
5
by: rcolby | last post by:
Evening, Wondering if someone can point me in the right direction, on how I would compare a system.guid with a system.byte. system.guid (pulled from sql server table with a data type of...
1
by: m830266 | last post by:
I'm trying to use the APAX serial I/O control (www.turbocontrol.com/AProZilla.htm) in a VB.NET project and I'm having trouble with its 'data received' events. The data is supplied by APAX as a...
2
by: sovarschizsuzsa | last post by:
Hy! I have written a MC++ wrapper DLL file for use in a C# project. This wrapper DLL is built on a C DLL. I have the following functions in the C DLL: int First(char* a1, char* a2, void* *a3,...
1
by: PianoMan64 | last post by:
Hey Guys and Gals, I'm a little stumped on this one. I'm trying to find out how to pass the System Date from the server to a SQLDatasource control. I need to know the syntax for passing that...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...

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.