Find Steam installation directory in Inno Setup - installation

I want my installer to find the user's Steam folder and install the game there
The Steam folder is like F:Steam/steamapps/sourcemods
Because everyone has Steam downloaded to different drives and folders, the installer needs to find the sourcemods folder in the Steam root folder.
I do the installer in Inno Setup.
Please help, thank you in advance.

See How to get path of installation of target game/application from registry when installing mod/plugin using Inno Setup?
You just need to modify the code to look into appropriate registry key, as shown in the answer by #IneedHelp.
RegQueryStringValue(
HKCU, 'SOFTWARE\Software\Valve\Steam', 'SourceModInstallPath',
InstallationPath)

The path you're looking for is stored in the registry under Computer\HKEY_CURRENT_USER\Software\Valve\Steam in the SourceModInstallPath. You could grab it as such:
string keyName = #"HKEY_CURRENT_USER\Software\Valve\Steam";
string valueName = "SourceModInstallPath";
string sourceModInstallPath = (string)Registry.GetValue(keyName, valueName, null);

Related

Install Shield doesn't create new folder

I am new to installshield. However, I'm trying to apply the simplest of commands, but ran into an issue.
I have an installation that needs to be installed in c:\program files(x86) (Tried other locations as well). We want to make it automated, so we applied the following command to record the installation.
(Location of the setup)\Setup.exe -r -f1(Full path)\SetupAnswer.iss
and run the setup smoothly.
which installed in c:\program files(x86)(Program name) and created an answerfile
Next when I try to run (Location of the setup)\Setup.exe -S -f(Full path)\SetupAnswer.iss On a new PC it doesn't work.
After some testing. I found that if I create the folder name in c:\program files(x86)(Folder name) before I run the command above, it works like a charm.
I can create a short script to create a folder before running the setup command. But it doesn't look "clean". Checking the .ISS file reveals that at the location it wants to create the folder it looks like this -
szDir=(installation path)\(Folder name)
Result = 1
Not sure if this szDir means create or just use the following path.
Let me know if I'm missing something.
Regards,
Nik
There was an issue with the installation sequence, found it after following yossiz74 advice. There was a missing line due to the folder already existing in c:
Reinstalled it on a clean PC with the record method - Problem solved.

Is there a Windows system folder property keyword for the username directory?

I'm trying to use cx-freeze to create an installer for a program that I'll distribute to my colleagues. I'd like to set the default installation location as the user's username folder (e.g., C:\Users\myUserName) in my setup.py file.
options = {
'bdist_msi': {
'initial_target_dir': <Username Directory>
}
}
However, the Windows system folder properties reference doesn't seem to mention a keyword that would let me access the username folder directly.
I tried building the path myself using the USERNAME property, i.e., passing in the argument C:\Users\[USERNAME]. However, the installer simply drops the USERNAME argument and returns C:\Users.
I took a look at this question on setting a folder as a system folder, but that would set the path string to whatever the developer's username is when creating the .msi file rather than the end-user's username. (Using os.path.expanduser() would do the same thing; documentation here.)
Does anyone know of a keyword that would allow my installer to dynamically access the user's username directory?

Where is the location on the extracted .msi file?

