473,379 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

C#: DOS commands

750 Expert 512MB
Where can i get DOS commands to do things like
1. Start/STop process
2. Start stop services.
3. Drivers: start stop drivers: win32_systemDriver startservice
4. change admin username password
5. change ip,subnet,gateway
6. clear Event logs,
7 Run exe located at "path"
8. restart shit down comp



Basically i m lookin for Dos commands for win32_operatingsystem functions, win32_process functions, win32_services function, win32_systemdrivers functions...
thx in advance
Jan 25 '08 #1
2 2272
r035198x
13,262 8TB
Where can i get DOS commands to do things like
1. Start/STop process
2. Start stop services.
3. Drivers: start stop drivers: win32_systemDriver startservice
4. change admin username password
5. change ip,subnet,gateway
6. clear Event logs,
7 Run exe located at "path"
8. restart shit down comp



Basically i m lookin for Dos commands for win32_operatingsystem functions, win32_process functions, win32_services function, win32_systemdrivers functions...
thx in advance
Have a look at both the System.Diagnostics and System.Management workspaces.
Jan 25 '08 #2
wimpos
19
1. Start/STop process
System.Diagnostics:

Expand|Select|Wrap|Line Numbers
  1.  Process.GetCurrentProcess
  2.  Process.GetProcessByName
  3.  Process.GetProcesses
4. change admin username password
Expand|Select|Wrap|Line Numbers
  1. Process.Start("cmd.exe", "net - params");
correct params are found here:
http://www.petri.co.il/change_user_p...and_prompt.htm

5. change ip,subnet,gateway
search for "netsh", when you type netsh in the commandbox, you 'll get:
Expand|Select|Wrap|Line Numbers
  1. netsh>
There you can add commands to change everything concerning network connections. You can invoke this from an application using
Expand|Select|Wrap|Line Numbers
  1. Process.Start("cmd.exe", "netsh - params");

7 Run exe located at "path"

Expand|Select|Wrap|Line Numbers
  1. Process.Start(path);

8. restart shit down comp

Expand|Select|Wrap|Line Numbers
  1. Process.Start("cmd.exe", "shutdown - params");
correct params are found here:
http://www.elitehackers.info/forums/...ad.php?p=21403


I hope this helps you out.
Jan 25 '08 #3

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

Similar topics

4
by: Mark Wilson CPU | last post by:
A colleague has written a prototype program in PHP, using a MySQL database. It's a relatively simple app, with a restricted set of mysql commands used (see below). The MySQL DB is being replaced...
12
by: Moosebumps | last post by:
So, after reading some messages about os.system, and looking at the popen stuff and trying it a bit, I still have not found a way to keep a command window open for several commands (on Windows...
4
by: Avi Kak | last post by:
Is there a Python function in any of the standard-distribution modules that does what the backticks do in Perl? I want to run an external command and I'd like its output to be captured directly...
2
by: timdoyle05 | last post by:
Hi, I have a question relating to how Unix commands can be issued from Python programs. Im am currently writing a large test script in python and I need this script to call three other separate...
2
by: Raquel | last post by:
Why can we not give db2 System commands (commands starting with 'db2' like db2ilist, db2look, db2move etc.) through the Command Center? It is so convenient to retrieve and change commands in the...
8
by: Joanna Carter [TeamB] | last post by:
Hi Folks I am just trying to get my head around whether I can use a single SQLConnection for the life of the application or whether I should create it only when needed. I want to create...
13
by: =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post by:
I am using VS2005. I created a Windows Appication project. Inside the Server Explorer, I created a new SQLExpress database, and then created a new table. I added the rows, making my first row an...
6
by: Peted | last post by:
Hi wondering what is the best way to do this Need a user to click a button, that sends 3 or 4 string based commands via a TCP/ip socket link I can connect to the ip device no problems, am...
15
by: tmp123 | last post by:
Hello, Thanks for your time. We have very big files with python commands (more or less, 500000 commands each file). It is possible to execute them command by command, like if the commands...
1
by: Riccardo Maria Bianchi | last post by:
Hello! :) I'm trying to run shell commands both with os.system() and subprocess.Popen() class. But I can't run aliases or function defined in my .bashrc file, like in the login interactive...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.