I have found code for opening a cd/dvd rom, but looking for code where you can add a computer name, and it does that on the computer. Anyone know if this is possible?
Edit:
UPDATED 30-05-2008
Ok, I will make the update to check all drives in due time. For now I will add the source code, EXE and the PSExec tool download link as it is. Most pc users have their CD ROM drives as D:\. Feel free to change the app as needed and use as you please. Its very simple, so ja...not the best way of coding it...but it does what I need. So if you dont agree with the way I have done it (source code wise) feel free to make it even better! I have no problem with that at all
Where is it?
Download the zip file (191KB) from:
http://www.2shared.com/file/3362919/d6c ... penCD.html
What is in the zip file?
1. The complete source code written in C#.NET
2. The psexec.exe file for running apps on a remote pc
3. OpenCD.EXE is found in the bin folder. This is all you need (no compiling of code needed, unless you make an update)
How do I use it?
1. Copy the psexec.exe file to YOUR C:\. Only the EXE needs to be copied. So the file path of the psexec.exe will be C:\psexec.exe on YOUR pc
2. Copy the OpenCD.exe to the remote users pc, and place it where ever you want. I changed the name of OpenCD.exe to tdv.exe, purely so if the user finds it, they wont know what it does. I also added it to the WINDOWS folder on their pc so there was little hope they would find it.
3. Im CMD prompt, make sure YOU are in the C:\ of YOUR pc as the psexec.exe can only be run from CMD prompt on your pc, in the location it was saved (C:\ in this example). To find out how psexec.exe works, go to:
4. Please note this only works on computers in your domain.
5. Now that the OpenCD.exe has been copied to C:\WINDOWS\opencd\OpenCD.exe (in this example & on the remote users pc), run the following command in YOUR CMD prompt by typing in:
Code: Select all
psexec \\COMPUTERNAME "C:\WINDOWS\opencd\OpenCD.exe"
Code provided as is, and what you do with it is up to you. You break something (as it is it wont break anything....change something, that could be a diff story), it aint my prob. New update will be added to this thread later.