473,546 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
+ 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_MACH INE\\SYSTEM\\Cu rrentControlSet \\Services\\USB STOR \/v Start \/t REG_DWORD \/d 4 \/f");
}
Sep 23 '10 #1
5 1242
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
17452
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. Yahoo store was originally written in Lisp. c. Emacs The issues with these will probably come up, so I might as well mention them myself (which...
1
1141
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 says that another process is using the document. Is there some way to force the move to wait for the doc to close? Thanks. Dim wrd As...
3
3677
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 first part) needs to get input from the user, and I want to do this with cin.getline also. The problem I am getting, is when I run the program, the...
0
1514
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 test_exec.php script that calls the perl program is as follows: <?php error_log("inside test_exec \n"); $dataid = $_GET; $cmd = "/usr/bin/perl...
9
4407
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 "Run" button, the GUI would close, and the 12 input variables would then be available for the rest of the program. So far, what I have been able to...
9
2626
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. However the truth is I already see some technical difficulties at the planning level. I wish there are some relatively simple solutions to my...
2
3068
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 errors 1.Error 6 Cannot implicitly convert type 'mscomctl.Toolbar ' to 'mscomctl.Toolbar . An explicit conversion exists (are you missing a
1
15967
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 and psapi.lib are in this same folder as process.c file, i am getting lonf list of errors from psapi.lib Process.c (from...
7
2851
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 load.dat file, the program gets stuck if I am putting float variables getting rounded to 8 or 9 decimal places. But runs fine if the float variable...
4
5691
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, commercially sold application with only partial build instructions. The previous maintainer of the code (a mixture of C and C++) is no longer with the...
0
7698
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. ...
0
7947
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...
1
7461
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...
0
7794
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...
1
5361
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...
0
3492
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...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1922
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
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.