I have a setup exe, and I want its .msi file for administrative installation (see https://superuser.com/questions/307678/how-to-extract-files-from-msi-package)
But, although I see at the beginning the extraction of .msi, I can't find it.
Where is the location of this file?
Usually MSI file(s) might be extracted in different temp locations depends from who was launched (User\System\etc) and how configured setup.exe. Sometimes you can extract it with help of different command-line switches for setup.exe.
The simple way to check - launch it under user account, go to %temp% folder, most likely there should be created folder with {GUID_view_name}. Inside this folder you will find MSI file.
User's %temp% folder has different location in different Windows versions:
Windows XP\2000\2003:
"C:\Documents and settings\{user name}\Local settings\Temp" or "%userprofile%\local settings\temp"
Windows Vista\7\8\2008\2012
"C:\Users\{user name}\AppData\Local\Temp" or "%userprofile%\appdata\local\temp"
P.S. Also you can check this SO question-answer.
Snapshot a clean VM and use a program such as Install Watcher or InCntrl to record the current state of the file system. Run the setup.exe until you are on the first dialog of the MSI and take another recording. Diff and look for where the MSI and related support files appear.
I found a much better solution, Igor, gave me the idea.
I used ProcessMonitor and filtered with Process is "msiexec.exe" and Path ends with ".msi".
I found the msi in:
C:\ProgramData\Downloaded Installations\{41A70E83-DA5D-4CA6-9779-73C9330E3D13}\IQProtector64.msi

appcfg.py is not running with cmd prompt (Windows 7)

I am having strange problem. I used to run appcfg.py to update my app to appengine but now its not working anymore. When I run this command
C:\Program Files <x86>\Google\google_appengine>appcfg.py update E:\path\myApp\
Its not giving me anything, no error no feedback. Its just back to this line
C:\Program Files <x86>\Google\google_appengine>
Any idea about this issue!
P.S. I'm using Python 2.7. My code is updating through google app launcher but I need to run it from cmd prompt as I will be downloading/uploading appengine stuff which launcher doesn't allow me to do!
Thanks
I still had a little trouble with the instructions. Here's the steps I used to create a batch file to use the Google App Engine download_app with Windows 7.
In my example,
I'll use drive, C:
Default python path will be, C:\Python27\python.exe
GAE path (include "), "C:\Program Files (x86)\Google\google_appengine\appcfg.py"
App ID {your_app_id} will be just your app-id name
{your_app_version} is the "Version:" number in your GAE app.yaml file
I'll create a folder on my Windows 7 desktop and call it GAE_App
The desktop folder path will be C:\Users\{username}\Desktop\GAE_App
{your email} will be the Gmail account connected to your GAE
Right-click on the desktop and select New->Text Document. Open the newly created text document and add the following line of code modified for your setup to the blank text document,
C:\Python27\python.exe "C:\Program Files (x86)\Google\google_appengine\appcfg.py" download_app -A {your_app_id} -V {your_app_version} --email={your email} C:\Users\{username}\Desktop\GAE_App
Save the text document and change the file name to GAE_Download.bat
It's important that the extension now says ".bat" instead of ".txt"
Once finished, click on the batch to execute it. You'll be asked for a password and then the files should download into the GAE_App folder on your desktop. Now, whenever you need to download your files, just click on the batch file.
Not sure why Google didn't simply include this feature with their GAE for Windows software.
I faced the same issue. Here is a simple solution.
Just do this following Steps:
Go to program file where google app engine is installed. Generally It is named as Google.
click on appcfg.py and select open with.. Select "Choose Default Programs".
Select Python from programs and select "Always Use the selected program to open this kind of file" .
Now run the command you should get the results on command line.
For reference click here
Fixed by accessing python lib like that
C:\Python27>python appcfg.py update E:\path\myApp\
Here's a solution that worked for me:
"google_appengine/appcfg.py" update "C:\PATH TO APP
The appcfg.bat that should be used is located **C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\appengine-java-sdk\bin** and not the empty appcfg.bat that for some unknown reason also was here C:\Program Files\Google\Cloud SDK\
Good practice is to add this path to the system variable PATH
This worked for me
Basis
<PATH_TO_PYTHON>python <PATH_TO_APPCFG.PY>appcfg.py -A <PROJECT_INSTANCE_NAME> update app.yaml
Example
X:\Software\Python2.7\python Q:\SOFTWARE\GoogleAppEngineSDK\appcfg.py -A great-1337 update app.yaml

How to export ftp list from phpdesigner 8?

I've got ftp connections list in phpDesigner.
How to export or to save it?
you can find the ftp xml file in:
C:\Users\your user dir\AppData\Roaming\phpDesigner
phpdesigner_ftp.xml
For Windows XP users (and I assume they still exist in numbers!)... the Path is:
C:\Documents and Settings\[Windows-User]\Application Data\phpDesigner
For example, I've Windows User account with the name "Ruturaaj". So, my path looks like:
C:\Documents and Settings\Ruturaaj\Application Data\phpDesigner
It's quite handy to know this folder because it contains some other useful XML files as well. For example, look for "autocomplete.xml". This is the file that contains all Auto-Complete code snippets you've added to phpDesigner over a period of time. Now that you know this folder path, I'd suggest to backup this folder and simply overwrite the files with new installation to setup same environment over and over again.

Resources