:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Tue Jan 16, 2018 7:50 pm
All times are UTC + 0
 Forum index » Miscellaneous Forums » Offtopic Discussion Area
NSIS Registry key writing
Moderators: Global Moderators, Offtopic Moderators
Post new topic   Reply to topic Page 1 of 1 [18 Posts] View previous topic :: View next topic
Author Message
DaRTzO
Laser Commando


Joined: 18 Jan 2006
Location: Country Swing

PostPosted: Mon Feb 20, 2012 7:32 am    Post subject:   NSIS Registry key writing Reply with quote

I'm trying to make a ra2 optimizer/patcher. That modifies the ra2.ini and ra2md.ini's and also adds optimal network and multimedia class scheduler settings into the registry.

I've gone through many guides on this and I can't seem to get the installer to write to the correct registry keys.
I'm using the Nullsoft Install system.


I'm trying to write to the following keys.
Code:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile]
"NetworkThrottlingIndex"=dword:ffffffff
"SystemResponsiveness"=dword:00000000

[HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"DeadGWDetectDefault"=dword:00000001
"DefaultTTL"=dword:00000040
"DisableTaskOffload"=dword:00000001
"EnableDca"=dword:00000000
"EnableICMPRedirect"=dword:00000001
"MaxUserPort"=dword:0000ffff
"SynAttackProtect"=dword:00000001
"SyncDomainWithMembership"=dword:00000001
"Tcp1323Opts"=dword:00000001
"TCPMaxDataRetransmissions"=dword:00000007
"TcpTimedWaitDelay"=dword:0000001e
"UseDomainNameDevolution"=dword:00000001

[HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider]
"Class" 0x00000008
"DnsPriority"=dword:00000006
"HostsPriority"=dword:00000005
"LocalPriority"=dword:00000004
"NetbtPriority"=dword:00000007

[HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Dnscache]
"ErrorControl"=dword:00000001
"MaxNegativeCacheTtl"=dword:00000000
"NegativeCacheTime"=dword:00000000
"NegativeSOACacheTime"=dword:00000000
"NetFailureCacheTime"=dword:00000000
"ServiceDllUnloadOnStop"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games]
"Scheduling Category"="High"
"SFIO Priority"="High"
"Background Only"="False"
"Priority"=dword:00000001
"Clock Rate"=dword:00002710
"GPU Priority"=dword:00000001
"Affinity"=dword:00000000


Back to top
View user's profile Send private message
Frontlines
Missile Trooper


Joined: 23 Nov 2009
Location: Gonzales, CA

PostPosted: Mon Feb 20, 2012 9:18 am    Post subject: Reply with quote

I'm sorry.. but why is this in the Generals Editing Forum if you're talking about RA.

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account
DaRTzO
Laser Commando


Joined: 18 Jan 2006
Location: Country Swing

PostPosted: Mon Feb 20, 2012 10:59 am    Post subject: Reply with quote

Lol my bad I was too tired thought it was the general editing forum.

Back to top
View user's profile Send private message
Starkku
Tiberian Beast


Joined: 28 Dec 2007
Location: Finland

PostPosted: Mon Feb 20, 2012 11:08 am    Post subject: Reply with quote

Correct place would be in 'Off-topic' forum section. This has nothing to do with any C&C game specifically.

Would be nice if you showed your installer script. I bet the problem has to do with permissions though, i.e installer does not have a permission to modify those registry keys. Don't know how one would go on with granting it those permissions if that's the problem. I might look into it later when I get home.
_________________

Back to top
View user's profile Send private message Visit poster's website Twitter Channel URL
DaRTzO
Laser Commando


Joined: 18 Jan 2006
Location: Country Swing

PostPosted: Mon Feb 20, 2012 5:45 pm    Post subject: Reply with quote

Code:
outFile "Red Alert 2 Optimizer.exe"
 
RequestExecutionLevel admin

InstallDirRegKey HKLM "Software\Westwood\Red Alert 2" "InstallPath"

