Change default mouse cursor
#1
Posted 24 November 2011 - 02:33 AM
#2
Posted 24 November 2011 - 05:30 PM
Is there a way to change the default mouse cursor that is used by Win7PE?
do you want to change it into alienware cursor?
#3
Posted 24 November 2011 - 05:51 PM
there isn;t a built in way (yest) to do this, but it is probably just a matter of writing some script to write the correct registry entries into the PE...Is there a way to change the default mouse cursor that is used by Win7PE?
#4
Posted 24 November 2011 - 07:55 PM
so there was a lot of interest in changing it.
google this:
joshuas project mouse cursor site:reboot.pro
Here is some hits from that search that might help.
http://reboot.pro/87...dpost__p__93969
#5
Posted 25 November 2011 - 12:18 AM
#6
Posted 26 November 2011 - 03:19 AM
I verified that my custom cursors are being copied into the WindowsCursors folder correctly and that the registry keys exist. In fact, if I go into the Control Panel > Mouse I see the custom pointers!!! If I click OK, without changing anything, THEN the pointer changes to the custom pointer.
I think I am missing something but I don't know what. Any suggestions???
#7
Posted 26 November 2011 - 04:39 PM
Go through the same procedure that you did above but don't click OK yet.
Take a snapshot with regshot
Now click the OK
Take second snapshot and compare.
See if you can identify a registry value that was missed.
#8
Posted 26 November 2011 - 07:07 PM
Maybe you can see something that I don't.
#9
Posted 27 November 2011 - 12:57 AM
The 3 entries with stars below will be the important ones to add to a script.
What I would suggest:
Use RegShot2 Unicode, It will give you a cleaner output in the ~RedoReg0000.txt file which is formatted more like a .reg file.
http://www.mediafire...gzqradpeq1qkl11
rename ~RedoReg0000.txt to ~RedoReg0000.reg then run RegCpe on it.
http://galapo.net/ge...s/RegCPE.script
RegCpe will give you an output that you can directly add to your .script file
Or you can experiment first in your running PE with ~RedoReg0000.reg
This is faster and provides more control.
#1 start your PE, then import ~RedoReg0000.reg (import the registry entries)
and see if that works to change your mouse cursor.
If it does work just like it is, then it's time to remove the unnecessary entries.
You should be able to safely remove all registry entries that start with:
HKUS-1-5-18
HKLMSOFTWAREMicrosoftWindows NTCurrentVersionPerflibCurrentLanguageCounter
#2 restart your VM then import the edited ~RedoReg0000.reg.
If mouse cursor fails, then you have deleted a necessary entry
There are many other methods like this to narrow down the necessary registry entries.
But since you have only a few registry entries, it should be doable for you.
P.S. After you have it refined and working, please post results for the
benefit of others who want to change their cursor. Thanks in advance.
RoyM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Regshot 1.8.2
Comments:
Datetime:2011/11/26 21:48:47 , 2011/11/26 21:48:59
Computer:COSMOS-PC , COSMOS-PC
Username:SYSTEM , SYSTEM
----------------------------------
Keys added:2
----------------------------------
*** See if there is more info here that you need to add to your script ***
*** Or just export this whole path and add to your script, AFTER you have mouse cursor working ***
* HKU.DEFAULTSoftwareMicrosoftWindowsCurrentVersionThemes
HKUS-1-5-18SoftwareMicrosoftWindowsCurrentVersionThemes
----------------------------------
Values deleted:2
----------------------------------
HKU.DEFAULTControl PanelCursors: "DMZ White"
HKUS-1-5-18Control PanelCursors: "DMZ White"
----------------------------------
Values added:4
----------------------------------
* HKU.DEFAULTControl PanelCursors: "DMZ White"
* HKU.DEFAULTSoftwareMicrosoftWindowsCurrentVersionThemesThemeChangesMousePointers: 0x00000001
HKUS-1-5-18Control PanelCursors: "DMZ White"
HKUS-1-5-18SoftwareMicrosoftWindowsCurrentVersionThemesThemeChangesMousePointers: 0x00000001
#10
Posted 27 November 2011 - 03:32 AM
Again, the mouse properties show the custom pointer is currently in use but I still need to go into the properties and click OK for it to take affect. ARRGH!
#11
Posted 27 November 2011 - 05:23 AM
#12
Posted 27 November 2011 - 06:24 AM
First of all I would like to say that there wasn't anything wrong with the method of adding the cursor as indicated from the initial link that RoyM posted. I think the difference is that in Win7PE, the program windowssystem32winpeshl.exe starts first and sets the default mouse pointer for the arrow, busy, and app starting cursors.
What I did to override this was to open winpeshl.exe in Resource Hacker and replaced the following resources:
CURSOR > 1 > 1033 (This is were the arrow cursor is)
ANICURSORS > 100 > 1033 (This is the busy animated cursor)
ANICURSORS > 101 > 1033 (This is the app starting animater cursor)
I know that it isn't the best solution but it works.
#13
Posted 27 November 2011 - 07:38 PM
BUT, the winpeshl.exe was somehow over-riding the ones displayed, and NOT picking up the ones that the registry specified...
Sounds like we might need some sort of exe that could be run after the shell is started (you were using "explorer" as the shell - right?) that does the equiv of the "OK" (i.e. force the refresh from the registry...)
Scott
#14
Posted 27 November 2011 - 11:25 PM
#15
Posted 27 November 2011 - 11:46 PM
This file needs to be in copied to the target windowssystem32 folder. You could either have a script do this. For example, embed the exe in a script that copies it to the target folder.
Or, you could mount the boot.wim file using imagex in rw mode and overwrite the existing winpeshl.exe (this is what I did because my source windows 7 source is on my hard drive - and I am lazy).
I will post the script that I used to change the cursor following this post.
#16
Posted 28 November 2011 - 12:18 AM
DirMake,"%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Normal Select.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Working In Background.ani","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Busy.ani","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Alternate Select.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Diagonal Resize 1.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Diagonal Resize 2.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Handwriting.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Help Select.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Horizontal Resize.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Link Select.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Move.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Precision Select.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Text Select.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Unavailable.cur","%target_win%\Cursors" ExtractFile,%ScriptFile%,"Cursor","Vertical Resize.cur","%target_win%\Cursors" hive_load,HKCU reg_add,0x4,"%reg%\Control Panel\Cursors","Scheme Source","1" reg_add,0x2,"%reg%\Control Panel\Cursors","","DMZ White" reg_add,0x2,"%reg%\Control Panel\Cursors","Arrow","#$pSystemRoot#$p\Cursors\Normal Select.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","AppStarting","#$pSystemRoot#$p\Cursors\Working In Background.ani" reg_add,0x2,"%reg%\Control Panel\Cursors","Wait","#$pSystemRoot#$p\Cursors\Busy.ani" reg_add,0x2,"%reg%\Control Panel\Cursors","Crosshair","#$pSystemRoot#$p\Cursors\Precision Select.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","Hand","#$pSystemRoot#$p\Cursors\Link Select.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","Help","#$pSystemRoot#$p\Cursors\Help Select.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","IBeam","#$pSystemRoot#$p\Cursors\Text Select.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","No","#$pSystemRoot#$p\Cursors\Unavailable.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","NWPen","#$pSystemRoot#$p\Cursors\Handwriting.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","SizeAll","#$pSystemRoot#$p\Cursors\Move.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","SizeNESW","#$pSystemRoot#$p\Cursors\Diagonal Resize 2.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","SizeNS","#$pSystemRoot#$p\Cursors\Vertical Resize.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","SizeNWSE","#$pSystemRoot#$p\Cursors\Diagonal Resize 1.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","SizeWE","#$pSystemRoot#$p\Cursors\Horizontal Resize.cur" reg_add,0x2,"%reg%\Control Panel\Cursors","UpArrow","#$pSystemRoot#$p\Cursors\Alternate Select.cur" reg_add,0x2,"%reg%\Control Panel\Cursors\Schemes","","" reg_add,0x2,"%reg%\Control Panel\Cursors\Schemes","DMZ White","#$pSystemRoot#$p\Cursors\Normal Select.cur,#$pSystemRoot#$p\Cursors\Help Select.cur,#$pSystemRoot#$p\Cursors\Working In Background.ani,#$pSystemRoot#$p\Cursors\Busy.ani,#$pSystemRoot#$p\Cursors\Precision Select.cur,#$pSystemRoot#$p\Cursors\Text Select.cur,#$pSystemRoot#$p\Cursors\Handwriting.cur,#$pSystemRoot#$p\Cursors\Unavailable.cur,#$pSystemRoot#$p\Cursors\Vertical Resize.cur,#$pSystemRoot#$p\Cursors\Horizontal Resize.cur,#$pSystemRoot#$p\Cursors\Diagonal Resize 1.cur,#$pSystemRoot#$p\Cursors\Diagonal Resize 2.cur,#$pSystemRoot#$p\Cursors\Move.cur,#$pSystemRoot#$p\Cursors\Alternate Select.cur,#$pSystemRoot#$p\Cursors\Link Select.cur" hive_unload
#17
Posted 28 November 2011 - 12:31 AM
Maybe in optiizations.script?
#18
Posted 28 November 2011 - 12:39 AM
I'm glad you got it all working and thanks for sharing your findings
I could easily see this evolving into a new script included in the projects for all to use.
The trick will be automating the hack of winpeshl.exe as
redistrubiting yours may not be allowed.
Like MedEvil suggested above.
What tipped you off about winpeshl and editing it,
That's not something that comes to my mind first off.
Anyhow, Keep up the good work.
RoyM
#19
Posted 28 November 2011 - 03:26 AM
#20
Posted 28 November 2011 - 08:22 PM
@RoyM: What tiped me off was that the cursors were all working acccept for the arrow and busy icons. I assumed that maybe some program was getting to load the cursors before the usual windows processes start. I then found this site: http://technet.micro...977(WS.10).aspx which indicated that winpeshl.exe was the first program to load. So I decided to look at it with Resource Hacker and hit gold!
@MedEvil: I don't understand what the difference would be, but I wish there was a way to remove the cursors without having to res hack the file.
#21
Posted 28 November 2011 - 09:22 PM
Yes, you did hit gold, I didn't much use Resource Hacker before,
but I will certainly put it my toolbox now and make use of it.
I assumed like sbaeder that it was all defined in the registry,
However we are dealing with a PE environment here, so I learned
something new, "Thanks",
Steve must not have seen your prior post #12,
sometimes he sleep types like some of us here.
And yes Microsoft Technet is already in my browser favorites, I use it quite often.
The reason winpeshl.exe can't be resdistributed is, it is a
MS Windows file which is covered by the EULA - "End User License Agreement",
which clearly states that you cannot redistribute MS files.
Good news is, Resource Hacker does have command line support:
So the possibility to automate the hack may be possible.
From Resouce Hacker Website (Tutorial)
Using Scripts in Resource Hacker
We can also run Resource Hacker using Command Prompt and can use scripts
to automate lots of repeatative tasks to save our time.
You can use scripts in 2 ways:
Single Command
Multiple Commands
[Single Command]
You can use following commands in Command Prompt to perform actions using Resource Hacker:
-add ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
-addskip ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
-addoverwrite ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
-modify ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
-extract ExeFileName, ResourceAddress, ResourceType, ResourceName,
-delete ExeFileName, ResultingFileName, ResourceType, ResourceName,
Where:
ExeFileName - Source file name
ResultingFileName - Output file name
ResourceAddress - Resource location (e.g. Bitmap path stored in your hard disk)
ResourceType - Resource type (e.g. Bitmap, AVI, etc.)
ResourceName - Resource name (e.g. 131, 1020, etc.)
Example:
ResHacker.exe -addoverwrite explorer.exe, explorer1.exe, MyImage.bmp , bitmap, 143,
[Multiple Commands]
You can also run a series of commands using script. First you'll need to
create the script file using Notepad and then you can run it using following command:
ResHacker.exe -script ScriptFileName
Where, ScriptFileName is the name of the script file which you created in Notepad.
Following is the required format of the script file:
[FILENAMES]
Exe=
SaveAs=
Log=
[COMMANDS]
-addoverwrite ResourceAddress, ResourceType, ResourceName
Where:
EXE= contains source file name
SaveAs= contains output file name
Log= contains LOG file name which will store a detailed log of the operation
[COMMANDS] section contains the command-set which we want to perform on the source file.
PS: You can omit the LOG= entry in script file. In this case, Resource Hacker will
automatically create a LOG file with the name "ResHacker.log".
NOTE: If you are facing problems while saving a file after editing in resource hacker,
then make sure you have disabled WFP (Windows File Protection) service using
"WFP Patcher" or use "Replacer" to replace the file. Both utilities can be found in our "Download" section.
Also if you are getting error "Can't create file...", that means you have edited and saved
the same file in past and there is a backup file which needs to be deleted before saving
this file again. Go to the folder containing this file and you'll see a similar file having
"_original" in its name. Delete it and try to save the file in resource hacker.
#22
Posted 16 February 2013 - 10:54 PM
I just made a script based on this tread but it seems that the conclusions found here is invaled
well at least for Win7PE_SE
I will make a new script that may work tomorrow
but if you want to test it for yourself here it is :
http://www.mediafire...3wz50ncas2cma77
#23
Posted 17 February 2013 - 12:32 PM
The Cursors seems to be in a file called user32.dll
These are non animated .....
#24
Posted 17 February 2013 - 07:57 PM
I got the script working
Needs Some polish before i upload it
#25
Posted 28 September 2015 - 08:21 PM
Hello,
I try to use the DarkPhoenix's cursor script available in the download section and I have a small problem.
The script work but only few seconds
When I boot i can see the custom cursors are installed but 2 secs later the standard cursor, the wait and busy version are replaced by the default version ?
Best Regard
Nexus
Edited by NexusFred, 28 September 2015 - 08:22 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users