Nas Posted October 14, 2019 Posted October 14, 2019 (edited) Hello everyone, So I have a script that needs to run a program : ShellExecuteWait("tsconfig.msc") But I was unable to run it, I found out because it was 64x program so I run this command : DllCall("kernel32.dll", "boolean", "Wow64EnableWow64FsRedirection", "boolean", 0) Now I am able to run it, but I am unable to interact it with it in any way: Case $BClose DllCall("kernel32.dll", "boolean", "Wow64EnableWow64FsRedirection", "boolean", 0) ShellExecuteWait("tsconfig.msc") Sleep(100) WinActivate("Remote Desktop Session Host Configuration") Send("{ENTER}") When I close the tsconfig program then the script continue and press that enter, but before close in it , it just stops !! Edited October 14, 2019 by Nas
Developers Jos Posted October 14, 2019 Developers Posted October 14, 2019 Is it running with the same credentials at the same level? Have you tried #RequireAdmin in your script? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
AdamUL Posted October 14, 2019 Posted October 14, 2019 You are using ShellExecuteWait. The script is not going to do anything until the mmc.exe is closed. Use ShellExecute instead, and WinWaitActive. Adam Werty 1
Nas Posted October 14, 2019 Author Posted October 14, 2019 @AdamUL Thank you sir, It did work. Case $BClose DllCall("kernel32.dll", "boolean", "Wow64EnableWow64FsRedirection", "boolean", 0) ShellExecute("tsconfig.msc") Sleep(100) WinWaitActive("Remote Desktop Session Host Configuration") Send("{ENTER}")
AdamUL Posted October 14, 2019 Posted October 14, 2019 @Nas Your welcome. I'm glad I could help. Adam
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