Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming

Reply
 
LinkBack Thread Tools
Old 07-06-05   #1 (permalink)
Commodore 64
 
WarGreymon's Avatar
 
intel nvidia

Join Date: May 2005
Location: Colorado Springs, CO
Posts: 512

Rep: 55 WarGreymon is acknowledged by some
Unique Rep: 39
FAQs Submitted: 1
Trader Rating: 2
Default Winblows Environment Variables

Ok, I have bzip2 for Windows and I wanted to make my own WinRAR SFX installer. That's the easy part.

I want to have a batch file or script of some-sort to permanently modify the PATH variable to append %systemdrive%\bzip2\bin on the end of it.

Everything I've half-assed researched brought up doing it manually in the sysdm.cpl or using set PATH=%PATH%;%systemdrive%\bzip2\bin which only stays useful for the current cli session.

Any help would be greatly appreciated.
__________________
Google Talk: davyn.hauk
My FAQ

OLD Rig: Athlon XP-M 2600+ Barton, ABIT NF7-S v2, Corsair VS 512MB DDR400×2, AthenaPower 450W PSU, Sapphire Radeon 9600 256MB AGP


System: Slicker Than Snake Snot
CPU
intel C2D E6850 @ 3.6GHz
Motherboard
Abit IP35 Pro
Memory
2x Crucial Ballistix 1gb DDR2 800
Graphics Card
eVGA 8800GT 256MB
Hard Drive
250GB SATA2, 2x 500GB SATA2
Sound Card
Creative X-Fi Platinum
Power Supply
Zalman 750W
Case
CoolerMaster Wave Master
CPU cooling
Zalman CNPS9700-NT
GPU cooling
Stock
OS
Windows XP Pro
Monitor
Samsun 22" WS LCD
WarGreymon is offline   Reply With Quote
Old 07-06-05   #2 (permalink)
Overclocker
 
Rhys's Avatar
 
amd ati

Join Date: Jul 2005
Posts: 14

Rep: 3 Rhys Unknown
Unique Rep: 2
Trader Rating: 0
Default

Hi,

I know you can do it within Windows using code but if you want to use a batch file then you can use the setx.exe utility. I think (from memory) it came with the resource kit but I am reasonably sure it can be downloaded (feel free to correct me here). Also, I think it can be done with kixtart, or a vbs script. If nobody else can answer it off the top of their head I am sure I can track something down in one of the other languages . . .

Take care

Rhys
__________________
System: My System
CPU
Athalon 64 3000+
Motherboard
Gigabyte GA-K8V Ultra-939
Monitor
Diamond Digital DV175
Rhys is offline   Reply With Quote
Old 07-06-05   #3 (permalink)
<3 TB303
 
Xaimus's Avatar
 
amd nvidia

Join Date: Dec 2004
Location: Manhattan, KS
Posts: 575

Trader Rating: 0
Default

Right click on "my computer", go to "properties", go to "advanced", go to "environment variables", and add the appropriate variable.

EDIT: oho, it has to be automated. ignore this post.
__________________
System: Turd
CPU
Sempron 2800+ :(
Motherboard
GA7NF-RZ :(
Memory
1.25GB
Graphics Card
geForce 6800XT
Hard Drive
80GB + 120GB
Sound Card
M-Audio Audiophile 192 :D
Power Supply
500W Seasonic S12
Case
Black Antec P180 :D
OS
FreeBSD 6.2-RELEASE :D :D
Monitor
Two 17" CRTs

Last edited by Xaimus : 07-06-05 at 12:03 PM.
Xaimus is offline Overclocked Account   Reply With Quote
Old 07-06-05   #4 (permalink)
Lord of the Chicken Wings
 
VulcanDragon's Avatar
 
intel nvidia

Join Date: Aug 2004
Location: Columbus, OH
Posts: 5,218
Blog Entries: 25

FAQs Submitted: 1
Trader Rating: 0
Default

You need to change a registry key. The PATH is stored in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Environment\Path. If you want the change to take effect immediately without a reboot, then you need to send a WM_SETTINGCHANGED Windows API message to the system to tell it to reread the registry.

I found some Delphi code on the web that explains the process, I'm sure you can translate it into whatever language you are using.

http://bdn.borland.com/article/0,1410,28254,00.html
__________________
Vulcan Dragon
Core i7 920 @ 3.8 GHz
Currently Playing: Grand Theft Auto 4 (X360); Rock Band 2 (X360); Far Cry 2 (PC)
XBox Live Gamertag: Vulcan Draggon

System: Vulcan's New Hotness
CPU
Core i7 920 @ 3.8 GHz
Motherboard
Asus P6T Deluxe
Memory
6GB Corsair XMS3 DDR3-1333
Graphics Card
EVGA GTX 260 (216)
Hard Drive
300GB Velociraptor (main)
Power Supply
ThermalTake 850W
Case
Lian Li PC-6077
CPU cooling
TRUE 120
OS
Vista Ultimate x64 SP1
Monitor
Gateway FHD2400
VulcanDragon is offline Overclocked Account   Reply With Quote
Old 07-06-05   #5 (permalink)
Commodore 64
 
WarGreymon's Avatar
 
intel nvidia

Join Date: May 2005
Location: Colorado Springs, CO
Posts: 512

Rep: 55 WarGreymon is acknowledged by some
Unique Rep: 39
FAQs Submitted: 1
Trader Rating: 2
Default

Wow. I was kinda lost by that, so I downloaded a trial of Wise for Windows Installer and made a MSI installer package.

Thanks for the info.
__________________
Google Talk: davyn.hauk
My FAQ

OLD Rig: Athlon XP-M 2600+ Barton, ABIT NF7-S v2, Corsair VS 512MB DDR400×2, AthenaPower 450W PSU, Sapphire Radeon 9600 256MB AGP


System: Slicker Than Snake Snot
CPU
intel C2D E6850 @ 3.6GHz
Motherboard
Abit IP35 Pro
Memory
2x Crucial Ballistix 1gb DDR2 800
Graphics Card
eVGA 8800GT 256MB
Hard Drive
250GB SATA2, 2x 500GB SATA2
Sound Card
Creative X-Fi Platinum
Power Supply
Zalman 750W
Case
CoolerMaster Wave Master
CPU cooling
Zalman CNPS9700-NT
GPU cooling
Stock
OS
Windows XP Pro
Monitor
Samsun 22" WS LCD
WarGreymon is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 03:34 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.24750 seconds with 8 queries