You are here

Portable Code::Blocks?

3 posts / 0 new
Last post
Girvo
Offline
Last seen: 17 years 6 months ago
Joined: 2006-10-10 18:31
Portable Code::Blocks?

Hi there.

I have been trying to create a portable version of the OS C++ IDE, Code::Blocks. So far, I have found the registry key it creates when run, and exported it. Also, I have found the folder that it creates in C:\Documents and Settings\$USERNAME$, called ".Codeblocks" and the file it creates at the same place, called .cb_profile

How can I make a launcher, that loads all these things to their correct places? I trird using a batch file, but the problem is, the registry values include absoltue paths :S

Any ideas?

-Girvo

fireftr
Offline
Last seen: 17 years 6 months ago
Joined: 2006-06-07 16:00
absolute paths

use something like AutoIt (available portable) to script it.

Look up the SID and then write whatever reg keys you need.

e.g., in AutoIt, here's a snippit for a calendar reg i wrote that gets the SID, and writes something back:

__________________

$findsid="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"

$i=0
Do
$i = $i + 1
$usersid = RegEnumKey($findsid, $i)
$testsid = RegRead( $findsid&"\"&$usersid, "ProfileImagePath" )
$foundit = StringInStr( $testsid, @username )
Until $foundit 0

$keytest="HKEY_LOCAL_MACHINE\SOFTWARE\Software by Design\Calendar 2000\Version"
$testread = RegRead($keytest,"")

If @error 0 Then
RegWrite($keytest, "", "REG_SZ","v4.6" )

$keymain="HKEY_USERS\"&$usersid&"\Software\Software by Design\Calendar 2000\"
__________________

hello5959us
Offline
Last seen: 15 years 2 weeks ago
Joined: 2006-05-28 14:55
Use the Portable Application Template

The Portable Application Template should do what you want.

Topic locked