Unable to write to a file created by an AutoHotKey script - autohotkey

I have a Dell PC with Win7 64 using what I believe is the latest version of AutoHotKey.
I wrote an Installer App with AutoHotKey to create two directories with a number of sub directories then install an exe program and a number of data files into those directories. The App installs into the existing C:\Program Files and C:\Program Data directories.
The Installer App creates the sub directory C:\Program Files\DSOSort then installs the file DSOSort.exe. The installer App then creates the sub directory C:\Program Data\DSOSort and installs a number of additional sub directories with all the associated text data files.
I used the FileCreateDir and FileInstall instructions in the Installation App to create the directories and install the files.
Everything in the Installer App and in the exe program works as it should except that the exe will not make any changes to the text data files in the newly created C:\Program Data\DSOSort directory. I have to open the directory with Properties and allow Users to Write. Once that is done the exe will change data in the text data files correctly and all is well.
If I change the Installer App to create a directory C:\DSOSort then install all the sub directories and data files in there instead of into C:\Program Data\DSOSort the exe can write to the text file. I do not have to change any permissions with Properties.
I tried using the various copies of the C:\Program Data\DSOSort directory I found in C:\Documents and Settings and also in C:\Users. The exe can read them but no Write.
I only have this problem with newly installed directories and again as I said earlier it can be corrected with Properties.
The exe program was written for people with enough knowledge to run the Installation App but do not understand Properties or making changes to the directories.
I could just leave the data files in a C:\DSOSort directory but would prefer to put them in a C:\Program Data\DSOSort directory.
Is there a way for AutoHotKey to check the user permissions and changing them if necessary before installing the data files?
Is my PC behaving properly? Is it supposed to create directories without allowing Write to the files?

Some of these directories, like "Program Files", require admin privileges to modify. I believe that is why you're experiencing that. Have your app run as an admin and it should be fine. The setting for you EXE can be found in the properties.
The A_IsAdmin built-in variable returns whether the current user has admin rights.

Related

How to sync files open between computers using the portable edition?

I have installed the portable edition of vscode on a mega sync folder, and I'm accessing this folder on two different computers that have the same pc/user names, and in both pc vscode is located in the exact same directory:
D:\MEGAsync\vscode
All files open in the editor are accessible and exist on both computers, for example:
D:\MEGAsync\a.txt, D:\MEGAsync\b.txt, etc.
However, when I save/close the workspace in the first computer and open it on the second computer it doesn't contain any of the files I was working on...
In the docs of the portable edition, it says all files exist in the same directory in the folder data, what i'm missing?

Where is Jupyter notebook data saved?

Where is Jupyter notebook data saved?
Is data made viewable to the public when you install Jupyter notebook, how does the token work? Where does the notebook go when you uninstall Anaconda?
Your code is saved locally on your PC, it is not shared to public nor removed upon uninstalling anconda from your PC.
simply you can locate your code by typing in you jupyter notebook pwd which stands for print working directroy.
According to the Jupyter handbook - Common Directories and File Locations the data:
Jupyter uses a search path to find installable data files, such as
kernelspecs and notebook extensions. When searching for a resource,
the code will search the search path starting at the first directory
until it finds where the resource is contained.
Each category of file is in a subdirectory of each directory of the
search path. For example, kernel specs are in kernels subdirectories.
I think you are also interested in the Runtime files:
Things like connection files, which are only useful for the lifetime
of a particular process, have a runtime directory.
On Linux and other free desktop platforms, these runtime files are
stored in $XDG_RUNTIME_DIR/jupyter by default. On other platforms,
it’s a runtime/ subdirectory of the user’s data directory (second row
of the table above).
An environment variable may also be used to set the runtime directory.

DB Installation Issue: Binary files folder (bin) is missing in downloaded zip for MongoDB (Windows 64-bit)

