appdata

How do I create directories and files within the user's AppData directory?

醉酒当歌 提交于 2019-12-22 01:17:14
问题 So, I'm creating a game and need to create directories to store all the user's data and saves and whatnot. As you can see, I need to create a folder in the Application Data folder of the user called, "[WarDungeon]", and there, I will store other folders for such data like levels, the bin, sprites, etc. I am not too interested in working with Mac OS and Linux as I want to get the %appdata% folder working with Windows to begin with. Here's my code: public FileManage() { gamePath = System.getenv

Is there a shared folder in Windows to which non-elevated users have write access?

戏子无情 提交于 2019-12-19 06:30:35
问题 I know that commonappdata (All Users) can hold system-wide application settings, but under Vista/7 non-elevated users can't write to that directory. Is there a folder which is shared among users and any non-admin user can write to it? Here is why I need this: My app is installed in PF directory by an Inno Setup installer with elevated rights. Then when the actual non-admin user runs the program, it copies its settings to the user's AppData directory using another non-elevated Inno Setup

What is the difference between ProgramData and AppData?

二次信任 提交于 2019-12-17 15:32:39
问题 I need to store some user-specific configuration data for my program. Both Application Data/AppData (in the user's directory) and ProgramData (in the root of the system drive) seem like reasonable places to put it. What is the difference between Program Data and Application Data and which should I use? 回答1: To put it straight, ProgramData contains application data that is not user specific .This data which will be available to all users on the computer. Any global data should be put in here.

Does Microsoft have a best practices document regarding the storage of App Data vs User Data on different Windows Platforms?

只愿长相守 提交于 2019-12-17 10:41:40
问题 When creating an application that will be targeted to many versions of Windows what is the best practice to determine where application specific data should be stored. Specifically: Application Specific Data (e.g. app config data) User Specific Data/Settings I know on Windows Vista for instance there are environment variables, like %APPDATA%, that could be used, but what about Windows 7, Windows XP, Windows 98. My main question is, does Microsoft have a best practices doc for this, outlining

How do I find the %APPDATA% directory?

北城余情 提交于 2019-12-13 10:42:11
问题 I currently know of two methods: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) and Application.UserAppDataPath Are they both the same? Should I use one over the other? Please provide some facts to back up your answers. 回答1: Application.UserAppDataPath returns BasePath\CompanyName\ProductName\ProductVersion, where BasePath is the ApplicationData directory. So if you don't want all the extra subdirectories, you should just use Environment.GetFolderPath(Environment

How can I run the vbscript as the 'Administrator' but access on APPDATA folder of current logon user VBSCRIPT

狂风中的少年 提交于 2019-12-13 06:26:20
问题 I tried to access on the APPDATA folder, which does function with the following code perfectly (run as the current logon user): Set objShellApp = CreateObject("Shell.Application") Const ssfAPPDATA = &H1A sAppDataPath = objShellApp.NameSpace(ssfAPPDATA).Self.Path The result of sAppDataPath is: C:\Users\ Peter \AppData\Roaming Now the problem is, I have to run the Script as the Administrator account. And if I run this script as the Administrator on Clients, than the result is allways following:

How to create files in %appdata% with c++ [duplicate]

好久不见. 提交于 2019-12-12 03:57:01
问题 This question already has answers here : How to open a folder in %appdata% with C++? (3 answers) Closed 2 years ago . I need help creating a Folder in AppData. Lets say I want to create a Folder in %appdata% called "MyFolder", which has the text file test.txt I tried to use <fstream> and do this; ofstream file("%appdata%\MyFolder\test.txt"); but it didn't work.. 回答1: Things like %appdata% are OS specific, and Standard C++ has no direct means of dealing with them. You will have to write code

WiX remove LocalAppData (AppData\Local\my_app_folder) on uninstall

前提是你 提交于 2019-12-11 06:05:31
问题 I have a wix setup project which creates a ProgramMenu shortcut and a Desktop shortcut. I am able to remove these shortcuts by using RemoveFolder . <!-- To remove Desktop shortcut --> <RemoveFolder Id="RemoveDesktopFolder" Directory="DesktopFolder" On="uninstall"/> <!-- To remove ProgramMenu shortcut--> <RemoveFolder Id="CleanUpShortCut" Directory="ApplicationProgramsFolder" On="uninstall" /> However, on uninstall, I also want to be able to clear the current user's LocalAppData. More

How To Sign a Jar File for an Applet?

本秂侑毒 提交于 2019-12-10 20:36:15
问题 Does Singing a Jar File For an Applet use the same process as signing a Jar file for an application?? If so, can someone tell me how to sign it? I have an Applet that writes to your APPDATA, kinda like Minecraft. 回答1: Yes, it is the same process. Search for "sign jar" and you will find many tutorials. Here is a nice one 来源: https://stackoverflow.com/questions/7191411/how-to-sign-a-jar-file-for-an-applet

How to download PDF from website and store in %appdata% with Visual Basic .NET

天大地大妈咪最大 提交于 2019-12-10 10:06:15
问题 I have a PDF file hosted on a website. I would like my VB.NET program to retrieve the file/download it and store it somewhere in %appdata% . This could be in a folder of it's own like %appdata%/my_program if you want. How do I achieve this in my VB.NET program? Thanks. 回答1: You can use WebClient.DownloadFile(Url,LocalPath) for downloading your PDF file and saving in a local path on your PC. The class is in System.Net Assembly . 回答2: Use this to download file: Dim WC As New System.Net