Jetixil
asked on
Executing a string as a command
Hi,
I have read a string from some key in the registry, this string contains a command which should run to uninstall something.... how do i execute the command which i have found in the registry(i have written this command into a string)?
Thank You.
I have read a string from some key in the registry, this string contains a command which should run to uninstall something.... how do i execute the command which i have found in the registry(i have written this command into a string)?
Thank You.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For example if your string is something like
String str = "Application.exe /u";
then split it using String[] strings = str.Split(' ')
and the execute with the following statement
Process.Start(strings[0], strings[1]);
Let me know for further assistance.