473,480 Members | 1,847 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

i am not getting this program

5 New Member
#include<stdio.h>

void main()
{
system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Ser vices\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");
}
Sep 23 '10 #1
5 1240
Banfa
9,065 Recognized Expert Moderator Expert
It is a simple program that makes a call the to reg utility shipped with windows.

Go to a command prompt and type reg to get some simple help on that utility or try a web search.
Sep 23 '10 #2
paramjeet kaur
5 New Member
1. is system is a function ?
2. can a function can be called without declaring it ?
3. what is the use of /v,/t,/d,/f in this progrm?
Sep 23 '10 #3
Banfa
9,065 Recognized Expert Moderator Expert
system is a standard library function and it is declared in stdlib.h

In C you can call a function without declaring it although it is not advisable.

The /v /t /d /f are command line switches being passed to the reg utility.
Sep 23 '10 #4
newb16
687 Contributor
The only weird thing is escaped forward slash ( \/ ) that is not at least in C++ standard. (...If the character following a backslash is not one of those specified, the
behavior is undefined...). And yes, void main() is also nonstandard.
Sep 24 '10 #5
donbock
2,426 Recognized Expert Top Contributor
Refer to the sticky post at the front of the C answers forum: PLEASE READ FIRST: Useful Links and Posting Guidelines. The first reply in this thread contains helpful links, including two library references (note the advice that you bookmark those references). Either of those library references will lead you to a manual-page for the system function.

Library function system passes its string argument to the command shell. It is as if you typed that string in a command window. What happens next has nothing to do with C -- it depends on how your system reacts to that command string.
Sep 24 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

303
17409
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
1
1133
by: ken | last post by:
I'm using VB.Net to process information out of a word document. If the document fails a test, I would like to close it and move it to an error folder. However, when I try to do that (see below) it...
3
3669
by: dei3cmix | last post by:
Hey, I am having a problem with a program I am working on. Basically, the first part of the program gets input from a file using cin.getline. Then the second part, (still in the same main as the...
0
1507
by: brakesh | last post by:
Hi, I am trying to call a perl program (that connects a webserver database) from a php program via a webbrowser. For example : http://development.noaa.gov/test_exec.php?dataid=8313. The...
9
4400
by: Tyler | last post by:
Hello All: I am currently working on a project to create an FEM model for school. I was thinking about using wxPython to gather the 12 input variables from the user, then, after pressing the...
9
2619
by: bu0461 | last post by:
Hi this is my first post! I'm currently learning C programming language and have just finished structure section. At this point I think I'm able to program some very basic text command line games....
2
3064
by: Manikandan | last post by:
Hi, I have a program written in .Net Framework 1.1 using Visual studio enterprise edition 2003. I tried compiling the same program in visual c# express edition 2005. I'm getting following...
1
15960
by: desivirus | last post by:
hi admin.. i followed your tip in "HOW TO LIST PROCESS ID IN WINDOWS" thread..and iam trying to compile this code in cygwin , $gcc -mno-cygwin process.c -o -L"psapi.lib" process.exe psapi.h...
7
2841
by: alphasahoo | last post by:
Hi I am working on a program which writes the output a SQL select statements from number of source tables first to a load matrix and then writes to a load.dat file. But while writing to the...
4
5677
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working,...
0
6920
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
7103
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
5362
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
4499
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
3011
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
3003
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1311
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 ...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
203
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.