section "Tweaks"

    setOutPath $INSTDIR
   
   AccessControl::GrantOnFile \
   "$INSTDIR" "(BU)" "GenericWrite" 
   
   WriteINIStr $INSTDIR\Ra2.ini Video VideoBackBuffer no
   WriteINIStr $INSTDIR\Ra2.ini Video AllowVRAMSidebar yes
   WriteINIStr $INSTDIR\Ra2.ini SerialDefaults Baud 115200
   
   WriteINIStr $INSTDIR\Ra2md.ini Video VideoBackBuffer no
   WriteINIStr $INSTDIR\Ra2md.ini Video AllowVRAMSidebar yes
   WriteINIStr $INSTDIR\Ra2md.ini SerialDefaults Baud 115200
   
   AccessControl::GrantOnRegKey \
   HKLM "Software" "(BU)" "FullAccess"

   WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" "Scheduling Category" "High"
   WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" "SFIO Priority" "High"
   WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" "Background Only" "False"
   WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" "NetworkThrottlingIndex" 0xffffffff
   WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" "SystemResponsiveness" 0x0
   WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" "Priority" 0x1
   WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" "Clock Rate" 0x2710
   WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" "GPU Priority" 0x1
   WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" "Affinity" 0x0

   AccessControl::GrantOnRegKey \
   HKLM "System" "(BU)" "FullAccess"
   
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "DeadGWDetectDefault" 0x1
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "DefaultTTL" 0x40
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "DisableTaskOffload" 0x1
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "EnableDca" 0x0
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "MaxUserPort" 0xffff
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "SynAttackProtect" 0x1
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "SyncDomainWithMembership" 0x1
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "Tcp1323Opts" 0x1
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "TCPMaxDataRetransmissions" 0x7
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "TcpTimedWaitDelay" 0x1e
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "UseDomainNameDevolution" 0x1
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" "Class" 0x8
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" "DnsPriority" 0x6
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" "HostsPriority" 0x5
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" "LocalPriority" 0x4
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" "NetbtPriority" 0x7
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Dnscache" "ErrorControl" 0x1
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Dnscache" "MaxNegativeCacheTtl" 0x0
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Dnscache" "NegativeCacheTime" 0x0
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Dnscache" "NegativeSOACacheTime" 0x0
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Dnscache" "NetFailureCacheTime" 0x0
   WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\Dnscache" "ServiceDllUnloadOnStop" 0x1
   
sectionEnd

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Mon Feb 20, 2012 6:19 pm    Post subject: Reply with quote

Moved to Offtopic for now.
_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Send e-mail Skype Account
FurryQueen
General


Joined: 24 Jul 2010

PostPosted: Mon Feb 20, 2012 11:10 pm    Post subject: Reply with quote

No offense, but I'd never run this thing knowing what it does.
_________________
NZ.org | NZ Gaming | RP
Skype: doctordestiny891
MSN: genkosygin@hotmail.com
Steam

Back to top
View user's profile Send private message
DaRTzO
Laser Commando


Joined: 18 Jan 2006
Location: Country Swing

PostPosted: Tue Feb 21, 2012 12:18 am    Post subject: Reply with quote

How about you expand on that?

Back to top
View user's profile Send private message
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Fri Feb 24, 2012 7:13 am    Post subject: Reply with quote

I would sure like some research shown on the effects of these "network" tweaks on the windows registry, in worst case, you break networking as setups can differ vastly or are these just some random fiddling done on 1 computer or 2, how conclusive is the study or its just assumptions...

In any case, whatever idiot told you to put AllowVRAMSidebar=yes ;was pretty wrong for optimization, yes the idea about it running better being held in vram seems make sense but westwood code towards that is SHIT!!!! and as thus it works better held in system, one guy already whined me of sidebar lag and he had that turned on thinking it improve performance...

I wouldn't run this optimizer either until I had info on the effects of these network changes in deep level just to know you ******* know what you are doing.

Back to top
View user's profile Send private message
FurryQueen
General


Joined: 24 Jul 2010

