The program i am working on patches/updates the clients game...
The game it is made for is very old and it has 2 patches. For a person to play they need to install the patch. Once the patch is installed if they decide they want to play using the other patch they have to uninstall everything and start again.
I wanted to make a program to fix the issue,
The program i have made has two buttons. Version1 and Version2. When they click Version1 button it searches C:\PROGRA~1\Game\ For files, deletes specified files and then copy's files from the folder that comes with my program installed in program files. to the game path.
I realized the above path i am using. If they aren't using windows 32 bit this will not work. How do i determine the clients program files location if i am using inno setup?
How to determine/find program files
Page 1 of 17 Replies - 558 Views - Last Post: 18 July 2012 - 07:18 PM
Replies To: How to determine/find program files
#2
Re: How to determine/find program files
Posted 17 July 2012 - 11:21 PM
I'm not sure what inno setup is capable of, so this advice might be wrong. But what I would do is check the common paths where user usually installs the games, like program files folder and program files (x86) folder. If the game is not found there, ask the user where the game is located.
Or does the installation leave a mark in a registry? That might tell you the exact path to the game install directory.
Or does the installation leave a mark in a registry? That might tell you the exact path to the game install directory.
#3
Re: How to determine/find program files
Posted 18 July 2012 - 04:23 AM
This is not a C# problem, so I'll move this to Software Development.
#4
Re: How to determine/find program files
Posted 18 July 2012 - 06:04 AM
You can't even be sure there is a C: Drive to start with. I've been on computers that booted on D:
Look at the SpecialFolders enum to check for the startup drive.
The build paths using System.IO.Path.Combine and check if the file is in Program Files or Program Files (x86)
There is no magic here. You program has to do some work and look around.
Look at the SpecialFolders enum to check for the startup drive.
The build paths using System.IO.Path.Combine and check if the file is in Program Files or Program Files (x86)
There is no magic here. You program has to do some work and look around.
#5
Re: How to determine/find program files
Posted 18 July 2012 - 07:31 AM
tlhIn`toq, on 18 July 2012 - 06:04 AM, said:
You can't even be sure there is a C: Drive to start with. I've been on computers that booted on D:
Look at the SpecialFolders enum to check for the startup drive.
The build paths using System.IO.Path.Combine and check if the file is in Program Files or Program Files (x86)
There is no magic here. You program has to do some work and look around.
Look at the SpecialFolders enum to check for the startup drive.
The build paths using System.IO.Path.Combine and check if the file is in Program Files or Program Files (x86)
There is no magic here. You program has to do some work and look around.
Oh ok. You wouldn't happen to be able to have a link to that by any chance mate?
#6
Re: How to determine/find program files
Posted 18 July 2012 - 07:34 AM
#7
Re: How to determine/find program files
Posted 18 July 2012 - 07:41 AM
Finding answers to specific problems:
Sometimes just knowing where to look can make all the difference. Google is your friend.
Search with either "C#" or "MSDN" as the first word: "MSDN Picturebox", "C# Custom Events", "MSDN timer" etc.
How to do a good search that will get you targeted answers.
Sometimes just knowing where to look can make all the difference. Google is your friend.
Search with either "C#" or "MSDN" as the first word: "MSDN Picturebox", "C# Custom Events", "MSDN timer" etc.
How to do a good search that will get you targeted answers.
This post has been edited by tlhIn`toq: 18 July 2012 - 07:41 AM
#8
Re: How to determine/find program files
Posted 18 July 2012 - 07:18 PM
Thanks guys...
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote






|