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
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\"
__________________
The Portable Application Template should do what you want.