Open close CD ROM for desired pc - UPDATED
-
- Registered User
- Posts: 1387
- Joined: 26 Jan 2006, 02:00
- Location: JHB
- Contact:
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:
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:
6. The file should execute on the remote users pc (silently too!!!)...and there you go - open close. If the user has no D:\ for the CDROM...nothing happens at all.
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.
EDIT: Moving this to PG 1 for easy access
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.
EDIT: Moving this to PG 1 for easy access
Last edited by SilverBack on 30 May 2008, 14:44, edited 2 times in total.
-
- Registered User
- Posts: 1387
- Joined: 26 Jan 2006, 02:00
- Location: JHB
- Contact:
-
- Registered User
- Posts: 304
- Joined: 06 Apr 2006, 02:00
- Location: Centurion, ZA
Neat-O
works lekker
works lekker
There are doorways I haven`t opened and windows I`ve yet to look through, going forward may not be the answer, maybe I should go back!
Asus P55, i5-750, 8GB DDR3, HD5770OC, Audigy2Value, 3.4TB Storage, MS Presenter Mouse 8000, G15, G25, CM Centurion5 + Musketeer, 19" CRT.
Please note: I collect Vintage Computing equipment, if you have any *really old* stuff laying about contact me please!!
Asus P55, i5-750, 8GB DDR3, HD5770OC, Audigy2Value, 3.4TB Storage, MS Presenter Mouse 8000, G15, G25, CM Centurion5 + Musketeer, 19" CRT.
Please note: I collect Vintage Computing equipment, if you have any *really old* stuff laying about contact me please!!