You are here

Halo (This is Legitimate)

39 posts / 0 new
Last post
Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Halo (This is Legitimate)

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.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Halo
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\Halo
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Halo
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\Halo
HKEY_USERS\S-1-5-21-1993962763-1708537768-682003330-1004\Software\Microsoft\Microsoft Games\Halo
HKEY_USERS\S-1-5-21-1993962763-1708537768-682003330-1004\Software\Microsoft\Windows\ShellNoRoam\MUICache
HKEY_LOCAL_MACHINE\SOFTWARE\C07ft5Y\halo

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.

Travis Carrico
Offline
Last seen: 15 years 3 months ago
Developer
Joined: 2006-10-22 00:30
_

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

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
well...

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("App\halo.exe")
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.

rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
Sounds like this is more an

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.

MC

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Working directory

Ahhh, this does look like a working directory error. Trying changing the first line of your script to -

RunWait("App\halo.exe", @ScriptDir & "\App")

and recompile.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
It worked.

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?

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
In short, yes

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.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Things to fix

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.

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Ok, so first the easy one,

Ok, so first the easy one, commandline support. Change the first line of the script to -

RunWait('"' & @ScriptDir & '\App\halo.exe" ' & $CmdLineRaw, @ScriptDir & "\App")

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.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Question..

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.

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
No, the commandline would go

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

HaloLaunch.exe -window

Make sense?

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Wait...

Well, I wanted the Launcher to run without the shortcut, because the shortcut deal doesn't work with The Portable Apps Menu.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Never Mind

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.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Now for the Hard One

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.

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Depends what you mean by

Depends what you mean by hard-coded. Halo might read an env variable or something like -

%userprofile%\My Documents

In which case we could redirect the %userprofile% variable to point to somewhere on the USB drive.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
I'm Not Sure

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.

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
What I meant by the

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 -

RunWait('"' & @ScriptDir & '\App\halo.exe" -window', @ScriptDir & "\App")
Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Yep the script is like that.

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
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=PAUL
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\ME
LOGONSERVER=\\ME
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 8, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0d08
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\ME~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\ME~1\LOCALS~1\Temp
USERDOMAIN=ME
USERNAME=ME
USERPROFILE=C:\Documents and Settings\ME
windir=C:\WINDOWS

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?

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Environment variables can be

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.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Tried it....

Ok, well I went and set the homepath and userprofile variables to a different folder, but the game didn't save to them.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
I'm an Idiot!!

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.

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
The best way to do that is

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

path = @ScriptDir & "\..\..\whatever"
or @ScriptDir & "\this\dir"

2. use the script dir to set the current drive into a variable -

$drive = StringLeft(@ScriptDir, 2)

Decide which you want to use, and if you need help I can write out the whole Run command for you.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
I got it.

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?

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Sure. Youe have to test if

Sure. Youe have to test if the files are present, then if they aren't copy them from some known location.

If FileExists("some\file") Then
    some command if it exists
Else
    some command if it doesn't
EndIf

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.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Administrator Rights

Does the regedit command work without administrator rights?

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Depends where you want to

Depends where you want to write to. You can write to HKCU, but not HKLM.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Not good then...

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?

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Only if you have the logon

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 Wink

OliverK
OliverK's picture
Offline
Last seen: 2 years 9 months ago
Developer
Joined: 2007-03-27 15:21
me too! Hehe- think of the

me too!

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

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Sorry ive been gone

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...

Option Explicit
'Declare variables
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)

toggle=1
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)
Else
WSHShell.RegDelete val
WSHShell.RegDelete val2
Mybox = MsgBox(jobfunc & "enabled.", 4096, ttl)
End If

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?

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Oh yeah, AND its like a

Oh yeah, AND its like a switch, so clicking once will turn on, and clicking again will turn off.

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
I know this script from Doug

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.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
I should try it at my school then

I will try it out and see if it works. But is there anything else to resolve this issue?

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Nope. It's the way Windows

Nope. It's the way Windows works.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
But how does John do it?

But how does John do it?

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
He doesn't. If an app

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.

Mclovin223
Mclovin223's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2008-02-23 18:02
Ok.

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?

gamejunky378
Offline
Last seen: 11 years 4 months ago
Joined: 2012-11-06 16:53
Halo not working

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?

Giggity Giggity Gu
Offline
Last seen: 10 years 6 months ago
Joined: 2013-01-04 09:50
Halo ce clearly has bugs.

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.

Log in or register to post comments