Jump to content
Sign in to follow this  
jdelaney

Auto Launch CD on remoted station

Recommended Posts

jdelaney

This probably is more of a windows question, but related to a script I'm running. When I'm remoted into my computer, and load a CD (mounting an ISO, or opening and closing the CDTray), windows does not auto-launch the application on the disk. When I am logged in directly, it does. Any ideas to workaround that?

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, Jdelaney. Are you running the script FROM the remote PC, or using the script itself to execute remote commands through something like psexec?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
jdelaney

I'm remoted in, and running the script on the client (my station). My host station (current) is not executing any script.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
JLogan3o13

Please post your script (or a working reproducer) so we can assist :oops: Are you using RDP, or some other remote tool?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
jdelaney

Yes, MSTSC(RDP)...script (simplified to only do what is needed to replicate):

$WinHnd = Run ( @ComSpec )
sleep ( 5000 )
WinActivate ( $WinHnd )
Send ( "C:UsersjdelaneyDesktopcd.vbs {Enter}")

and the .vbs:

call Close ()

Sub Close()

Set oWMP = CreateObject("WMPlayer.OCX.7" )

Set colCDROMs = oWMP.cdromCollection

if colCDROMs.Count >= 1 then

For i = 0 to colCDROMs.Count - 1

colCDROMs.Item(i).Eject

Next ' cdrom

For i = 0 to colCDROMs.Count - 1

colCDROMs.Item(i).Eject

Next

End If

End Sub

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
JLogan3o13

I would suggest trying with the built in CDTray function in AutoIt, and see if that works for you. That way you can at least narrow it down to the AutoIt script or your vbscript (not to mention fewer lines). Try the example in the help file and let us know if that does not work for you.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
jdelaney

I will, but the script functions fine, it's the system environment that seems to be the issue...everything is fine locally, when logged in, it's just teh rdp that is choking. No luck on google, but others have the same problem.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×