I can't remove the directory C:\ProgramData\Microsoft\Windows\Images\BaseImage-14393
Every method including admin prompt is not able to remove the directory.
You need to change the ownership of the directory to yourself and then give yourself Full control to the directory. After this, you can then delete the folder using the combination Shift + Del.
See the answer from Franklin Chen in this forum thread for detailed steps if needed.
https://social.msdn.microsoft.com/Forums/en-US/dce87a60-629a-4c11-bb7e-e0252311137f/uwpdesktop-app-converter-remove-old-baseimage-14316?forum=wpdevelop
You can use below command which deletes all the expanded base images installed on your host machine.
Process may take a while.
DesktopAppConverter.exe -Cleanup ExpandedImage
Related
Windows seems to put R libraries in a onedrive directory by default if onedrive is in use. This is undesirable especially if you're using both R and onedrive on multiple computers with the same onedrive account.
How would I set my library to be put inside of C:\users<username>\documents instead of in C:\users<username>\onedrive\documents? There are good solutions here (How do I change the default library path for R packages), but they're mostly focused on solving this for a single windows account. Is there a general way to solve it for all accounts?
Every R installation has an etc/ directory with configuration, in it you can set Rprofile.site or, easier still, Renviron.site.
Files ending in .site should not get overwritten on the next install. Make sure you don't bulk delete though.
You can query where it is via R.home("etc"). On my (Linux) system:
> R.home("etc")
[1] "/usr/lib/R/etc"
>
Really excellent solution from here (https://github.com/r-windows/docs/issues/3):
just create an Renviron.site file in the /etc folder of your Rinstallation, then copy the following line to it:
R_USER=C:/Users/${USERNAME}/Documents
This sets R_USER which in turn sets R_LIBS_USER according to the user directory of each account under windows 10.
I'm a freshman, and I created a server with my roomates in order to practice in maintaining a server.
We installed CentOS7. And I would like to ask how I can install a tool for everyone to use?
More particularly, we want to install Cromwell. But since, they don't have instructions on how to install on Unix, I downloaded Linuxbrew and installed it like this.
The downside is that it's not visible to the other users connected to the servers.
I know this is a noob question, but any response would be appreciated.
A standard unix machine has programs (tools and so on) installed in predefined directories like /bin, /usr/bin, perhaps /usr/local/bin. Which to choose is another matter, probably you want /usr/bin. Also the environ variable PATH plays a role.
Into the chosen directory there should be a file representing the "tool". You can put a copy of the executable file in that directory, and set (or check) its permissions. Execution permission can be granted to all users, or only some, it depends. In other words,
/home/me/.linuxbrew/Cellar/cromwell
is not a good place for a "system" tool or app; you should copy that executable in /usr/bin, set ownership (perhaps to root?) with chown, and set the correct permissions with chmod.
You can make a hard link of your executable into the directory; this saves space, but also means that there is only one copy of the executable. Having two different copies (the "stable" one, and the other one you can fiddle with) can be handy.
After the executable is reachable and executable from the chosen users, maybe it needs some support files. To find them, it can rely on fixed locations, or some environment variable, or some configuration file. But all these things are outside of the scope of the question.
Try this command:
you#machine$ sudo chmod [who][op][permissions] filename
"who" refers to the users that have a particular permission: the user ("u"), the group ("g"), or other users ("o", also known as "world"). "op" determines whether to add ("+"), remove ("-") or explicitly set ("=") the particular permissions. "permissions" are whether the file should be readable ("r"), writable ("w"), or executable ("x"). As an example:
you#machine$ chmod o+x file
will add executable permission for others to file.
I have a question. Accidentally I removed my .vimrc file but macvim is still open and all the settings are stored. Is there a way to load it?
I've never used it myself, but you could give the mkexrc command a try.
:mk :mkexrc
:mk[exrc] [file] Write current key mappings and changed options to
[file] (default ".exrc" in the current directory),
unless it already exists.
If you use plugins, you might want to look at your plugin manager's documentation to see if you can get a list of loaded plugin, which would get you halfway to recreating your plugin list.
If your question is how to restore perfect copy of .vimrc only using running vim, I do not know the answer. If your question is how to restore most of your lost .vimrc, please consider following options:
But, firstly, look at the trash :-) (quite obvious, it is not the case, is it?)
There should be also .gvimrc in your home directory. Usually people share the same settings between terminal and graphic versions of macvim, with maybe some minor exceptions, like the size of the window etc. So, if you have .gvimrc you can most probably restore your .vimrc.
The other option can be examining your command history using q: command. If you tried commands before you put them to .vimrc and the history is long enough, you can copy&paste them and thus restore .vimrc.
I am watching a directory recursively using QFileSystemWatcher. And I am not able to rename/delete the parent directory either programmatically or manually if its sub directories are being watched.
When trying to rename manually through system i get a message box saying "The action cannot be completed because the folder/ file in it is opened in another program" and on renaming programmatically it fails.
I got these similar bugs, but no resolution:
http://qt-project.org/forums/viewthread/10530
https://bugreports.qt-project.org/browse/QTBUG-7905
I am not watching . and .. as said in the above link, but still the directory is locked.
In case of programmatically renaming.. I tried a workaround:
1. Remove all the subdirectory paths from watcher before renaming the parent.
2. Rename parent.
3. Add subdirectory paths again.
But here too my program fails on first step. QFileSystemWatcher::removePath() returns false when trying to remove the subdirectory path, and QFileSystemWatcher::directories() show that directory in the paths being watched. Same as posted here https://bugreports.qt-project.org/browse/QTBUG-10846
Since step 1 fails here, step 2 also fails and i cannot rename the parent dir.
I am using Qt5.2.1 and Windows 7.
Kindly help me with a resolution.
This is a bug in QFileSystemWatcher as discussed here
After days of trying, I am finally able to find the solution of my problem by using Win32 API for watching directories on Windows platform. I wrote a blog post on How to use Win32 Api to monitor directory changes. I would like to share the link so it may help others who land up here to find the solution of the same problem.
Win32 API to monitor Directory Changes
I use R under Windows on several machines.
I know you can set the working directory from within an R script, like this
setwd("C:/Documents and Settings/username/My Documents/x/y/z")
... but then this breaks the portability of the script. It's also annoying to have to reverse all the slashes (since Windows gives you backslashes)
Is there a way to start R in a particular working directory so that you don't need to do this at the script level?
You should copy shortcut to R (R.lnk file) to desire folder. Then in "Properties" (right mouse button -> last option) delete anything in field "Start in..." in second tab ("Shortcut"?). If you start R with this shortcut working directory will be that one where the shortcut is.
I don't have english version of Windows so I'm not sure about field names, but they should be easy to find.
Similar questions were in R-windows-faq:
2.5 How do I run it?
2.10 How can I keep workspaces for different projects in different directories?
2.14 What are HOME and working directories?
In 2.14 is mentioned that
The working directory is the directory from which Rgui or Rterm was launched, unless a shortcut was used when it is given by the `Start in' field of the shortcut's properties.
You could use an environmental variable. This can work with Sys.getenv() and Sys.setenv(). For instance:
> Sys.setenv(R_TEST="testit")
> Sys.getenv("R_TEST")
R_TEST
"testit"
If you sent the variable in your script, you should be able to access it from within, and then call setwd() on that output.
Save your workspace to the desired directory and thereafter you just open the workspace from Windows explorer.
I put the following line in front of my scripts and it allows me to work across my computers.
setwd(path.expand("~/path/to/working/directory/") )
where ~ is = to your home directory.
Sys.setenv(HOME = "path") or Sys.setenv(R_USER = "path") can both set the home directory.
In my case, I work on several windows boxes, each have fairly different directory structures, but by setting the home directory properly I can sync code between computers and have them run properly on each one since where I run my R projects have similar directory structures.
If you're using Emacs/ESS, this isn't a problem. I navigate to the directory where my R script is located, open it, then start an R ESS process. An R console pops up with the current directory as R's working directory.
If you haven't converted to Emacs/ESS, I recommend it. (Though to prevent a flame war, I also note there are similar options for Vi users.)
Hope that helps.
Just a detail: instead of reversing the slashes as you say, just add another backslash. Two of these \\ works the same way as one of these /. That makes it at least a little easier.
For Ubuntu:
Insert the following command into your .Rprofile file (usually in your home directory):
setwd(Sys.getenv("PWD"))
Now your default working directory will be whatever directory you launched R from. Keep in mind you can also set up default workspaces in different directories by saving your workspace image as .RData wherever you plan to launch R (startup sources .Rprofile before searching for .Rdata in the cwd).
To set the R work directory like the current directory of the R script that I'm working, I always use a combination of the commands getwd() and setwd(), like this:
path <- getwd()
setwd(path)
or
setwd(getwd())
If you want learn more about it, see this article.
Cheers,
[]'s
To set working directory in R Studio:
Refer detailed slide deck with screen-shots here.
Using setwd(): windows users would need to replace backward slashes '' with forward slashes '/' or double backward slashes '\'
You can do the former using find & replace (Short-cut: Ctrl+F)
Another option: Go to Session --> set working directory --> choose working directory & browse the folder which you want to set as the working directory, click on open
Quickest method (my favorite) use the shortcut 'Ctr+Shift+H' (on windows system), browse the folder which you want to set as the working directory, click on open
To set a permanent working directory (when not in a project) in R Studio:
Refer my quick video on the same: https://youtu.be/hMjzO4bAi70
Go to Tools --> Global Options --> R General [Basic] --> Default Working Directory (when not in a project)
browse the folder which you want to set as the working directory, click on 'Apply' and 'OK'
However, the efficient & better way to organize your work is to create projects & use version control.
Put a shortcut for the R gui into your desired directory. Right-click and look at the shortcut properties. Delete the entry for "Start In" and click OK. When you launch the R gui from this shortcut the default directory will be the folder from which you have launched. Copy/paste this shortcut wherever you desire.