Cum zicea poetul Posted October 15, 2009 Share Posted October 15, 2009 (edited) Here is the body of the INF file, I included the section with the strings, so you can see where everything is taken from.[Version]Signature = $Windows NT$[DefaultInstall];UpdateInis=CreateStartMenuFolderAddReg = RegAddUninstProfileItems = AddTest, AddTestEx[DefaultUnInstall]ProfileItems=AddTest.DelShortcut[AddTest.DelShortcut]Name =ACME distorterA,0x0000000A, 2;Also tried with Name =%Soft_Name%,0x0000000A, 2;SubDir =Sub Directory[RegAddUninst]HKLM,%SMWCV%\Uninstall\%Soft_Name%,DisplayName,,"ACME"HKLM,%SMWCV%\Uninstall\%Soft_Name%,UninstallString,,"RunDll32 advpack.dll,LaunchINFSection d:\test\installer\installer.inf, DefaultUninstall";16422 = program files[AddTest]Name = ACME distorterA SubDir = %Provider%Infotip = "This is a tooltip weeha!"CmdLine = -1, %App_ProgramFolder%, Acmedist.exe WorkingDir = -1, %App_ProgramFolder%[AddTestEx]Name = %Soft_Name%SubDir = %Provider%Infotip = "This is a tooltip weeha!QQQQQQ"CmdLine = -1, %App_ProgramFolder%, Acmedist.exe WorkingDir = -1, %App_ProgramFolder%[Strings]SMWCV="Software\Microsoft\Windows\CurrentVersion"Provider="ACME"Soft_Name="ACME distorter 5.0"AppLink="ACME distorter 5.0"App_Name="ACME distorter 5.0"App_StartMenuFolder="ACME\Distorter 5.0"App_ProgramFolder="ACME\Distorter 5.0"ShortCutFileName="ACME\Distorter 5.0.lnk"PathAndFileName="ACMEdist.exe"Arguments= ""I tried using "0x0000000A,2", as suggested by DaRk MaDnEsS, but the result is the same - the shortcut continues to stay in the Start menu. Edited October 15, 2009 by Cum zicea poetul Quote Link to comment Share on other sites More sharing options...
Guest Posted October 15, 2009 Share Posted October 15, 2009 (edited) Here is the body of the INF file, I included the section with the strings, so you can see where everything is taken from.[Version]Signature = $Windows NT$[DefaultInstall];UpdateInis=CreateStartMenuFolderAddReg = RegAddUninstProfileItems = AddTest, AddTestEx[DefaultUnInstall]ProfileItems=AddTest.DelShortcut[AddTest.DelShortcut]Name =ACME distorterA,0x0000000A, 2;Also tried with Name =%Soft_Name%,0x0000000A, 2;SubDir =Sub Directory[RegAddUninst]HKLM,%SMWCV%\Uninstall\%Soft_Name%,DisplayName,,"ACME"HKLM,%SMWCV%\Uninstall\%Soft_Name%,UninstallString,,"RunDll32 advpack.dll,LaunchINFSection d:\test\installer\installer.inf, DefaultUninstall";16422 = program files[AddTest]Name = ACME distorterA SubDir = %Provider%Infotip = "This is a tooltip weeha!"CmdLine = -1, %App_ProgramFolder%, Acmedist.exe WorkingDir = -1, %App_ProgramFolder%[AddTestEx]Name = %Soft_Name%SubDir = %Provider%Infotip = "This is a tooltip weeha!QQQQQQ"CmdLine = -1, %App_ProgramFolder%, Acmedist.exe WorkingDir = -1, %App_ProgramFolder%[Strings]SMWCV="Software\Microsoft\Windows\CurrentVersion"Provider="ACME"Soft_Name="ACME distorter 5.0"AppLink="ACME distorter 5.0"App_Name="ACME distorter 5.0"App_StartMenuFolder="ACME\Distorter 5.0"App_ProgramFolder="ACME\Distorter 5.0"ShortCutFileName="ACME\Distorter 5.0.lnk"PathAndFileName="ACMEdist.exe"Arguments= ""I tried using "0x0000000A,2", as suggested by DaRk MaDnEsS, but the result is the same - the shortcut continues to stay in the Start menu.well what i think it should work [AddTest.DelShortcut]Name =%Soft_Name%,0x0000000A, 2SubDir = %Provider%and the shortcut should be [AddTestEx]Name = %Soft_Name%,0x00000008,2SubDir = %Provider%Infotip = "This is a tooltip weeha!QQQQQQ"CmdLine = -1, %App_ProgramFolder%, Acmedist.exe WorkingDir = -1, %App_ProgramFolder%test and tell meEdit:i think since it installs to all users you might need to use 0x0000000A, 23with the old inf ( i'm not sure tho i just got this in my head) Edited October 15, 2009 by DaRk MaDnEsS Quote Link to comment Share on other sites More sharing options...
ricktendo Posted October 15, 2009 Author Share Posted October 15, 2009 [Adds]Name=%Soft_Name%,0x00000008,2SubDir=%Provider%Infotip="This is a tooltip weeha!QQQQQQ"CmdLine=-1,%App_ProgramFolder%,Acmedist.exe WorkingDir=-1,%App_ProgramFolder%[Deletes]Name=%Soft_Name%,0x0000000A,2SubDir=%Provider%BTW you dont need to use any exotic inf profileitem flags for this shortcut, you can use 0x00000001 then 0x00000002 or 0x00000003 to delete it (OH an it does not install to all users its going into current user)[Adds]Name=%Soft_Name%,0x00000001SubDir=%Provider%Infotip="This is a tooltip weeha!QQQQQQ"CmdLine=-1,%App_ProgramFolder%,Acmedist.exe WorkingDir=-1,%App_ProgramFolder%[Deletes1]Name=%Soft_Name%,0x00000002SubDir=%Provider%[Deletes2]Name=%Soft_Name%,0x00000003SubDir=%Provider% Quote Link to comment Share on other sites More sharing options...
Guest Posted October 16, 2009 Share Posted October 16, 2009 How to use the flag "CE_COPYFLG_NO_DATE_DIALOG 0x20000000" which does not copy a file if the target file is newer.in the copy section lets say that you are copying DM.exeDM.exe,,0x20000000 should do the trick Quote Link to comment Share on other sites More sharing options...
Guest Posted October 16, 2009 Share Posted October 16, 2009 ok thank you but I FGCBA reports errors by as follows :ssorry my bad i miss writien itDM.exe,,,0x20000000it should be 3 ,,, not only 2If FGCBA Reports any error try to test it and see Quote Link to comment Share on other sites More sharing options...
ricktendo Posted October 16, 2009 Author Share Posted October 16, 2009 Ignore the error, FGCBA does not support copy file flags Quote Link to comment Share on other sites More sharing options...
ricktendo Posted October 20, 2009 Author Share Posted October 20, 2009 No comprende :S Quote Link to comment Share on other sites More sharing options...
Guest Posted October 20, 2009 Share Posted October 20, 2009 my program .exe is an Installshield installer that creates files in "%ProgramFiles%\InstallShield Installation Information\(8F5A0981-5CDC-41D0-BCA2-AD3B777FC358)\" so I love creating knowledge in INF installer?you mean you want to make an inf that installs fies to there or .. ?cause i don't understand Quote Link to comment Share on other sites More sharing options...
Guest Posted October 22, 2009 Share Posted October 22, 2009 yes I want to make a INF that installs the application (.exe) installshield...you understand French? otherwise I ask you in French by private message because my English is very bad ..sorry i have been busy the couple of dayssorry i don't understand French well but ok can you tell me the name of the application so i can see what is the problem exactly Quote Link to comment Share on other sites More sharing options...
Geej Posted June 20, 2010 Share Posted June 20, 2010 Does inf shortcut allows shortcut syntax to launch application in Min,Max,Normal mode?If can, how to do it? Quote Link to comment Share on other sites More sharing options...
ricktendo Posted June 20, 2010 Author Share Posted June 20, 2010 Does inf shortcut allows shortcut syntax to launch application in Min,Max,Normal mode?If can, how to do it?I too am looking for how but have never found it...I wanted this when I made my Windows Search addon, because the startup shortcut was set to minimized or somethingIf you find out how please report back Quote Link to comment Share on other sites More sharing options...
Geej Posted July 8, 2010 Share Posted July 8, 2010 I too am looking for how but have never found it...I wanted this when I made my Windows Search addon, because the startup shortcut was set to minimized or somethingIf you find out how please report backI thought about this and think that Profileitems does not have the command to set it.So I thought using vbscript could do the job and after experimenting with it, it could do it only during T13.I hereby enclosed an sysoc.inf addon that run vbscript to create shortcut at begining of T13. (It runs silently)The vbscript creates 2 shortcut in Max mode. 1) Windows Movie Maker and 2) Program Files folder shortcut on desktopGeej_T13_VBSshortcut_addon.cabSize: 3.47 Kb (3,554 bytes)MD5: 04E6C90BCF9C1008969DC0E2AE813F3CCreateShortcuts.pdf for future referenceCreateShortcuts.zipSize: 38.93 Kb (39,864 bytes)MD5: 8C15321A2309F687A5EF9A3D7CFAF645Below screenshot is a test shown that at T13, actual vbs execution path is root drive. Also not all windows shortcut are ready. Only Windows Movie Maker etc.IE and WMP are not created by setup at T13. I have disabled the prompt message in the addon. inf code that self-delete after vbs execution.[Version]Signature=$Windows NT$[DefaultInstall]RegisterDLLs=Start.Register[Start.Register]11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %1%\vbs1test.inf,Install"[Install]RunPreSetupCommands=Create.EmptyDirectorysCopyFiles=vbs1.CopyAddReg =AddRegSectionRunPostSetupCommands =Del.i386[Create.EmptyDirectorys]CMD /Q/C MD """%1%\i386""" & COPY /D/Y """%1%\*.cab""" """%1%\i386"""[vbs1.Copy]CreateShortcuts.vbs[Install.Delvbs]DelFiles=vbs1.Copy,PNF.copyUpdateinis=Sysoc.EditSmartReboot=N ; Suppress reboot prompt at T13Cleanup=1[PNF.copy]vbs1test.PNF,,,1 ; this file can only be deleted after reboot (when setup completes and boots to user desktop)[Sysoc.Edit]%17%\sysoc.inf,Components,vbs1test=*[Del.i386]RUNDLL32 advpack.dll,DelNodeRunDLL32 %1%\i386,8[Optional Components]vbs1test[vbs1test]OptionDesc =vbs1testTip =%Tip0%Modes =0,1,2,3CopyFiles =vbs1.CopyAddReg =AddRegSection[SourceDisksNames.x86]1="Vbs shortcut Files","vbsShcut.cab",,"i386"[DestinationDirs]vbs1.Copy=10 ; copy .vbs files to C:\windowsPNF.copy=17[SourceDisksFiles]CreateShortcuts.vbs=1[AddRegSection]HKLM,"%VBSSC%","300",0x0,"%10%\CreateShortcuts.vbs"HKLM,"%VBSSC%","301",0x0,"rundll32.exe advpack.dll,LaunchINFSection vbs1test.inf,Install.Delvbs"[Strings]Tip0 = "Test vbScript via ROE at T13"VBSSC="SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\VBSshortcut"vbs code is a bit long, so won't want to post the code here. See the addon for the actual detail. I hope it will be useful with this method. Quote Link to comment Share on other sites More sharing options...
phasma Posted September 24, 2010 Share Posted September 24, 2010 Does inf shortcut allows shortcut syntax to launch application in Min,Max,Normal mode?If can, how to do it?Has anyone found a way yet?Anyways, thank you Geej for the VBScript and if you or anyone is interested I implemented into a batchfilethat will search for your ShortCuts and output it to .vbs using your script as a template.This should eliminate (atleast for me) the use of alot of .inf and batchfiles.THX Quote Link to comment Share on other sites More sharing options...
ricktendo Posted September 25, 2010 Author Share Posted September 25, 2010 Nope, have not Quote Link to comment Share on other sites More sharing options...
Geej Posted July 16, 2011 Share Posted July 16, 2011 In profileitems, there is Hotkey=hotkey-value (ref)What is the exact syntax to set this value? (say I want it Ctrl+Alt+U)Where can I download "Windows SDK documentation" as mention in the above ref link?Anyone here knows? Quote Link to comment Share on other sites More sharing options...
ricktendo Posted July 16, 2011 Author Share Posted July 16, 2011 In profileitems, there is Hotkey=hotkey-value (ref)What is the exact syntax to set this value? (say I want it Ctrl+Alt+U)Where can I download "Windows SDK documentation" as mention in the above ref link?Anyone here knows?I think you can get this if you go to the properties of a LNK file and enter the keyboard shortcuts...then using the same values in the INF profileitemBTW I think the way you have it written (Ctrl+Alt+U) will work give it a try Quote Link to comment Share on other sites More sharing options...
Geej Posted July 17, 2011 Share Posted July 17, 2011 (edited) I think you can get this if you go to the properties of a LNK file and enter the keyboard shortcuts...then using the same values in the INF profileitemBTW I think the way you have it written (Ctrl+Alt+U) will work give it a tryHave tried before I ask here. Not working. Actually I asked because I encountered this challenge while making Pretty Run addon, which has "Ctrl + Alt + S" set as hotkey.Neverthless, I made some progress but still has no total solution to it.Hotkey syntax is hex-base keyboard code. (which I am unable to find any proper keyboard code thur googling)Here is a sample inf test if Pretty Run is installed.[Version]Signature=$Windows NT$[DefaultInstall]ProfileItems=Start.Shortcut1[Start.Shortcut1]Name =%ShortcutN1%SubDir =%ProfileSubdir%CmdLine =16422,Pretty Run,PrettyRun.exeWorkingDir=16422,Pretty Run;HotKey ="Ctrl + Alt + S" ;Desired hotkeyHotKey =0x200 ; Ctrl +;HotKey =0x14 ; got it as Caplock;HotKey =0x400 ; Alt +[Strings]ShortcutN1=PrettyRunProfileSubdir=Pretty RunAs you can see, hotkey is partially set only. Need to know how to do it exactly... If someone can throw some more light here, that will be great. Edited July 17, 2011 by Geej Quote Link to comment Share on other sites More sharing options...
ricktendo Posted July 17, 2011 Author Share Posted July 17, 2011 Heres something that could help if you know how to program http://www.experts-exchange.com/Programming/Languages/CPP/Q_21115259.htmlIm hope someone smart will see this and help Quote Link to comment Share on other sites More sharing options...
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 mona and bphlpt 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...
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.