OnePiece Posted July 17, 2011 Share Posted July 17, 2011 (edited) maybe this helps http://msdn.microsoft.com/en-us/library/ms927178.aspxhttp://msdn.microsoft.com/en-us/library/dd375731%28v=vs.85%29.aspxCiao. Edited July 17, 2011 by OnePiece Quote Link to comment Share on other sites More sharing options...
bphlpt Posted July 18, 2011 Share Posted July 18, 2011 The problem is the ALT key. CTL + S is an easily defined value. When you add the ALT key it ends up being quite different. It's like trying to find the value sent by CTL + ALT + Del. All references I found described writing a program to send the code. Sorry I couldn't be of much help.Cheers and Regards Quote Link to comment Share on other sites More sharing options...
ricktendo Posted July 18, 2011 Author Share Posted July 18, 2011 Someone with time may have to painstakingly do them one by one and map the keyboard Quote Link to comment Share on other sites More sharing options...
bphlpt Posted July 18, 2011 Share Posted July 18, 2011 CREDIT - I referred to the following:http://www.jimprice.com/jim-asc.shtmlCharts are copied from there. My ASCII Chart (Hex) 0 1 2 3 4 5 6 7 8 9 A B C D E F0 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI1 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US2 SP ! " # $ % & ' ( ) * + , - . /3 0 1 2 3 4 5 6 7 8 9 : ; < = > ?4 @ A B C D E F G H I J K L M N O5 P Q R S T U V W X Y Z [ \ ] ^ _6 ` a b c d e f g h i j k l m n o7 p q r s t u v w x y z { | } ~ DELAnother version of the table that includes Decimal, Hex, Octal, and HTML values can be found here - http://www.asciitable.com/index/asciifull.gifFrom my own experimentations, I've found that CTL effects the key codes in a "linear" manner. From the table above, the codes, in Hex, for A, B, C, D are 0x41, 0x42, 0x43, 0x44. CTL+A, CTL+B, CTL+C, CTL+D yielded 0x01, 0x02, 0x03, 0x04. My simple test program yielded the same results for CTL+a, CTL+b, CTL+c, CTL+d as CTL+A, CTL+B, CTL+C, CTL+D.A table showing how ALT effects the value transmitted is this one: IBM PC Keyboard Scan CodesFor many of the special key combinations such as ALT-A, F1, PgUp, and so forth,the IBM PC uses a special two-character escape sequence. Depending on the programminglanguage being used and the level at which the keyboard is being accessed, the escapecharacter is either ESC (27, 0x1B), or NUL (0). Here are some common sequences:Char. Decimal Pair Hex Pair Char. Decimal Pair Hex PairALT-A (00,30) (0x00,0x1e) ALT-B (00,48) (0x00,0x30)ALT-C (00,46) (0x00,0x2e) ALT-D (00,32) (0x00,0x20)ALT-E (00,18) (0x00,0x12) ALT-F (00,33) (0x00,0x21)ALT-G (00,34) (0x00,0x22) ALT-H (00,35) (0x00,0x23)ALT-I (00,23) (0x00,0x17) ALT-J (00,36) (0x00,0x24)ALT-K (00,37) (0x00,0x25) ALT-L (00,38) (0x00,0x26)ALT-M (00,50) (0x00,0x32) ALT-N (00,49) (0x00,0x31)ALT-O (00,24) (0x00,0x18) ALT-P (00,25) (0x00,0x19)ALT-Q (00,16) (0x00,0x10) ALT-R (00,19) (0x00,0x13)ALT-S (00,31) (0x00,0x1a) ALT-T (00,20) (0x00,0x14)ALT-U (00,22) (0x00,0x16) ALT-V (00,47) (0x00,0x2f)ALT-W (00,17) (0x00,0x11) ALT-X (00,45) (0x00,0x2d)ALT-Y (00,21) (0x00,0x15) ALT-Z (00,44) (0x00,0x2c)PgUp (00,73) (0x00,0x49) PgDn (00,81) (0x00,0x51)Home (00,71) (0x00,0x47) End (00,79) (0x00,0x4f)UpArrw (00,72) (0x00,0x48) DnArrw (00,80) (0x00,0x50)LftArrw (00,75) (0x00,0x4b) RtArrw (00,77) (0x00,0x4d)F1 (00,59) (0x00,0x3b) F2 (00,60) (0x00,0x3c)F3 (00,61) (0x00,0x3d) F4 (00,62) (0x00,0x3e)F5 (00,63) (0x00,0x3f) F6 (00,64) (0x00,0x40)F7 (00,65) (0x00,0x41) F8 (00,66) (0x00,0x42)F9 (00,67) (0x00,0x43) F10 (00,68) (0x00,0x44)F11 (00,133) (0x00,0x85) F12 (00,134) (0x00,0x86)ALT-F1 (00,104) (0x00,0x68) ALT-F2 (00,105) (0x00,0x69)ALT-F3 (00,106) (0x00,0x6a) ALT-F4 (00,107) (0x00,0x6b)ALT-F5 (00,108) (0x00,0x6c) ALT-F6 (00,109) (0x00,0x6d)ALT-F7 (00,110) (0x00,0x6e) ALT-F8 (00,111) (0x00,0x6f)ALT-F9 (00,112) (0x00,0x70) ALT-F10 (00,113) (0x00,0x71)ALT-F11 (00,139) (0x00,0x8b) ALT-F12 (00,140) (0x00,0x8c)Hint - If you look at how the keys are laid out on the keyboard, you'll probably see the pattern.My VERY simple test program could not display these paired codes so I could not verify them, but I have no reason to doubt them. But as a result, I could also not display the paired codes created by CTL+ALT+A, etc. I assume it will also be a paired code, but I have not found a reference to describe what is actually produced. I've found AutoIT scripts that emulate these key presses, but those references also do not describe what the actual key codes are. Sorry I couldn't be of more help.Cheers and Regards Quote Link to comment Share on other sites More sharing options...
Geej Posted July 18, 2011 Share Posted July 18, 2011 Just to share a few things. I got it set sucessfully asHotKey =0x653 ; hex 200 + 400 + 53 where 200 is Ctrl +400 is Alt +53 is SThanks to ricktendo64, OnePiece & bphlpt for some thought & info on this.I google around and found this vb forum post (small software) where you press a key and it returns dec & hex code.Might be useful somehow without going to MSDN for the keycodes.http://www.vbforums.com/showthread.php?t=499084Download 1st post attachment, extract and find in bin folder, keycodes.exe (found it can run standalone)So while fiddling with combination of hex codes, found Shift + (which might be useful)has 0x115 or 0x107 (yes both codes set the same hotkey)Since 200 = Ctrl + and 400 = Alt + , it might means some other values might also be valid for Ctrl + and Alt + respectively.Just need to know which value. (I was googling when I stumbled 200 & 400 value and I didn't take note of the url. But it was from a vb forum thread where some codes are posted for Ctrl + and shift +. Unfortunately, the thread did not indicate how it derived these values as discussion was something else)With this info, bphlpt, setting Ctrl + Alt + A hotkey is much easier now.Just add these hex code: 200 + 400 + 41You don't have to install Pretty Run to test. I made another simple inf for anyone who wish to test. I use "Disk Defragmenter.lnk" that is found in Accessories\systen Tools on XP so that you can see the effect.(View the .lnk properties before applying this inf test)[Version]Signature=$Windows NT$[DefaultInstall]ProfileItems=Start.Shortcut1[Start.Shortcut1]Name =%ShortcutN1%,0x8,23SubDir =%ProfileSubdir%CmdLine =11,,dfrg.mscWorkingDir=11;HotKey ="Ctrl + Alt + A" ;Desired hotkeyHotKey =0x641 ; hex 200 + 400 + 41; where A=0x41Infotip =Defragments your volumes so that your computer runs faster and more efficiently.[Strings]ShortcutN1=Disk DefragmenterProfileSubdir=Accessories\System ToolsNow, just press Ctrl + Alt + A and wait for Disk Defragmenter to launch.Now we have some real solution to this thing but do not know if it is consistent globally or just limited to English US 101 keyboard . Same thing to consider when running on laptop or non-english keyboard such as Japanese / French etc. What if it is english keyboard but not 101 type? I really don't know. Perhaps "Windows SDK documentation" might throw the rest of the light over this issue, but then it is yet another mystery to find out. (lol)Cheers bphlpt and mona 2 Quote Link to comment Share on other sites More sharing options...
ricktendo Posted July 18, 2011 Author Share Posted July 18, 2011 Gr8 work, another INF mystery solved Quote Link to comment Share on other sites More sharing options...
bphlpt Posted July 19, 2011 Share Posted July 19, 2011 Great work Geej! I guess your finding the post telling you that "200 = Ctrl + and 400 = Alt +" was key. I tried verifying the keycodes by using keycodes.exe which you referenced and was unable to do it.I'm on Win7 x32 using a Logitech keyboard. When running the keycodes.exe, I found that it displays the keycode information of the LAST key-up that occurs. I was unable to get it to display multi-key info, ie if I have CTL+Alt+A pressed, when I release them it only displays the info of whichever of those single keys is the LAST one to lift, even if only by a few microseconds. So keycodes.exe is unable to confirm those values of "200 = Ctrl + and 400 = Alt +". For the keys by themselves, keycodes.exe shows Ctrl=11(Hex) and Alt=12(Hex). So were you able to use keycodes.exe for anything useful for this particular problem, of did you only rely on the "200 = Ctrl + and 400 = Alt +" reference?Cheers and Regards Quote Link to comment Share on other sites More sharing options...
Geej Posted July 20, 2011 Share Posted July 20, 2011 So were you able to use keycodes.exe for anything useful for this particular problem, of did you only rely on the "200 = Ctrl + and 400 = Alt +" reference?Cheers and RegardsI face the same situation as you. keycodes.exe is not much use when using combined keystroke. I relied on "200 = Ctrl + and 400 = Alt +" reference only.Found a more reliable alternative solution. Query the shortcut's properties using Shortcut v1.11 (console tool, shortcut.exe)It returns a dec value. Then use windows calculator to convert dec to hexFor Ctrl + Alt +A, dec value return is 1601 which then converted to 641 in hex. tada @echo offShortcut /F:"%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\System Tools\Disk Defragmenter.lnk" /A:Qpause bphlpt 1 Quote Link to comment Share on other sites More sharing options...
ricktendo Posted July 20, 2011 Author Share Posted July 20, 2011 Now all we need to know is how to set Run: Normal Window/Minimized/Maximized and well have EVERYTHING!!! covered Quote Link to comment Share on other sites More sharing options...
bphlpt Posted July 20, 2011 Share Posted July 20, 2011 @GeejThe Shortcut tool you found seems to be a wonderful way to confirm the keycode! ie when you have created the link along with the desired Hotkey, then the Shortcut Tool can then be used to verify what the keycode is that equates to that Hotkey. I guess we just have to rely on remembering the "200 = Ctrl + and 400 = Alt +" trick for the actual creating of the Hotkey keycode in the first place. Thank you for pursuing this so diligently.Cheer and Regards Quote Link to comment Share on other sites More sharing options...
Guest Posted October 3, 2011 Share Posted October 3, 2011 I need corrected of this command to use in inf file,i want unload with this commandor something like this,before delete file in uninstall sectionCMD /Q /S CD /D %16422%\Utility\T-Clock2010\Win32\clock.exe /exit Quote Link to comment Share on other sites More sharing options...
ricktendo Posted October 3, 2011 Author Share Posted October 3, 2011 You could use UnregisterDLLs to call it or RunPreSetupCommands, either way this is how that would go (might only work with advpack.dll,LaunchINFSection)[UnregDLLsection]16422,Utility\T-Clock2010\Win32,clock.exe,,,"/exit"; Or[RunPreSetupSection]"""%16422%\Utility\T-Clock2010\Win32\clock.exe"" /exit" mona 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 4, 2011 Share Posted October 4, 2011 thanks great work Quote Link to comment Share on other sites More sharing options...
Guest Posted October 12, 2011 Share Posted October 12, 2011 You could use UnregisterDLLs to call it or RunPreSetupCommands, either way this is how that would go (might only work with advpack.dll,LaunchINFSection)[UnregDLLsection]16422,Utility\T-Clock2010\Win32,clock.exe,,,"/exit"; Or[RunPreSetupSection]"""%16422%\Utility\T-Clock2010\Win32\clock.exe"" /exit"Hii used below command to delete folders in uninstal section but in uninstalling show cmd windowhow can hide this window?RunPostSetupCommands = dirappdel[dirappdel]CMD /Q /C DEL /f /s /q """%16410%\SumatraPDF"""CMD /Q /C RMDIR /s /q """%16410%\SumatraPDF""" Quote Link to comment Share on other sites More sharing options...
ricktendo Posted October 12, 2011 Author Share Posted October 12, 2011 What are you using to call it?If you are using RunPre/PostSetupCommands add a :1 to the end of the name of the section you want to hide (dont add it to the actual section just the [uninstall] one, same as you do for tskill/taskkill)RunPreSetupCommands=Close.Sidebar:1[Close.Sidebar]TSKILL sidebarBut I would better recommend this for deleting folders[Del.Gadgets.Settings]RUNDLL32 advpack.dll,DelNodeRunDLL32 %16422%\%GADS%,8RUNDLL32 advpack.dll,DelNodeRunDLL32 %16422%\%SHGADS%,8RUNDLL32 advpack.dll,DelNodeRunDLL32 %16422%\%VISXORG%,1RUNDLL32 advpack.dll,DelNodeRunDLL32 %16412%\%WINSIDE%,8RUNDLL32 advpack.dll,DelNodeRunDLL32 %16412%\%WINLIVE%,8These are the numbers you can useDelete Folder1 // delete the directory only if it's empty2 // don't delete any sub-dirs; delete only the files4 // don't delete the dir itself8 // delete UNC [network] paths mona 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 12, 2011 Share Posted October 12, 2011 (edited) your tips very good now it hide cmd windowi using it to sure it actually delete folder and file,sometimes it dont delete with DelDirseven if i define folder.but also even when use TSKILL to kill exe process if on the same directory one txt file openeddirectory dont deleted.how can delete this folder?it can be do like below,add it uninstall section so on the next log off directory deleted,but i want deleteit without log offAddReg = Sum000.addreg[sum000.addreg]HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\softs","Delete3",0,"cmd /c RD /S /Q ""%userprofile%\Application Data\SumatraPDF""" Edited October 12, 2011 by mona Quote Link to comment Share on other sites More sharing options...
ricktendo Posted October 12, 2011 Author Share Posted October 12, 2011 Try 16410AddReg = Sum000.addreg[Sum000.addreg]HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\softs","Delete3",0,"RUNDLL32 advpack.dll,DelNodeRunDLL32 ""%16410%\SumatraPDF"",8" mona 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 12, 2011 Share Posted October 12, 2011 (edited) i know this with your tips but not possible do delete without RunOnceEx?actually i use this for folder have dll shell extensions for delete folder on the next logoff Edited October 12, 2011 by mona Quote Link to comment Share on other sites More sharing options...
ricktendo Posted October 12, 2011 Author Share Posted October 12, 2011 No, not if its in use Quote Link to comment Share on other sites More sharing options...
Guest Posted October 12, 2011 Share Posted October 12, 2011 thanks best regards Quote Link to comment Share on other sites More sharing options...
ricktendo Posted October 12, 2011 Author Share Posted October 12, 2011 Anytime...gotta keep the legacy going, INF addons is a dying art form Quote Link to comment Share on other sites More sharing options...
Guest Posted October 21, 2011 Share Posted October 21, 2011 Now all we need to know is how to set Run: Normal Window/Minimized/Maximized and well have EVERYTHING!!! coveredhi rickcheck below linkthis for URL File Format to set window state,but seems dont work in inf file,or maybe somthing like thisShow Command =7(Nothing) Normal7 Minimized3 Maximizedhttp://www.cyanwerks.com/file-format-url.html Quote Link to comment Share on other sites More sharing options...
ricktendo Posted October 21, 2011 Author Share Posted October 21, 2011 Nice find and you are right it does not work, it only works with inside .url files wich are nothing really but .ini files with a .url extension (I use updateinis to create my bitlocker2go url, it does appear to work this way)[defaultinstall]UpdateInis=BitLocker2Go.ReadMe.AddUrl[BitLocker2Go.ReadMe.AddUrl]%01%\readme.url,InternetShortcut,,URL=http://go.microsoft.com/fwlink/?LinkId=129765%01%\readme.url,InternetShortcut,,ShowCommand=7 mona 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.