Search the Community
Showing results for tags 'pathmakesystemfolder'.
-
Hi everybody :) I wanna create a folder in My Documents, named "My Information" for example! And customize its ICON by placing a "Desktop.ini" file into that. So I wrote this code which works perfect, but I don't know why it does not show the ICON as expected :( 'Create Directory If Not My.Computer.FileSystem.DirectoryExists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\My Information") Then System.IO.Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\My Information") End If 'Create File Dim FileContent As String = "[.ShellClassInfo]" + vbNewLine + "IconFile=%ProgramFiles%\Company\Product\Program.exe" + vbNewLine + "IconIndex=0" + vbNewLine + "InfoTip=Information collected using our application" If Not My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\My Information\Desktop.ini") Then My.Computer.FileSystem.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\My Information\Desktop.ini", FileContent, False) End If Dim FileDetail As IO.FileInfo = My.Computer.FileSystem.GetFileInfo(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\My Information\Desktop.ini") FileDetail.Attributes = IO.FileAttributes.Hidden + IO.FileAttributes.System
- 7 replies
-
- desktop.ini
- folder
-
(and 1 more)
Tagged with: