vb script for login ctrl alt del - vb6

When you start your system and see message press CTRL ALT DEL. after that normally you see security warning and you have to press OK. What I like to do is write a vb script which automatically press OK for me.
Can someone please let me know if its possible to write a script which will click on OK.
I can't disable CTRL ALT DEL on system as this is control by GPO.

You cannot accomplish this with scripting. However, I believe there is a registry trick you can do to accomplish what you desire.
Check out http://www.velikan.net/automatic-login-windows-account.

Related

ahk send alternative in bash script

I want to achieve in a bash script, that when I press any key (e.g. F5) and then type any word (e.g. "hello world"), regardless of whether I positioned in the terminal, or text-editor or browser...
While I was using Windows, then I used Autohotkey for that.
How could I achieve that with bash script in Linux?
While as #Socowi mentioned, you will likely not be able to do this with bash alone, you can use AutoHotkey Linux alternatives like AutoKey for this.
For your specific question, see this guide for setting up and configuring AutoKey on Linux.
More specifically, scroll down to the section labeled "Inserting repetitive text using a hotkey" for how to configure a text-typing hotkey:
Inserting repetitive text using a hotkey
Abbreviations is only one way of inserting text using AutoKey. If you
prefer, you can also insert text using a keyboard shortcut, which
doesn't require typing an abbreviation.
To insert some text that you need to type frequently using a keyboard
shortcut, click the Set button next to Hotkey, then click Press to Set
in the newly opened window, and press the key combination you want to
use for this phrase:
Make sure you use a hotkey that's not already in use or else it may
not work / it will interfere with the already set hotkey. To try this
out, set it to something like Ctrl + F1 (which shouldn't be set by the
system at least).
Remember to click the Save button in the AutoKey toolbar after setting
the phrase hotkey, or else the changes won't have any effect. Now try
it out: focus a text editor, some text field in a web form, etc., and
press the hotkey you've set in AutoKey - the Testing AutoKey text
expansion on Linux phrase should be automatically inserted as soon as
you press the keyboard shortcut.

a basic keystroke map

I downloaded AutoHotKey today and read the tutorial. What I want to do is have an F2 key do a shift-ctrl-S in one application. I cannot figure out how to do that by reading the tutorial. How can I do it?
Firstly, install autohotkey on your system.
Once installed, create a text file and save it as .ahk (rather than .txt).
Within the file, at the end, type the following code:
F2::Send +^s
Save the file then double click it to run the program.
This will change F2 to your shift-control-s in ALL applications.
To make it application-specific, when running, right click on the icon in the taskbar and choose "Windows Spy". Click into the application you want to use the F2 shortcut in and make a note of the line just below >>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
Now, change your script to this:
#IfWinActive INSERTWindowsSpyWindowTitleHERE
F2::Send +^s
#IfWinActive
Obviously making sure to change INSERTWindowsSpyWindowTitleHERE to what you got from windows spy.
Save and run your script. Autohotkey will now only make F2 do that shortcut when the window (found via Windows spy) is active. (The last #IfWinActive is used to "reset" checking for that window in code below where this is typed - useful if you're going to type more autohotkey code in the future)

Assign VBS Script to a Keyboard Shortcut

I have a very basic VBS script that I plan on using frequently on my Windows 7 machine. Is there any way I can bind it to a keyboard shortcut so I don't have to navigate to it through Explorer obnoxiously.
I realize this question does not directly pertain to programming, or even scripting for that matter, but I could not find a straight answer online or through my own experimentation. I'm sure that there is a simple solution somewhere...
Thank you for taking the time to read, and hopefully respond to my inquiry.
Evin Ugur.
Windows does have built-in support for shell shortcut keys, where a keypress is used to invoke an *.lnk file that launches your VBScript (using either cscript or wscript).
Create a shortcut file, have it invoke your VBScript file directly or run cscript or wscript with the appropriate arguments, then save it and open its Properties sheet and set a keystroke in the "Shortcut key" field (I suggest something like Ctrl+Alt+K).
Like so:
Then, whenever you press Ctrl+Alt+K, regardless of the active application, your script will be invoked.
A more heavy-duty alternative is AutoHotKey: http://www.autohotkey.com/
Just as an FYI.
I tried this and I was not able to register the hotkey when I had the Icon in a costume folder. Even if I added the hotkey, it failed to work.
Once I moved the icon to the "C:\ProgramData\Microsoft\Windows\Start Menu\Programs", the hotkey started to work.

how to Create my own shortcut key as Ctrl Alt Del

I need to create my own shortcut key, as in when we press Ctrl + Alt + Delete we get the task manager, likewise i need to click some other 2 keys to execute my program.
How should i do this ?
and also i need to know what language i need to program this?
I am using Windows Vista as my OS.
I think what he means is he wants to be able to create shortcut keys in his application.
If you're using Visual Studio, you can do this through the visual designer in menu options.
Anyways, I hope this article sheds some light onto the situation:
http://support.microsoft.com/kb/839201
You tagged vb, and this article explains it in VB as well as C#.
Good luck.
I think you want to use a hotkey under AutoHotKey to run another program. Once you have an autohotkey script running, you can also add keys to perform actions within that program, set up other keys to launch other programs, etc. See entries under StackOverflow's 'autohotkey' tag and other help pages referred to from those links.
Create a shortcut that performs the Ctrl-Alt-Del action for you
(very useful in environments where OSK is not accessible). Create a shortcut to the following:
C:\Windows\explorer.exe shell:::{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}
Double-click that shortcut to access the Ctrl-Alt-Del screen. Now you can forget about the inception through multiple RDP.

vbscript SendKey

I have a process I need to run which can only be run by shortcut keys which are CTRL+ALT+RIGHT SHIFT
To make it easier for users I would like to create a desktop shortcut to click on to run this shortcut.
The way I thought this could be done is by vbs script sendkey.
Am I right in my research to say that right shift key can not be specified?
I know there is ^% for CTRL and ALT and + for generic shift but that does not work for right shift.
Is there a way for me to do this?
I recommend that you use AutoHotkey.
It has a very robust, proven "sendkey" functionality, including the ability to send right shift.
Your script would simply be:
SendInput,^!{RSHIFT}
Furthermore, it comes with a utility that will compile the script into a .exe, which is what you'd want to use on the desktop.
I use my own open source software "sendkeys v0.0.1" for this. You can compile it as a C# console application in Visual Studio 2013.
Source: Sendkey v0.0.1
Then use it in a command window like this:
Sendkey CONTROL down
Sendkey MENU down
Sendkey RSHIFT down
Sendkey CONTROL up
Sendkey MENU up
Sendkey RSHIFT up
Or in vbscript using the .Exec() method.
(N.B. command window is Microsoft slang for 'terminal' or 'console')

Resources