Hello, this is my first post, and I've been trying to make my halo portable. Yes, these already is a post like this, but it's pretty much dead and I want to start anew. Now right off the bat here, I'm not trying to get a free game or give one to somebody else. All I'm asking for is help in making a launcher, which isn't illegal. But back to the main point. I've tried the portable apps creator deal, with no avail. I did the scripting right, but all it does is start the exe all by itself individually, which goes on and tells me it needs it system files, even though the files are in with it. Maybe there is no way to make it portable, because it leaves it MY GAMES folder in documents. This isn\t a problem, nor is the fact if it isn't there the next time you use it, it says it needs the folder, which I proceed to just copy and paste my copy there instead. The only real Registry items I find that hinder it are these, which I also added to the script.
This isn't Custom Edition. I've searched all over the net and all I get is Halo Portable for PSP. Any help at all would be appreciated. I'm also trying to find a way to make command line parameters a possibility. Anyway, I am a big fan of Portable apps and I've always wanted to keep an extra link to the world in case mine is cut.
i'm sure it is possible but it probably can't be done by Portable Apps Creator. That tool, contrary to how it sounds, is not how the developers of this site make Portable Apps. That tool is an attempt to automate the process (I haven't really tried it yet). I can't really tell if you said you were writing your own script or if there is script editing inside of portableapps creator. let me know that first and i'll reply again
Well, Portable Apps Creator has a script editing software built in and a guide to edit a template they give you. It looks like this after you have the script done...
RunWait("regedit.exe /s Data\portable.reg", @ScriptDir)
RunWait("regedit.exe /s Data\portable2.reg", @ScriptDir)
RunWait("regedit.exe /s Data\portable3.reg", @ScriptDir)
RunWait("regedit.exe /s Data\portable4.reg", @ScriptDir)
RunWait("regedit.exe /s Data\portable5.reg", @ScriptDir)
RunWait("regedit.exe /s Data\portable6.reg", @ScriptDir)
RunWait("regedit.exe /s Data\portable7.reg", @ScriptDir)
The contents of the Halo Portable Folder are:
APP (holds halo and system files)
DATA (hold registry files)
halo.exe (this is the script converted into exe.)
The script works, but it only runs the halo.exe file in, my best guess, an isolated enviroment. It say once the exe runs, it says in the halo error box "config.txt is missing from system folder...." If you move the config file up with the script, it causes it to say its missing another system file.
Sounds like this is more an issue of how to get PortableAppsCreator to work.
You could use Sysinternals Process Monitor to watch and see what the program is doing. Among other things it could tell you where the program is looking to find files. If it is still looking under "c:\program files", you probably have registry entries to wrestle with; if it is looking in the folder where the launcher is located (or some other directory) you might need to get PAC to SetOutPath to the directory where the files actually are. Or maybe it needs to fix the PATH environment variable so the directory, where the files are located, is on the path.
Anyway, ProcMon can give you more clues. How you get PAC to deal with them is something you'll have to the PAC folks.
Ahhh, this does look like a working directory error. Trying changing the first line of your script to -
I tried it and it worked! But now to the next problem, how to get the saved games folder to work and how to put in command line parameters. Is it possible to put in a command line after the script?
But I need more details so I know what to change.
First off, you'll have to explain what is going on with saved games, why/how it doesn't work, and how it should work. I don't have this game so I'm kinda flying blind.
Second, what kind of commandline params are we talking about? Give me some examples so I know how to code it.
Well, the Halo game, when installed or run on a new computer, it will first ask you to create a new profile, which is added to My Documents\My Games\Halo. I want to make it to run of the DATA\My Games folder on the USB. Otherwise it would be nice if it deleted itself during exit. Now the command line parameters are to make the game run in a window. The command is -window, which you need to put in the shortcut.
Ok, so first the easy one, commandline support. Change the first line of the script to -
Now when you pass the launcher a commandline, it will it turn be passed to the Halo executable.
Now for the profile, I need to know how Halo remembers where this profile is. Is it a registry entry, and INI file setting, does it read from an environment variable? We can go from there.
Ok. But where does the command line go exactly? Does it go here:
RunWait('"' & @ScriptDir & '\App\halo.exe" ' & $CmdLineRaw -window, @ScriptDir & "\App")
And on that second one, I'm currently searching my registry for it.
No, the commandline would go in the shortcut properties of your Halo LAUNCHER. So if the launcher is called HaloLaunch, you would add -window to its shortcut properties. The commandline is then passed to the Halo EXE when it is launched.
If you were to run it from a cmd prompt, for example, it would be
Well, I wanted the Launcher to run without the shortcut, because the shortcut deal doesn't work with The Portable Apps Menu.
I decided to go in and add the "-window" command line parameter in script of behind the exe file. And it worked! Now for the Saved Games deal, I'm thinking on writing a bat file to move the folder in and remove it on exit, which would get around the deal of the hard coded saved games area.
According to Many online sources, Halo's Save Folder Is hard Coded, so we will either have to Move the folder there, or we will have to change the exe itself.
Depends what you mean by hard-coded. Halo might read an env variable or something like -
In which case we could redirect the %userprofile% variable to point to somewhere on the USB drive.
I checked the variables and none of them have any application data referring to Halo, much or less the directory of the My Games Folder. I used text editor to open the halo.exe and it showed a jumble, but there was things you could read. Either way I think the Environmental Variable deal is a dead end. I think the best deal we got is to make the script to copy the folder to My documents and then to delete it after the game is over. It's clean and shouldn't be a problem if the registry files are all found and set.
What I meant by the environment variables is that Halo might read the current user's %userprofile% env variable (from the system, you can see it by opening a cmd prompt and typing 'set' then hit enter). Then it would create the path to the My Games folder as I wrote above. If so, we could redirect the %userprofile% variable to point to the USB drive. But there's no way to know for sure, so it would be trial and error.
Anyway, how big is this 'My Games' directory that holds the profile?
Lastly, hardcoding your commandline is OK, but fairly inflexible. The current PAM menu doesn't support specifying commandlines, but the new PAM might when it comes out. Also 3rd party menus like PStart support commandline arguments. In the end it's your choice obviously. But your version would look like this -
Yep the script is like that. I really just wanted it in so the game would run windowed. I'm planning on putting this into beta testing after we get it done.
The My games folder is 85 mb. Its no big deal since I have an 8gb USB.
And I checked the environmental variable that way as well. This is what I get:
C:\Documents and Settings\ME>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\ME\Application Data
CommonProgramFiles=C:\Program Files\Common Files
HOMEPATH=\Documents and Settings\ME
PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 8, GenuineIntel
USERPROFILE=C:\Documents and Settings\ME
The "ME" is my profile, which doesn't matter. Also, would redirecting the userprofile disable the machine since its a required field or make it difficult to change back? And how would we be able to hardcode in the script to do that?
Environment variables can be set in such a way that only programs which are run by the launcher will see them. They are temporary and not system wide. Once the launched program is closed, the temporary variable goes with it. So no, it does not harm the system at all. And this can be coded into the launcher. It will just be a PITA if we're just guessing at it though.
I'm hoping it can be done though if you can find a little more info. Moving 85 MB back and forth is going to take a long time.
Ok, well I went and set the homepath and userprofile variables to a different folder, but the game didn't save to them.
Wow, I'm stupid. While I was searching "Changing My Games Folder", I found out that in one of Microsoft's updates to the game included the option to put in the -path command line parameter to set where the files will get saved. I tried it out by putting it into my shortcut and putting a folder directory into it and bam! It worked. Now we know how to do it, since I'm assuming if halo needs you to put that in to change the directory, It must be hard coded into the game, since windowing the game requires the same thing. Now, How to we make the game work when the drive name changes, since someone it bound to need that to work.
The best way to do that is make all paths relative in one of 2 ways -
1. make everything relative to the directory where the script is located
2. use the script dir to set the current drive into a variable -
Decide which you want to use, and if you need help I can write out the whole Run command for you.
I just didn't put in a drive letter in the beginning and it worked. It looks like this:
RunWait('"' & @ScriptDir & '\App\halo.exe" -window -path \PortableApps\Halo Portable\Data\Saved Games Folder\Halo' , @ScriptDir & "\App")
I tried it and It worked.
Yay. We technically got a working version of a Halo Portable Launcher. Sometime tomorrow I'll try it on another computer and catch any remaining registry keys. After that, I'm wondering, Is it possible to put in a command in the script to make it so it will copy game files and saved games to the data and app folder if the files aren't in it?
Sure. Youe have to test if the files are present, then if they aren't copy them from some known location.
Oh, and it's good practice to use full paths with drive letters when using run commands. It's just a safety issue. Especially important with copy, move, and delete commands.
Does the regedit command work without administrator rights?
Depends where you want to write to. You can write to HKCU, but not HKLM.
I talked to a friend of mine and he says you can make a bat file to temporaliry make you have access to the HKLM registry. Is it true?
Only if you have the logon credentials for an admin account. Can you imagine the security hole if you could just arbitrarily escalate your user privileges?
In case he *can* actually do it, I wanna see the code
Hehe- think of the evilness!
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
Well, Im back people, whether or not its good is up to you. I finally found a possible solution to the registry writing deal and its a script...
Dim WSHShell, rr, rr2, MyBox, val, val2, ttl, toggle
Dim jobfunc, itemtype
On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")
val = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"
val2 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"
itemtype = "REG_DWORD"
jobfunc = "Registry Editing Tools are now "
ttl = "Result"
'reads the registry key value.
rr = WSHShell.RegRead (val)
rr2 = WSHShell.RegRead (val2)
If (rr=1 or rr2=1) Then toggle=0
If toggle = 1 Then
WSHShell.RegWrite val, 1, itemtype
WSHShell.RegWrite val2, 1, itemtype
Mybox = MsgBox(jobfunc & "disabled.", 4096, ttl)
Mybox = MsgBox(jobfunc & "enabled.", 4096, ttl)
Now, the only thing is, is that it pops up the registry enabled or disabled every time it is used. Can somebody help me remove that and to add its ability to detect if registry editing is on or not?
Oh yeah, AND its like a switch, so clicking once will turn on, and clicking again will turn off.
I know this script from Doug Knox's site. Unfortunately, this only enables/disables the ability for you to run regedit. It does not change any Windows permissions, so you will still be unable to change anything in the HKLM key.
I will try it out and see if it works. But is there anything else to resolve this issue?
Nope. It's the way Windows works.
But how does John do it?
He doesn't. If an app requires admin rights, it's not truly portable. Other apps like Notepad++ that normally write entries to both HKLM and HKCU, under non-admin accounts only the HKCU entries are handled, because the HKLM entries cannot be created.
Sorry, it's just the way it is. Will Halo even work under a non-admin account? If so, just find out where it writes its reg entries, and conditionally handle them depending on what kind of account you run it under. You can check out the N++ launcher for how this is done.
Well, i looked at the other registry keys and i guess they really don't matter. I guess ill just remove them and just deal. Ok, now we have a living, breathing launcher. Anything else before i move this to beta and give it out to people in need?
I have the same prob. too. First of all this is a school computer I'm using. The prob. is that the school blocked programs from retrieving data from the S-DRIVE in other word where my documents are which is where saved data for halo is. So when I open the game it says cant access data. Im wondering if there is a way to fix that entirely. Or just change where the game retrieves the data?
Halo ce clearly has bugs. however if u are haveing startup problems such as the error message the way to fix it is to apply compatibility settings. if u are playing o a school server chances are you might have this problem. u have to go to compatablility wizard and apply compatablility setting to halo ce. if done correctly the computer will automatically start up a correct halo ce. if your school blocked the data chances are you can download a bypass from the internet.