jdelaney Posted March 15, 2012 Share Posted March 15, 2012 (edited) 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 March 15, 2012 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. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 15, 2012 Moderators Share Posted March 15, 2012 Hi, Jdelaney. Are you running the script FROM the remote PC, or using the script itself to execute remote commands through something like psexec? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
jdelaney Posted March 15, 2012 Author Share Posted March 15, 2012 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. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 15, 2012 Moderators Share Posted March 15, 2012 Please post your script (or a working reproducer) so we can assist Are you using RDP, or some other remote tool? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
jdelaney Posted March 15, 2012 Author Share Posted March 15, 2012 (edited) 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 March 15, 2012 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. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 15, 2012 Moderators Share Posted March 15, 2012 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. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
jdelaney Posted March 15, 2012 Author Share Posted March 15, 2012 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now