special-folders

What is the WiX equivilent of Environment.SpecialFolder.ApplicationData from .NET?

感情迁移 提交于 2019-11-29 22:59:32
I need to install a file into the Environment.SpecialFolder.ApplicationData folder, which differs between XP and Vista. Is there a built in way to reference the correct folder in WiX or will I have to use conditional checks for OS and do it manually? If I have to do the latter, how do I reference the current windows user's directory in Vista? Use Directory element with Id set to AppDataFolder : <Directory Id="AppDataFolder"> <Directory Id="MyAppFolder" Name="My"> <Component Id="MyComponent"> <File Source="Files\test1.txt" /> </Component> </Directory> </Directory> This will result in test1.txt

Programmatically access All Users Start Menu

纵饮孤独 提交于 2019-11-29 18:09:45
问题 Does anyone know how to programmatically access the "All Users" Startup Menu? In XP, located here: C:\Documents and Settings\All Users\Start Menu\Programs\Startup And in Windows 7, located here: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup Specifically, I've got a Setup and Deployment project, and I'd like to put a shortcut to the application in the Startup menu for all users so that the application is start whenever anyone logs in. EDIT: I'm pretty sure this is where Brian

Get Path To “Links” (AKA Favorites) Folder

情到浓时终转凉″ 提交于 2019-11-29 17:34:27
UPDATE: So I just found out in doing all this leg work that it seems the "Links" folder in your user folder can be named ANYTHING and you can still access it by going to "C:\Users(username)\Links" Ex: Rename "C:\Users\(username)\Links" to "C:\Users\(username)\MyNewLinksFolder" Then try to browse to... "C:\Users\(username)\Links" (forehead to palm) There is a "Favorites" node in the Windows 7 file explorer tree: The path to those favorites (by default) is here: I want to be able to get this path via c# code. I was hoping to use the Environment.SpecialFolder Enum but that seems to be a wash! I

How do get the path of Program Files regardless of the architecture of the target machine

非 Y 不嫁゛ 提交于 2019-11-29 16:50:31
问题 I'm programming in C#/.NET. I want to be able to return the Program Files directory from the target machine no matter what the architecture of the target machine is. To clarify, I want it to return C (or whatever drive the OS is on):/Program Files no matter what bitness their version of Windows is. I could just hardcode in the directory except if the user was running Windows that's not installed on the C: drive it wouldn't work. I found FileInfo(System.Environment.GetFolderPath(System

Writing to internal SD card on Android

拈花ヽ惹草 提交于 2019-11-29 14:41:42
Is there any way of accessing the internal SD card on Android devices that have internal flash, internal SD and external SD cards? In Android 2.2 and previous, there is only one "external storage" ( Environment.getExternalStorageDirectory() ). The definition of where this points is up to the device manufacturer. The Compatibility Definition Document (CDD) merely mandates that it be at least 2GB, IIRC. It is not even required for "external storage" to be removable. At this time, there are no standard APIs to get to other partitions or cards. A device manufacturer might document how to access

CommonAppData in vbscript

狂风中的少年 提交于 2019-11-29 14:24:07
问题 A customer's application "AppName" has its configuration files stored in CommonAppData. Under Windows XP that is C:\Documents and Settings\All Users\Application Data\AppName Under Windows Vista that is C:\ProgramData\AppName How do I get the correct foldername with VBScript? 回答1: Const CommonAppData = &H23& ' the second & denotes a long integer ' Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(CommonAppData) Set objFolderItem = objFolder.Self MsgBox

Function for getting localized path?

孤人 提交于 2019-11-29 10:41:07
Windows 7 (and probably Windows Vista) display localized folder names using the LocalizedResourceName entry in the desktop.ini file. For my Documents folder, this looks like [.ShellClassInfo] LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770 IconResource=%SystemRoot%\system32\imageres.dll,-112 IconFile=%SystemRoot%\system32\shell32.dll IconIndex=-235 (see this question) This way the explorer displays the path "C:\Users\Username\Documents" as "C:\Benutzer\Username\Dokumente" on a german Windows. I wonder, if there's any build-in shell function to automatically get this localized

How to create shortcut to Computer on the user's desktop

◇◆丶佛笑我妖孽 提交于 2019-11-29 08:17:41
I am working on a VBScript that is to show the "Computer" icon on the desktop. I've been able to do one for IE using the following code, however as Computer is a "Special Folder" that does not seem to have an actual location I can't use the same method. Would anyone have any idea how to enable it via VBScript? IE Shortcut code: Set objShell = WScript.CreateObject("WScript.Shell") 'Create Shortcut for IE on desktop allUsersDesktop = objShell.SpecialFolders("AllUsersDesktop") usersDesktop = objShell.SpecialFolders("Desktop") Set objShortCut = objShell.CreateShortcut(usersDesktop & "\Internet

What is the WiX equivilent of Environment.SpecialFolder.ApplicationData from .NET?

拥有回忆 提交于 2019-11-28 19:56:59
问题 I need to install a file into the Environment.SpecialFolder.ApplicationData folder, which differs between XP and Vista. Is there a built in way to reference the correct folder in WiX or will I have to use conditional checks for OS and do it manually? If I have to do the latter, how do I reference the current windows user's directory in Vista? 回答1: Use Directory element with Id set to AppDataFolder: <Directory Id="AppDataFolder"> <Directory Id="MyAppFolder" Name="My"> <Component Id=

Get Path To “Links” (AKA Favorites) Folder

折月煮酒 提交于 2019-11-28 13:15:49
问题 UPDATE: So I just found out in doing all this leg work that it seems the "Links" folder in your user folder can be named ANYTHING and you can still access it by going to "C:\Users(username)\Links" Ex: Rename "C:\Users\(username)\Links" to "C:\Users\(username)\MyNewLinksFolder" Then try to browse to... "C:\Users\(username)\Links" (forehead to palm) There is a "Favorites" node in the Windows 7 file explorer tree: The path to those favorites (by default) is here: I want to be able to get this