I downloaded the MongoDB for Windows 64-bit from http://www.mongodb.org/downloads.
File name: mongodb-src-r3.0.3.zip
However, the zip folder doesn't have a bin folder & no .exe files to use for installation (as given in the installation steps).
The below commands say that I use Windows 7 64-bit architecture.
wmic os get caption
wmic os get osarchitecture
Even tried using the .msi (Installation Package) given in the same downloads page. It doesn't give any error. But still the bin folder is not created to test MongoDB (mongod.exe).
Am I missing something?
I also faced the same problem as #ArcherGilly told to install again and select the custom options and by doing this finally I found the bin folder with other txt file like license
C:\Program Files\MongoDB\Server\4.0 -> Previously there were only two folders
data
log
and Now along with the above two folders, there is bin folder along with 4 more files
LICENSE-Community.txt
MPL-2
README
THIRD-PARTY-NOTICES
THIRD-PARTY-NOTICES.gotools
I had the same problem, but once I used the .msi installer and selected 'custom', instead of 'complete', it installed the /bin folder.
I had the same issue.
It could be because you changed the installation directory to another drive where the windows folder isn't.
So if this your case, simply find the bin folder in the C: drive.
After the installation, I used the installer and chose the make changes option without making really any changes. After the process was finished I found the bin folder.
After downloading the msi and installation process. I found the bin folder but there is no mongo.exe file in that folder.
But when I run the path enclosed in " \mongo.exe" in command prompt, the mongo db is running.
while using .msi installer please select 'custom', instead of 'complete', it will create the bin folder at \Installation_Dir\MongoDB\Server\4.2\bin\
Thanks

Unable to install plugin hostmanager in vagrant in windows 8.1

Not able to install plugin its showing the below error...
C:\devbox>vagrant plugin install 'vagrant-hostmanager'
The directory where plugins are installed (the Vagrant home directory)
has a space in it. On Windows, there is a bug in Ruby when compiling
plugins into directories with spaces. Please move your Vagrant home
directory to a path without spaces and try again.
Ruby (language used by Vagrant) has "issues" with directory names that contain spaces.
Vagrant will use an environment variable (supplied by windows) to tell it where your user directory is (so it can decide where to put your "home" directory). But you might have a space in your user name (I do) which causes a problem for ruby (which is doing the work to install the plugin).
The solution is to move your project to a project directory you choose that doesn't have any spaces in the directory name. Then, use an environment variable called VAGRANT_HOME and set it to a specified directory. The plugin installation procedure will check for the existence of this variable and use it if it exists instead of locating a home directory within the windows current user directory.
I created a folder called home within C:\Hashicorp\Vagrant and used that (C:\Hashicorp\Vagrant\home).
Setting windows environment variables is not hard (rather trivial actually) - you can find out how here: http://www.computerhope.com/issues/ch000549.htm
You'll have to do a restart to your system for it to take effect (it all worked after a reboot for me).
I've found a slight variation to the #Reinsbrains answer. In order to have a home directory without spaces within its name. I created a junction to my user/home directory. In my case I decided to go with a Linux style structure, but any location would work. In an admin command prompt:
mkdir c:\home
mklink /j c:\home\maarten "c:\users\Maarten Bicknese"
Next set the VAGRANT_HOME environment variable to the newly created junction.
setx VAGRANT_HOME c:\home\maarten
Fire up a new command prompt and you're good to go!

MATLAB permission denied to access files from C (OS partition)

I created an installer with Installshield for my MATLAB GUI. Installer copies all files of my program to c:/Program files/Program_name. When I run it from shortcut, an error appears that can't overwrite some file. I think this is a permission error because my program is in OS partition. I have some functions like mget , mput and fprintf for some text files in that directory and some times my software download some files from FTP and copy them in discoursed directory.
When you copy some codes that have functions like these and run your code from C:/ (OS partition), you have this problem (without using any installer). I need an automatic solution because this program is going to install on some computers.
How can I solve this problem?
Thanks.
Write to MyDocuments instead (e.g. appdata) - that's the one place where the user is guaranteed to have write permissions.
(Jonas comment. Thank you for your answer)