Thread: What is the use of These Symbols ??

  1. #1
    Registered User
    Join Date
    Dec 2010
    Location
    Lucknow, India
    Posts
    72

    Wink What is the use of These Symbols ??

    Recently My Friend Mail me a Program Which Contain Some symbols. i never saw and use them Before..
    these are "/d /t /v /f". Actually in a line he Called system() then he use these Symbols in it.. Now here I'm stuck bcoz I never use them before.
    So someone Please help me that what is the use of these symbols "/d /t /v /f". And are there many more ??
    THANKS :-)

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    If they were being passed in a string to system, then they were command line switches for whatever program was listed before them. They don't mean anything in C.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Dec 2010
    Location
    Lucknow, India
    Posts
    72
    Actually the code is used to do Some Changes in Window's registry.. it is as Follows..
    Code:
    system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");
    Now can anyone help me out..

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    If I understand you right, those are options for the operating system command he's passing in system(" ");

    For instance, in Windows, you can use options like this to show a dir *.*, but include only the directories, or change the options, and show only the files, or show the files in a column format, or sorted by date, etc.

    Open a terminal window, and type in the system command, then 1 space then /?, and you'll see the help screen for that command. On Linux, refer to their system help.

    Edit: I don't know the command line switches for the registry, but a Google search should tell you what they are, very quickly.
    Last edited by Adak; 03-05-2011 at 10:59 PM.

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I already answered you. They are command line switches to reg. I don't care if you believe me or not. Everyone else who shows up and bothers replying to you is going to tell you the exact same thing.

    They have absolutely no meaning in C. They have nothing to do with C. Open up your command prompt and type:

    reg add HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/USBSTOR /v Start /t REGWORD_ /d 4 /f

    And it will have the same effect.


    Quzah.
    Hope is the first step on the road to disappointment.

  6. #6
    Registered User
    Join Date
    Dec 2010
    Location
    Lucknow, India
    Posts
    72
    THANKS Adak. and Quzah !! :-)

  7. #7
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    You're welcome, but be careful editing a registry!

  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Gaurav Singh View Post
    Actually the code is used to do Some Changes in Window's registry.. it is as Follows..
    Code:
    system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");
    Now can anyone help me out..
    He's disabling the usbstor service at
    hkey_local_machine\system\currentcontrolset\servic es\usbstor

    Open a command shell and type in REG /? and you'll see what he's doing.
    Setting the start value of a service to 4 disables it.

    Not exactly the smartest thing to do since it will disable his flash and disk drives connected to his USB ports...

  9. #9
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by quzah View Post
    I already answered you. They are command line switches to reg. I don't care if you believe me or not. Everyone else who shows up and bothers replying to you is going to tell you the exact same thing.

    They have absolutely no meaning in C. They have nothing to do with C. Open up your command prompt and type:

    reg add HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/USBSTOR /v Start /t REGWORD_ /d 4 /f

    And it will have the same effect.


    Quzah.
    Yeah... it will disable his USB ports...
    So I'm guessing he probably doesn't want to try that.

  10. #10
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Quote Originally Posted by quzah View Post
    I already answered you. They are command line switches to reg. I don't care if you believe me or not. Everyone else who shows up and bothers replying to you is going to tell you the exact same thing.
    @OP: What he said.
    If you understand what you're doing, you're not learning anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linux Putting my children to sleep with futex!?
    By Abs in forum Linux Programming
    Replies: 18
    Last Post: 02-12-2009, 06:43 PM
  2. Replies: 7
    Last Post: 02-02-2009, 07:27 AM
  3. Trouble with Windows/DirectX programming
    By bobbelPoP in forum Windows Programming
    Replies: 16
    Last Post: 07-08-2008, 02:27 AM
  4. Strange error?
    By MrLucky in forum C++ Programming
    Replies: 5
    Last Post: 02-04-2006, 03:01 PM
  5. symbols, no symbols, symbols ...
    By pavmarc in forum Linux Programming
    Replies: 0
    Last Post: 08-23-2005, 12:36 PM