PostPosted: Fri Feb 24, 2012 7:35 am    Post subject: Reply with quote

DaRTzO wrote:
How about you expand on that?

Apollo just spelled it out. Way too many Windows registry changes. Knowing that, not a ztyping chance.
_________________
NZ.org | NZ Gaming | RP
Skype: doctordestiny891
MSN: genkosygin@hotmail.com
Steam

Back to top
View user's profile Send private message
DaRTzO
Laser Commando


Joined: 18 Jan 2006
Location: Country Swing

PostPosted: Fri Feb 24, 2012 10:46 am    Post subject: Reply with quote

Google TCP optimizer and read this.

http://forums.steampowered.com/forums/showthread.php?t=1315790

Back to top
View user's profile Send private message
FurryQueen
General


Joined: 24 Jul 2010

PostPosted: Fri Feb 24, 2012 7:43 pm    Post subject: Reply with quote

I don't even want google touching my Windows network settings.
_________________
NZ.org | NZ Gaming | RP
Skype: doctordestiny891
MSN: genkosygin@hotmail.com
Steam

Back to top
View user's profile Send private message
DaRTzO
Laser Commando


Joined: 18 Jan 2006
Location: Country Swing

PostPosted: Fri Feb 24, 2012 9:00 pm    Post subject: Reply with quote

Noob?! <3

Back to top
View user's profile Send private message
FurryQueen
General


Joined: 24 Jul 2010

PostPosted: Fri Feb 24, 2012 11:47 pm    Post subject: Reply with quote

Nope. Just don't trust any of you fuckers.
_________________
NZ.org | NZ Gaming | RP
Skype: doctordestiny891
MSN: genkosygin@hotmail.com
Steam

Back to top
View user's profile Send private message
¥R_M0dd€r
Cyborg Soldier


Joined: 03 Jan 2011

PostPosted: Sat Feb 25, 2012 12:12 am    Post subject: Reply with quote

If this "optimizer/patcher" can remember and restore the previous values, it shouldn't hurt to try it out.

Back to top
View user's profile Send private message
Von Kriplespac
General


Joined: 01 Sep 2004
Location: Somewhere

PostPosted: Sat Feb 25, 2012 3:34 am    Post subject: Reply with quote

FurryQueen wrote:
Nope. Just don't trust any of you fuckers.


Can't blame you there. Laughing
_________________
...

Back to top
View user's profile Send private message
DaRTzO
Laser Commando


Joined: 18 Jan 2006
Location: Country Swing

PostPosted: Sat Feb 25, 2012 6:13 pm    Post subject: Reply with quote

¥R_M0dd€r wrote:
If this "optimizer/patcher" can remember and restore the previous values, it shouldn't hurt to try it out.


Yeah, I've been tweaking and optimizing my computer related stuff since I was 16 and these things here are proven by many people to work.

It's not about trust really, it's about having the intelligence to read up, Google and test it yourself. Instead of crying about the most ridiculous nonsense I've ever heard.

You're only limiting yourselves guys. I get 15%ish increase in performance/netspeeds while you guys can cower on..

Back to top
View user's profile Send private message
FurryQueen
General


Joined: 24 Jul 2010

PostPosted: Sat Feb 25, 2012 8:58 pm    Post subject: Reply with quote

DaRTzO wrote:
Yeah, I've been tweaking and optimizing my computer related stuff since I was 16 and these things here are proven by many people to work.

It's not about trust really, it's about having the intelligence to read up, Google and test it yourself. Instead of crying about the most ridiculous nonsense I've ever heard.

You're only limiting yourselves guys. I get 15%ish increase in performance/netspeeds while you guys can cower on..


_________________
NZ.org | NZ Gaming | RP
Skype: doctordestiny891
MSN: genkosygin@hotmail.com
Steam

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [18 Posts] View previous topic :: View next topic
 Forum index » Miscellaneous Forums » Offtopic Discussion Area
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.2333s ][ Queries: 12 (0.1057s) ][ Debug on ]