Cursor Set installer

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Posts: 181
Joined: 09 Jul 2016, 08:34
Location: Serbia

Cursor Set installer

13 Nov 2017, 07:11

Hey all! I have a few cursor sets that i wish to create a gui driven installer. The issue is i cant figure out how to install the .inf files or to translate them into ahk form. So far its a single msgbox install driven script that will be later made into a gui with multiple cursor sets:

Code: Select all

MsgBox, 4100,Custom Cursors, Do you wish to install this cursor set?
IfMsgBox, Yes
	;Run, [mini] (Installer).inf
	;Run, rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 %A_ScriptDir%\[mini] (Installer).inf
	Run, RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 %A_ScriptDir%\[mini] (Installer).inf
Sleep, 2000
MsgBox, 4100, Custom Cursors, Do you wish to change to new cursor set?
IfMsgBox, Yes
So, i guess it would be harder to translate the .inf code into ahk code, im fine with triggering .inf files but how do i trigger its install function rather then default open (in default notepad editor)?
Any help appreciated! :)

For consistency sake, sorry, the CHANGE sub is used from here by Capn Odin.

and the .inf file im testing it on is from here by theblueguy07

.inf contents:

Code: Select all

;Crystal Clear Mini v4.0 by TheBlueGuy07


CopyFiles = Scheme.Cur, 
AddReg    = Scheme.Reg

Scheme.Cur = 10,"%CUR_DIR%"
Scheme.Txt = 10,"%CUR_DIR%"

HKCU,"Control Panel\Cursors\Schemes","%SCHEME_NAME%",,"%10%\%CUR_DIR%\%pointer%,%10%\%CUR_DIR%\%help%,%10%\%CUR_DIR%\%work%,%10%\%CUR_DIR%\%busy%,%10%\%CUR_DIR%\%Cross%,%10%\%CUR_DIR%\%Text%,%10%\%CUR_DIR%\%Hand%,%10%\%CUR_DIR%\%Unavailiable%,%10%\%CUR_DIR%\%Vert%,%10%\%CUR_DIR%\%Horz%,%10%\%CUR_DIR%\%Dgn1%,%10%\%CUR_DIR%\%Dgn2%,%10%\%CUR_DIR%\%move%,%10%\%CUR_DIR%\%alternate%,%10%\%CUR_DIR%\%link%"

; -- Common Information

"[mini] Normal Select v4.0.ani"
"[mini] Help Select v4.0.ani"
"[mini] Working In Background v4.0.ani"
"[mini] Busy v4.0.ani"
"[mini] Precision Select v4.0.ani"
"[mini] Text Select v4.0.ani"
"[mini] Handwriting v4.0.ani"
"[mini] Unavailable v4.0.ani"
"[mini] Vertical Resize v4.0.ani"
"[mini] Horizontal Resize v4.0.ani"
"[mini] Diagonal Resize 1 v4.0.ani"
"[mini] Diagonal Resize 2 v4.0.ani"
"[mini] Move v4.0.ani"
"[mini] Alternate Select v4.0.ani"
"[mini] Link Select v4.0.ani"

CUR_DIR       	= "Cursors\Crystal Clear Mini v4.0 - Original"
SCHEME_NAME     	= "Crystal Clear Mini v4.0 - Original"
pointer		= "[mini] Normal Select v4.0.ani"
help		= "[mini] Help Select v4.0.ani"
work		= "[mini] Working In Background v4.0.ani"
busy		= "[mini] Busy v4.0.ani"
cross		= "[mini] Precision Select v4.0.ani"
text		= "[mini] Text Select v4.0.ani"
hand		= "[mini] Handwriting v4.0.ani"
unavailiable	= "[mini] Unavailable v4.0.ani"
vert		= "[mini] Vertical Resize v4.0.ani"
horz		= "[mini] Horizontal Resize v4.0.ani"
dgn1		= "[mini] Diagonal Resize 1 v4.0.ani"
dgn2		= "[mini] Diagonal Resize 2 v4.0.ani"
move		= "[mini] Move v4.0.ani"
alternate		= "[mini] Alternate Select v4.0.ani"
link		= "[mini] Link Select v4.0.ani"
It actually comes with a few bonus cursors that need to either be manually installed or changed in the .inf file. I wanted to created an installer to make it easier for me to switch between different sets etc... Also plan to send him the installer when im done if he wants it to make it easier for everyone to install different cursor combos.
Posts: 2515
Joined: 13 May 2014, 17:15

Re: Cursor Set installer

14 Nov 2017, 13:15

Search your box for "iexpress.exe" ... (and the web for further details)
Good luck :)
User avatar
Posts: 181
Joined: 09 Jul 2016, 08:34
Location: Serbia

Re: Cursor Set installer

14 Nov 2017, 14:54

Thanks! Ill look into it. This isnt a dynamic approach tho, is it? The deal here is to show the user a few cursor types and every type has a few dufferent cursor looks. User selects which ones he wants and script installs. My original idea was to write a new inf file when user presses install button. Im combing through iexpress and looks like I need to create inf and instruct iexpress to compile it and than run the created exe. Doesnt look intuitive at all. xD

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, cjessamy, kryptooo, Mipha, pvb, swagfag and 54 guests