jiataifeng Posted August 31, 2022 Posted August 31, 2022 It seems the program is working differently from RUN function. just click to run, it's working fine. thanks.
Danp2 Posted August 31, 2022 Posted August 31, 2022 Have you taken a look at _WinAPI_GetProcessWorkingDirectory? P.S. When you say "click to run", are you dealing with a shortcut that could be setting the working directory as part of its configuration? Latest Webdriver UDF Release Webdriver Wiki FAQs
jiataifeng Posted August 31, 2022 Author Posted August 31, 2022 (edited) Thank you for your interest and help. It's exe file, not shortcut. Tried to use _WinAPI_GetProcessWorkingDirectory to the the working dir, but when use the dir getton from the API function to run the program, the it didn't run as expected. It means the working dir isn't correct. Edited August 31, 2022 by jiataifeng
Danp2 Posted August 31, 2022 Posted August 31, 2022 Post your code. Latest Webdriver UDF Release Webdriver Wiki FAQs
jiataifeng Posted September 1, 2022 Author Posted September 1, 2022 (edited) I noticed the problem is gone with the admin windows account. I was testing with user account. So the problem turns to how to run a program as admin with non-admin user bypass UAC. I tried to use runas, but it didn't work/ RunAs("admin","domain.com","adminpass",4,"cmd.exe",@WindowsDir) Is it possible to use runas to open a window like this? I noticed whatever the account I used to open the cmd windows, it's non-admin one. Thank you very much Edited September 1, 2022 by jiataifeng
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