473,809 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\\ww w\\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 2164
ji********@gmai l.com wrote:
I want to use the system command to set user's priority

$cmd = "cacls d:\\appserv\\ww w\\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\\ww w\\accountMng\\ $userName /G
$userName:F";

---
Steve

Jul 17 '05 #3
thank you :p
Steve wrote:
$cmd =
"ECHO Y | cacls d:\\appserv\\ww w\\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
6332
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 ' then datasetTarget.Tables(0).Rows.Add(myrow) dataAdapterTarget.Update(datasetTarget.Tables(0)) '*
1
1745
by: mfraser | last post by:
What is the difference between System.SystemException and System.Exception?
1
1693
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 cast System.Byte to System.Byte ? It'll happen even if I just add/change 1 character in a field already present. Does anybody know what that means? And why it happens maybe? Thanks,
2
7822
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 compile using csc /r:System.Net.dll /r:System.IO.dll pop.cs ( according to the author's instruction)
1
4914
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 specifiying my code: The Code used in Visual Studio: Function GetRank(ByVal ID As Integer, ByVal Comp As String, ByVal Sec As String, ByVal iDate As Date) As String 'Dim Ret As Integer
0
4897
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) { string requestLocation = "http://estacion15/HTTPSender/BTSHTTPReceive.dll";
5
6346
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 uniqueidentifier, originally taken from objectGUID from active directory domain)
1
3773
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 variant which appears to VB.NET as a System.Object. I want to convert this to a System.Array so that I can iterate over its elements. The VB6 usage is described at www.turbocontrol.com/TechTips/20020426.htm. If I try something similar in...
2
2069
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, bool a4); void Second(void* lic); I've converted this in MC++ dll in the following way: int First(System::String* a1, System::String* a2, System::Object* a3,
1
3105
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 either in the aspx page, or the code behind file (aspx.vb) What I have so far is:
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10639
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10383
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
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 we have to send another system

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.