Author Topic: How do you add values to the registry?  (Read 2800 times)

0 Members and 1 Guest are viewing this topic.

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
How do you add values to the registry?
I was just in the process of building an install shield for the next saga beta and I run into a small problem, which I hope you will be able to help me with. Obviosly you have to run the launcher after you have installed the game. And here is the problem: you have to browse for the executable file first. And of course flags have to be activated manually. I have noticed that TBP for instance had managed to conjure up a registry key, that does the trick. Could somebody enlighten me how this works? :)
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline Fury

  • The Curmudgeon
  • 213
Re: How do you add values to the registry?
TBP uses NSIS installer, the installer is capable of writing to registry as well. Here's the relevant section from the installer build file;
Quote
Section "Registry" SEC02
  WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "CmdLineOptions" "-ambient_factor 60 -spec -glow -jpgtga -nomotiondebris -2d_poof -nobeampierce -dualscanlines -ship_choice_3d -targetinfo -orbradar -3dwarp -tbpwarpeffects -snd_preload"
  WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "ModSelected" ""
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3DTextureOrigin" "00000000"
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3DFast" "00000000"
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "ComputerSpeed" "00000004"
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3DUseLargeTextures" "00000002"
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3D8_AAType" "00000000"
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3D8_Adapter" "00000000"
  WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "VideocardFs2open" "D3D8-(1024x768)x32 bit"
  WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "Soundcard" "DirectSound"
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "SpeechTechRoom" "00000000"
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "SpeechBriefings" "00000000"
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "SpeechIngame" "00000000"
  WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "SpeechVoice" "00000000"
SectionEnd

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: How do you add values to the registry?
Please, make also an option not to modify registry values... I managed with older TBP version to make a mess out of the registry entries. Game worked just fine but launcher crashed every time i opened the registry tab.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Re: How do you add values to the registry?
Quote
Section "Registry" SEC02
 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "CmdLineOptions" "-ambient_factor 60 -spec -glow -jpgtga -nomotiondebris -2d_poof -nobeampierce -dualscanlines -ship_choice_3d -targetinfo -orbradar -3dwarp -tbpwarpeffects -snd_preload"
 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "ModSelected" ""
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3DTextureOrigin" "00000000"
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3DFast" "00000000"
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "ComputerSpeed" "00000004"
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3DUseLargeTextures" "00000002"
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3D8_AAType" "00000000"
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "D3D8_Adapter" "00000000"
 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "VideocardFs2open" "D3D8-(1024x768)x32 bit"
 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "Soundcard" "DirectSound"
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "SpeechTechRoom" "00000000"
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "SpeechBriefings" "00000000"
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "SpeechIngame" "00000000"
 WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Volition\Freespace2" "SpeechVoice" "00000000"
SectionEnd

Thanks, I think this is exactly what I have been looking for :)
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline Fury

  • The Curmudgeon
  • 213
Re: How do you add values to the registry?
Please, make also an option not to modify registry values... I managed with older TBP version to make a mess out of the registry entries. Game worked just fine but launcher crashed every time i opened the registry tab.

From TBP FAQ:
Quote
Question: When I use the Launcher, "Registry" tab might generate an error.
Answer: This is normal when you have no Freespace 2 installed. It has no effect on The Babylon Project.
Never seen the launcher to crash when opening registry tab though, I guess its a bug in the launcher. There has been no problem reports on the issue either, so your case is probably an isolated case.

  

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Re: How do you add values to the registry?
Yes, it worked. Thanks guys :)

(ignore the typo, I have already fixed it (i.e. -spec instead of spec))

« Last Edit: December 21, 2005, 03:58:19 am by Tolwyn »
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis