Jump to content

[Tutorial] Exotic INF ProfileItems/Shortcuts


ricktendo

Recommended Posts

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

I 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 hex

For Ctrl + Alt +A, dec value return is 1601 which then converted to 641 in hex. tada :)

@echo off
Shortcut /F:"%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\System Tools\Disk Defragmenter.lnk" /A:Q
pause

Link to comment
Share on other sites

@Geej

The 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

Link to comment
Share on other sites

  • 2 months later...

I need corrected of this command to use in inf file,i want unload with this command

or something like this,before delete file in uninstall section

CMD /Q /S CD /D %16422%\Utility\T-Clock2010\Win32\clock.exe /exit

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

  • 2 weeks later...

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"

Hi

i used below command to delete folders in uninstal section but in uninstalling show cmd window

how can hide this window?

RunPostSetupCommands = dirappdel

[dirappdel]

CMD /Q /C DEL /f /s /q """%16410%\SumatraPDF"""

CMD /Q /C RMDIR /s /q """%16410%\SumatraPDF"""

Link to comment
Share on other sites

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 sidebar

But I would better recommend this for deleting folders

[Del.Gadgets.Settings]
RUNDLL32 advpack.dll,DelNodeRunDLL32 %16422%\%GADS%,8
RUNDLL32 advpack.dll,DelNodeRunDLL32 %16422%\%SHGADS%,8
RUNDLL32 advpack.dll,DelNodeRunDLL32 %16422%\%VISXORG%,1
RUNDLL32 advpack.dll,DelNodeRunDLL32 %16412%\%WINSIDE%,8
RUNDLL32 advpack.dll,DelNodeRunDLL32 %16412%\%WINLIVE%,8

These are the numbers you can use

Delete Folder
1 // delete the directory only if it's empty
2 // don't delete any sub-dirs; delete only the files
4 // don't delete the dir itself
8 // delete UNC [network] paths

Link to comment
Share on other sites

your tips very good now it hide cmd window

i using it to sure it actually delete folder and file,sometimes it dont delete with DelDirs

even if i define folder.

but also even when use TSKILL to kill exe process if on the same directory one txt file opened

directory 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 delete

it without log off

AddReg = Sum000.addreg

[sum000.addreg]

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\softs","Delete3",0,"cmd /c RD /S /Q ""%userprofile%\Application Data\SumatraPDF"""

Edited by mona
Link to comment
Share on other sites

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 by mona
Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...