How do I save the installer metadata in the folder with the installed application? - installation

I have an app for Windows. I build the installer for this application using InstallForge.
Task: transfer metadata from the installer file (1 specific parameter) to the folder with the installed application.
For example: InstallerMyApp.exe contains in its metadata the parameter "Modification date" with value "01.02.2023". During the installation I specify the path C:\Program Files\my app.
As a result, I want the installer to create in the folder C:\Program Files\my app the file "Modification date.txt" which will have the value "01.02.2023".
To paraphrase, I need to automatically save the installer metadata in the folder where the application is installed.
How is it possible to do this?
I would be grateful for even the slightest hint.
Frankly, I have no idea what to do.Perhaps I should give up InstallForge.

Related

C++ WinApi project access issue

I have a C++ WinApi project which works fine in VS (Debug and Release) , the application writes some data in a text file start.txt and copies some images to a directory "bitmaps" , both the text file and the directory are located in the Application's main Directory, but when I install the application with a setup program in C:\Program Files (x86)\ or in C:\Program Files\ , both the text file start.txt and the folder "bitmaps" become read only , not accessible for the application to store data in them, so the application does not function correctly and some error show like:
((cimg::fopen(): failed to open file 'C:\Program Files\application Name\bitmaps\user1.bmp with mode 'wb'))
this is understood because there are no images in the directory, I checked also the text file start.txt also empty
I have read somewhere that Windows System does not allow writing data in the "Program Files" and "Program Files (x86)" directories and data should be written in AppData or somewhere else by applications
by the way , the application does run correctly if I run it as administrator
is there a way to set permission to the directory and the text file to make them accessible (writable) for the application to store data into without running the application as administrator after installing it?
The best solution to this is to store data where they should be for example in the AppData , the problem then will be solved
to get the path of AppData folder :
Appdatapath= getenv("appdata"); // geting AppData path
Appdatapath +=("\\yourappData"); // adding a new directory for your
// application where data are written

"msadox28.tlb File is under windows system file protection" error while attempting to build an installer

I am trying to build an installer for my project. The problem is that i am unable to successfully build the installer with the following error:
ERROR: 'msadox28.tlb' should be excluded because its source file
'C:\Program Files (x86)\Common Files\System\ado\msadox28.tlb' is under
Windows System File Protection.
From what i can gather, this file has to do with ADOX and ADODB that i use to create, read and write data from a local access database. Excluding this file causes the program to not work at all when it has been installed, because it attempts to create a fresh database from scratch at first launch.
The program works fine and there is no errors with it, but i want to build an installer so that i can send the program to a few users to test it and the database component is the most important part of my project.
Can somebody please assist me with solving this problem?

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

error when i want to save java file in jdk/bin

when i save java file error is you dont have permission to save in this location contact the administrator to obtain permission on window7
Don't store application data in the "Program Files" directory.
It is very bad design and regular users don't have write access to that directory (for a very good reason).
So even if you changed your settings locally to open up the door for viruses your application won't run on other computers.
Besides: storing a Java file in the JDK directory serves no purpose at all.
Btw: your uppercase letters are broken, as well as the dot or the comma...
That's normal - jdk/bin is the installation directory of the JDK, regular users cannot (and should not) write files there. You'll have the same problem on Linux/Unix and on Mac OS X, where installation directories are off-limits to regular users.
Write your files to the users home directory (System property "user.home", works across platforms), or let the user choose where you save stuff.
Bin directory do not allow directly to save program in it.
it is so simple, just save your .java file on desktop and then copy paste it in Bin. done ;)
If the file can't save directly to c:\program files\java\jdk1.8.0\bin\
Solution:-
Click start Menu type Notepad command in run run as administrator
Right click the Notepad run as Administrator, then type the program file can save directly to c:\program files\java\jdk1.8.0\bin\
Just try it......

Resources