Archive: Different File Names per client ??


Different File Names per client ??
I can't seem to find the answer anywhere:hang:

Please some one point me in the right direction?

I am making an install for a game and the folder in which it is to install is different per player. I am new to all this I apologize, but I'm learning!;)

$PROGRAMFILES\Game Folder\{This Folder Name Varies}

What to do here?

Thanks so much in advance!


If you're writing as a user, you shouldn't be using $PROGRAMFILES, but probably should be looking into maybe $APPDATA. :) $PROGRAMFILES requires elevation to write into, and you aren't supposed to keep user stuff there.

Someone else here can probably explain more clearly than I can, and link appropriately to things. :)


Where are you getting the folder name from? Do you need to prompt the user for it - i.e. a text box or a list box to select from?

Stu


hmmm I really don't know how to answer your questions I apologize and thanks for trying to answer mine. I will try rewording my issue maybe that will help me get a clearer answer.

I am using "Installer based on ZIP file".
I need it to install files in the same place for everyone who downloads it. Only thing is the folder has various names. The game is always in C;/Program Files/Game Folder/{BUT this name varies}<---need these files to install here.


Maybe this is a little better? Is this something thats not common or something maybe? I figured it would be simple that I would be laughed at for not knowing LOL I guess I am so use to other forums! So Thanks VERY much in advance I truely appreciate any help:D


What I was replying to was "different per player". If it's not different per-user, ignore what I said. ;)

And can you elaborate upon "the folder has various names"? Are you saying that the zip file has a structure like:

SomeFolderName/file1
SomeFolderName/file2
SomeFolderName/dir1/fileA
SomeFolderName/dir2/fileB
and that the full path should be, for example, $PROGRAMFILES\YourGame\SomeFolderName\file1?

It would be $PROGRAMFILES\Game\different per player folder name\file1-13


Hmmmk... May I ask why you're putting that in $PROGRAMFILES rather than $APPDATA, if it's not global to all users? :) (Note that you can avoid having to elevate by not using $PROGRAMFILES...)

Also, answering Afrow UK's question would help you get a better answer. :)


I am thinking I am barking up the wrong tree; perhaps this is way more complicated that I can imagine? I really don't know how else to word what I am trying to do, I really did think it was something simple, but it appears that it isn't.. so I think I will give up the attempt to do it. I am sorry for wasting time and space and if anyone reads this post and can understand what to do with the information I already provided I will still keep tabs and thanks to you both for trying to help me :)


I think what you need to do is simple, but you're overcomplicating matters by not providing sufficient information. ;)

1) As Afrow UK asked, where do you get this variable directory name from?

2) As I asked (or tried to?), is this folder really needing to be installed for all users of the computer?


just an assumption. The game auto installs into c:/Program Flies/Game/(varies depending on version) so thats where that is from (my assumption that is) and it is the same for all players... when they download this install "patch" I am making I want it to auto try to install in that file path i provided but not force it advance users could browse and find their path if they installed it elsewhere just to be different or something lol. As I said before I am not to sure how to answer the questions but hopefuly this might do?


OK, you're starting to give us useful information now. This is an already-installed program that you're patching? Can't you read the installation directory from the registry and use that? There's plenty of howtos on how to do that in the forum and in the wiki. :)


ok so thats kinda what I was thinking when I wrote my last post that it isnt as simple as entering in install path something like: $PROGRAMFILES\Game Folder\$Version,

I guess I should have known it wouldn't be that easy anyhow *smackes forehead* lol

So I will go on a search for how to find the install directory from the registry then.

Thanks!!


Grabbing it from the registry is probably easier than trying to figure out where things keep getting put. :)


Update I been looking and researching for hours on how to do this I am totaly lost :( I have searched under "search registry", "install directory from registry" and several other in which I am too brain dead to list now.

Any idea where to look?

Thanks so much!


I'd suggest searching the forum... ;)