WinRAR SFX (Self Extract) Question

jonthedit

Well-Known Member
OP
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,010
Country
Bangladesh
cPZ6ttC.png

Basically I want to have my self extracting winrar archive install a font file before or after it extracts.
The font file is IN the archive, so if that matters let me know.
I just have no idea how to properly execute/open the font file automatically via WinRAR.

I would prefer if the user sees
YDKNDel.png

But they do not have to see it as long as the font installs successfully.

Any help?
 

DinohScene

Gay twink catboy
Global Moderator
Joined
Oct 11, 2011
Messages
22,531
Trophies
4
Location
Восторг
XP
22,744
Country
Antarctica
I'd say an execution script would install it for you without seeing the font if you can implement that in yer self extractor...
Or you could code up a pop up that says "Install font Y/N"...
Then again, the only font I ever installed on me OS is an Art Deco 1920's styled one xd

I'm sorry lad, I'm unfortunately of no help on this :c
 

Tom Bombadildo

Dick, With Balls
Member
Joined
Jul 11, 2009
Messages
14,575
Trophies
2
Age
29
Location
I forgot
Website
POCKET.LIKEITS
XP
19,226
Country
United States
Back in highschool I used to have to manually install a font every time I logged in (because for some reason every change to Windows made on the local drive was removed every time you logged out). Eventually, I just made a batch file that copied the font into C:\Windows\Fonts and then set it up in the registry as well.

Code:
copy "FontName.ttf" "%WINDIR%\Fonts"
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "FontName (TrueType)" /t REG_SZ /d FontName.ttf /f

Just replace FontName with whatever Font you're trying to add, set it up to run after Winrar finishes extraction, and it should install the font.
 
  • Like
Reactions: jonthedit

jonthedit

Well-Known Member
OP
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,010
Country
Bangladesh
Back in highschool I used to have to manually install a font every time I logged in (because for some reason every change to Windows made on the local drive was removed every time you logged out). Eventually, I just made a batch file that copied the font into C:\Windows\Fonts and then set it up in the registry as well.

Code:
copy "FontName.ttf" "%WINDIR%\Fonts"
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "FontName (TrueType)" /t REG_SZ /d FontName.ttf /f

Just replace FontName with whatever Font you're trying to add, set it up to run after Winrar finishes extraction, and it should install the font.

This seemed promising, but no luck here.
Code:
copy "OCR A Std.ttf" "%WINDIR%\Fonts"
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "OCR A Std (TrueType)" /t REG_SZ /d OCR A Std.ttf /f

It runs after the Winrar install, however I get an error saying
"Windows cannot find 'copy' "
5mTpUq3.png



I thought about it, and wouldn't the easier solution to be take this code, put it in a .bat and then execute the batch file when the install completes?
 

jonthedit

Well-Known Member
OP
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,010
Country
Bangladesh
Well that's strange :unsure:

To confirm, you put the text into a batch file (example name being Font.bat) and then in the Winrar SFX options you have it set to run Font.bat?

Before I do that I want to get the batch file working standalone.
I added "pause" at the very end to see whats going on.
When the .bat runs the copy of the font works, however the reg entry fails. See attached.
03ayvHA.png



Edit: Apparently the path of the reg add does not need quotes.
Still no luck
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @OctoAori20, Cool. Same here.