Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Change settings in windows from java/c++


  • Please log in to reply
5 replies to this topic

#1 vigge_sWe

vigge_sWe

  • Members
  • 55 posts
  • OFFLINE
  •  
  • Local time:12:14 PM

Posted 19 June 2010 - 01:22 PM

I wonder if it is possible to change windows-settings in java/cmd or c++? Like enabling/disabling a network device, turning on/off wireless, bluetooth etc etc.

BC AdBot (Login to Remove)

 


#2 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:04:14 AM

Posted 19 June 2010 - 01:52 PM

Considering Windows itself is written in C, I'd certainly hope that it'd be possible to change settings using C or C++. Batch files (cmd) are limited in what they are able to do without support from real programs.

Java might be able to do things like this, but it's not good for this application. The point of Java is to be cross platform compatible, not systems administration of a specific platform.

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#3 vigge_sWe

vigge_sWe
  • Topic Starter

  • Members
  • 55 posts
  • OFFLINE
  •  
  • Local time:12:14 PM

Posted 19 June 2010 - 03:42 PM

Considering Windows itself is written in C, I'd certainly hope that it'd be possible to change settings using C or C++. Batch files (cmd) are limited in what they are able to do without support from real programs.

Java might be able to do things like this, but it's not good for this application. The point of Java is to be cross platform compatible, not systems administration of a specific platform.

Billy3


You know any tutorials for doing it in C++? I tried searching google but I don't really know what exactly to search for :s

#4 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:04:14 AM

Posted 19 June 2010 - 03:46 PM

Windows components all have their own APIs. It's hard to find a tutorial about "doing something to windows settings" ... what matters is *what* you want to do.
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#5 vigge_sWe

vigge_sWe
  • Topic Starter

  • Members
  • 55 posts
  • OFFLINE
  •  
  • Local time:12:14 PM

Posted 20 June 2010 - 11:47 AM

I actually found a way using CMD.

netsh interface set interface name="Local Area Connection" admin=disabled

Now I can do it in java so I don't have to learn C++ for now, but I'll probably do when I have more time (going on vacation in a week) :D

#6 Synetech

Synetech

  • Members
  • 149 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Canada
  • Local time:07:14 AM

Posted 11 August 2010 - 05:22 PM

Yes, itís usually easy to script things (look at PowerShell for example), but if you want to actually program them, youíll need to figure out exactly what you want to accomplish, then find the appropriate API call(s). I doubt youíll find a generic page of code examples to do stuff. There are countless settings and they are changed in all manner of ways (some can be changed by simply making a registry change, some need to edit a file, some must call a service, etc.)
****** *** ****** * ****; * ***** **** ** *** **** ******* *** ****** ************ ****.

-- Synetech




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users