Jump to content

Recommended Posts

Posted

I need to run "run", same thing as when you press windows + R. "run" does not create a new process, so i'm a little unsure how to launch it,

besides sending keys such as windows + R

 

 

Udklip.PNG

Posted

Don't know if it works in other versions of Windows but I tested it in Windows 8.1:

ShellExecute(@UserProfileDir & '\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Run')

 

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

  • Moderators
Posted

Or, as AutoIt contains both a Run and a ShellExecute function you could make your script more efficient, bypass the Run box altogether, and save yourself a couple of lines.

"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!

Posted (edited)
5 hours ago, badcoder123 said:

Also

Run("C:\WINDOWS\system32\rundll32.exe shell32.dll,#61")

 

Just two questions for leaning: 

1. Why did you call shell32? Why not another dll? 

2. What does #61 stand for? Such as I tried with #62 (to test) and nothing happens. And where do you get a list of this? 

Edited by taylansan

TY.

Posted

Similar to the original question, how can I perform other operations such as: 

  • Windows + L = to lock the computer
  • Windows + P = to switch to the projector

Besides sending keys... If I call shell32 again, which function # would it be? 

TY.

Posted
5 minutes ago, JLogan3o13 said:

@taylansan Google is your friend. A simple search of "Shell32 dll functions list" returns everything you would want to know.

Thanks brother, I did check the list of functions and searched for the keywords such as "lock" or "projector", but couldn't find any proper. 

http://www.geoffchappell.com/studies/windows/shell/shell32/api/index.htm

Yet, I'm asking it for learning way, how to know which function it would be.

TY.

Posted

literally search for "command to lock windows"

https://www.google.com/search?q=command+to+lock+windows

I imagine the first return is going to look eerily similar to @badcoder123's solution.  Or use the spoiler.

 

rundll32.exe user32.dll, LockWorkStation

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Posted
8 hours ago, taylansan said:

Similar to the original question, how can I perform other operations such as: 

  • Windows + L = to lock the computer
  • Windows + P = to switch to the projector

Besides sending keys... If I call shell32 again, which function # would it be? 

Run("C:\WINDOWS\system32\rundll32.exe user32.dll, LockWorkStation") 
;or
Run("rundll32.exe user32.dll, LockWorkStation")

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...