Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to run
control /name Microsoft.Mouse
To open mouse cursors for user to change to the new ones...
From a ".INF" file...


This ".inf" file opens the mouse settings, I want to copy a sentence to other ".inf" files to open Mouse Settings.

[Scheme.Reg]
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%"
[Wreg]
HKCU,"Control Panel\Cursors",,0x00020000,"%SCHEME_NAME%"
HKCU,"Control Panel\Cursors",AppStarting,0x00020000,"%10%\%CUR_DIR%\%work%"
HKCU,"Control Panel\Cursors",Arrow,0x00020000,"%10%\%CUR_DIR%\%pointer%"
HKCU,"Control Panel\Cursors",Crosshair,0x00020000,"%10%\%CUR_DIR%\%Cross%"
HKCU,"Control Panel\Cursors",Hand,0x00020000,"%10%\%CUR_DIR%\%link%"
HKCU,"Control Panel\Cursors",Help,0x00020000,"%10%\%CUR_DIR%\%Help%"
HKCU,"Control Panel\Cursors",IBeam,0x00020000,"%10%\%CUR_DIR%\%Text%"
HKCU,"Control Panel\Cursors",No,0x00020000,"%10%\%CUR_DIR%\%Unavailiable%"
HKCU,"Control Panel\Cursors",NWPen,0x00020000,"%10%\%CUR_DIR%\%Hand%"
HKCU,"Control Panel\Cursors",SizeAll,0x00020000,"%10%\%CUR_DIR%\%move%"
HKCU,"Control Panel\Cursors",SizeNESW,0x00020000,"%10%\%CUR_DIR%\%Dgn2%"
HKCU,"Control Panel\Cursors",SizeNS,0x00020000,"%10%\%CUR_DIR%\%Vert%"
HKCU,"Control Panel\Cursors",SizeNWSE,0x00020000,"%10%\%CUR_DIR%\%Dgn1%"
HKCU,"Control Panel\Cursors",SizeWE,0x00020000,"%10%\%CUR_DIR%\%Horz%"
HKCU,"Control Panel\Cursors",UpArrow,0x00020000,"%10%\%CUR_DIR%\%alternate%"
HKCU,"Control Panel\Cursors",Wait,0x00020000,"%10%\%CUR_DIR%\%busy%"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce\Setup\","",,"rundll32.exe shell32.dll,Control_RunDLL main.cpl @0"

What I have tried:

Googling but didn't work!, I tried copying code but didn't work!
Posted
Updated 23-May-23 20:36pm
v2
Comments
Suvendu Shekhar Giri 21-Oct-16 5:20am    
"I tried copying code but didn't work!"
Share what have you tried and what is the issue with that?
john1990_1 21-Oct-16 5:22am    
I want to open mouse settings in an ".inf" file.
Please check the updated question.
john1990_1 21-Oct-16 5:23am    
I found code that when run in "WIN+R" opens Mouse settings, how to run that code in an ".inf" file?

You can't run any code in an INF file - it's a human readable settings file (and pretty outdated as well) which contains no executable elements. All you can do with it is process the INF file within other applications, you cannot open an application from within an INF file itself.
 
Share this answer
 
Comments
john1990_1 21-Oct-16 5:34am    
But I showed you a code that opens "Mouse Settings" in an ".inf" file, the code does do what I want, I just want to know which part to copy to other ".INF" files to open "Mouse Settings", check out my website:
sites.google.com/site/easyMouseCursors/
OriginalGriff 21-Oct-16 5:42am    
You can't do that. INF files do not execute anything, and can't open any applications. They are - effectively - text files which tell other applications what to do, so unless the application processing the INF file reads a line from your file and *knows* it should execute it nothing will ever happen. And there are no "standard" applications which do that.
It's like putting a file path into an Excel cell and expecting the file to be executed automatically when you look at it in Notepad!
john1990_1 21-Oct-16 5:51am    
I'm sorry I'm not sure you understand, what I'm saying is that I downloaded with mouse cursors sets INF files that open "Mouse settings", the code is in the question, it DOES open Mouse Settings after adding the mouse cursors sets, for the user to choose the new set and press apply, I just want to add this code to other INF files so that they also open Mouse Settings.
you need to call the respective control panel file , in this case main.cpl is responsible for opening mouse settings tab (legacy) where you get the options to select the respective mouse theme installed. The call should look something like this,
VB
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce\Setup\","",,"rundll32.exe shell32.dll,Control_RunDLL main.cpl,,1"


also there are different format for different mouse cursors available so you need not set all those registries . Download some good theme with an installation script namely install.inf for reference to see the syntax for placeholder and naming conventions for respective mouse icon types.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900