Search Results

Search found 17 results on 1 pages for 'createfolder'.

Page 1/1 | 1 

  • There is no web named - Sharepoint Event Hander

    - by Roosh Malai
    I activated following code with feature (web level scope). Now when i add an item to any document library it should create a folder "". No folder is created and no error is given either. can anyone see what's is going on? I got the following from the log file. I found similar code all over google so I am kinda puzzled why is not working in my environment. Thanks using System; using System.Collections.Generic; using System.Text; using Microsoft.SharePoint; namespace AddaFolder { class clAddaFolder : SPItemEventReceiver { public override void ItemAdded(SPItemEventProperties properties) { base.ItemAdded(properties); using (SPSite currentSite = new SPSite(SPContext.Current.Site.Url)) using (SPWeb currentWeb = currentSite.OpenWeb(SPContext.Current.Web.Url)) { try { //SPListTemplateCollection coll = currentWeb.ListTemplates; //Get the current document library link SPList newList = currentWeb.GetList(SPContext.Current.Web.Url); //.Site.Url); //newList = currentWeb.Lists.Add("My TEST Folder",SPFileSystemObjectType.Folder); //newList.Lists.Items.Add("My TEST Folder", SPFileSystemObjectType.Folder); //newList.Update(); SPListItem newListItem; //newListItem = newList.Folders.Add("", SPFileSystemObjectType.Folder, "My Test Folder"); newListItem = newList.Folders.Add(newList.ToString(), SPFileSystemObjectType.Folder, "My Test Folder"); newListItem.Update(); } catch (SPException spEx) { throw spEx; } } } } } 04/03/2010 17:52:44.25 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Shared Documents/Forms/AllItems.aspx". 04/03/2010 17:52:44.26 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/My TEST Doc Library/Forms/AllItems.aspx". 04/03/2010 17:52:44.27 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Calendar/calendar.aspx". 04/03/2010 17:52:44.29 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Tasks/AllItems.aspx". 04/03/2010 17:52:44.30 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Team Discussion/AllItems.aspx". 04/03/2010 17:52:44.31 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Shared Documents/Forms/AllItems.aspx". 04/03/2010 17:52:44.32 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/My TEST Doc Library/Forms/AllItems.aspx". 04/03/2010 17:52:44.34 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Calendar/calendar.aspx". 04/03/2010 17:52:44.35 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Tasks/AllItems.aspx". 04/03/2010 17:52:44.36 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Team Discussion/AllItems.aspx". 04/03/2010 17:52:51.33 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Shared Documents/Forms/AllItems.aspx". 04/03/2010 17:52:51.34 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/My TEST Doc Library/Forms/AllItems.aspx". 04/03/2010 17:52:51.35 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Calendar/calendar.aspx". 04/03/2010 17:52:51.37 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Tasks/AllItems.aspx". 04/03/2010 17:52:51.38 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Team Discussion/AllItems.aspx". 04/03/2010 17:52:51.39 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Shared Documents/Forms/AllItems.aspx". 04/03/2010 17:52:51.40 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/My TEST Doc Library/Forms/AllItems.aspx". 04/03/2010 17:52:51.41 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Calendar/calendar.aspx". 04/03/2010 17:52:51.43 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Tasks/AllItems.aspx". 04/03/2010 17:52:51.44 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Team Discussion/AllItems.aspx". 04/03/2010 17:53:02.69 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Shared Documents/Forms/AllItems.aspx". 04/03/2010 17:53:02.71 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/My TEST Doc Library/Forms/AllItems.aspx". 04/03/2010 17:53:02.72 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Calendar/calendar.aspx". 04/03/2010 17:53:02.73 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Tasks/AllItems.aspx". 04/03/2010 17:53:02.74 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Team Discussion/AllItems.aspx". 04/03/2010 17:53:02.75 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Shared Documents/Forms/AllItems.aspx". 04/03/2010 17:53:02.76 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/My TEST Doc Library/Forms/AllItems.aspx". 04/03/2010 17:53:02.77 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Calendar/calendar.aspx". 04/03/2010 17:53:02.78 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Tasks/AllItems.aspx". 04/03/2010 17:53:02.79 w3wp.exe (0x00C0) 0x0C88 Windows SharePoint Services General 8kh7 High There is no Web named "/sites/myDevSiteColl/myDevWeb/Lists/Team Discussion/AllItems.aspx".

    Read the article

  • Automated SSRS deployment with the RS utility

    - by Stacy Vicknair
    If you’re familiar with SSRS and development you are probably aware of the SSRS web services. The RS utility is a tool that comes with SSRS that allows for scripts to be executed against against the SSRS web service without needing to create an application to consume the service. One of the better benefits of using this format rather than writing an application is that the script can be modified by others who might be involved in the creation and addition of scripts or management of the SSRS environment.   Reporting Services Scripter Jasper Smith from http://www.sqldbatips.com created Reporting Services Scripter to assist with the created of a batch process to deploy an entire SSRS environment. The helper scripts below were created through the modification of his generated scripts. Why not just use this tool? You certainly can. For me, the volume of scripts generated seems less maintainable than just using some common methods extracted from these scripts and creating a deployment in a single script file. I would, however, recommend this as a product if you do not think that your environment will change drastically or if you do not need to deploy with a higher level of control over the deployment. If you just need to replicate, this tool works great. Executing with RS.exe Executing a script against rs.exe is fairly simple. The Script Half the battle is having a starting point. For the scripting I needed to do the below is the starter script. A few notes: This script assumes integrated security. This script assumes your reports have one data source each. Both of the above are just what made sense for my scenario and are definitely modifiable to accommodate your needs. If you are unsure how to change the scripts to your needs, I recommend Reporting Services Scripter to help you understand how the differences. The script has three main methods: CreateFolder, CreateDataSource and CreateReport. Scripting the server deployment is just a process of recreating all of the elements that you need through calls to these methods. If there are additional elements that you need to deploy that aren’t covered by these methods, again I suggest using Reporting Services Scripter to get the code you would need, convert it to a repeatable method and add it to this script! Public Sub Main() CreateFolder("/", "Data Sources") CreateFolder("/", "My Reports") CreateDataSource("/Data Sources", "myDataSource", _ "Data Source=server\instance;Initial Catalog=myDatabase") CreateReport("/My Reports", _ "MyReport", _ "C:\myreport.rdl", _ True, _ "/Data Sources", _ "myDataSource") End Sub   Public Sub CreateFolder(parent As String, name As String) Dim fullpath As String = GetFullPath(parent, name) Try RS.CreateFolder(name, parent, GetCommonProperties()) Console.WriteLine("Folder created: {0}", name) Catch e As SoapException If e.Detail.Item("ErrorCode").InnerText = "rsItemAlreadyExists" Then Console.WriteLine("Folder {0} already exists and cannot be overwritten", fullpath) Else Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText + " (" + e.Detail.Item("Message").InnerText + ")") End If End Try End Sub   Public Sub CreateDataSource(parent As String, name As String, connectionString As String) Try RS.CreateDataSource(name, parent,False, GetDataSourceDefinition(connectionString), GetCommonProperties()) Console.WriteLine("DataSource {0} created successfully", name) Catch e As SoapException Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText + " (" + e.Detail.Item("Message").InnerText + ")") End Try End Sub   Public Sub CreateReport(parent As String, name As String, location As String, overwrite As Boolean, dataSourcePath As String, dataSourceName As String) Dim reportContents As Byte() = Nothing Dim warnings As Warning() = Nothing Dim fullpath As String = GetFullPath(parent, name)   'Read RDL definition from disk Try Dim stream As FileStream = File.OpenRead(location) reportContents = New [Byte](stream.Length-1) {} stream.Read(reportContents, 0, CInt(stream.Length)) stream.Close()   warnings = RS.CreateReport(name, parent, overwrite, reportContents, GetCommonProperties())   If Not (warnings Is Nothing) Then Dim warning As Warning For Each warning In warnings Console.WriteLine(Warning.Message) Next warning Else Console.WriteLine("Report: {0} published successfully with no warnings", name) End If   'Set report DataSource references Dim dataSources(0) As DataSource   Dim dsr0 As New DataSourceReference dsr0.Reference = dataSourcePath Dim ds0 As New DataSource ds0.Item = CType(dsr0, DataSourceDefinitionOrReference) ds0.Name=dataSourceName dataSources(0) = ds0     RS.SetItemDataSources(fullpath, dataSources)   Console.Writeline("Report DataSources set successfully")       Catch e As IOException Console.WriteLine(e.Message) Catch e As SoapException Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText + " (" + e.Detail.Item("Message").InnerText + ")") End Try End Sub     Public Function GetCommonProperties() As [Property]() 'Common CatalogItem properties Dim descprop As New [Property] descprop.Name = "Description" descprop.Value = "" Dim hiddenprop As New [Property] hiddenprop.Name = "Hidden" hiddenprop.Value = "False"   Dim props(1) As [Property] props(0) = descprop props(1) = hiddenprop Return props End Function   Public Function GetDataSourceDefinition(connectionString as String) Dim definition As New DataSourceDefinition definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated definition.ConnectString = connectionString definition.Enabled = True definition.EnabledSpecified = True definition.Extension = "SQL" definition.ImpersonateUser = False definition.ImpersonateUserSpecified = True definition.Prompt = "Enter a user name and password to access the data source:" definition.WindowsCredentials = False definition.OriginalConnectStringExpressionBased = False definition.UseOriginalConnectString = False Return definition End Function   Private Function GetFullPath(parent As String, name As String) As String If parent = "/" Then Return parent + name Else Return parent + "/" + name End If End Function

    Read the article

  • MapPath strange error

    - by Cristian Boariu
    Hi, I have the following code: string path = "~/Others/Muzica/Demo/"+interpret+"_"+album+"/"; CMSUtils.CreateFolder(MapPath(path)); where CreateFolder method is like: public static void CreateFolder(string path) { if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path); } } So i create that folder if it does not exists... All works great locally BUT i do not understand why, if i put it on the server it gives: Failed to map the path '/gramma_prod/Others/Muzica/Demo/Vitamina C_De n-ai fi fost Tu /'. at CMSUtils.CreateFolder(MapPath(path)); I have checked if: /gramma_prod/Others/Muzica/Demo/ exists on the server and of course it exists... Does anybody see the problem?

    Read the article

  • Check if a Mail folder exists using Zend Mail

    - by Ali
    How can I check if an email folder exists using Zend_Mail_Storage_Imap, theres a createFOlder, renameFOlder and removeFolder and also a getFOlders but not exactly any fixed method to query if a certain mail folder exists? The GetFOlders returns a humonogous tree of folders to start with.

    Read the article

  • How to Hide a folder in Sharepoint

    - by Rosh Malai
    What else I need to add to following code to make sure the folder is hidden or read only? SPListItem createFolder = myDocLib.Folders.Add(myDocLib.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder, "Folder444"); folder.Update();

    Read the article

  • File Folder copy

    - by Dario Dias
    Below is the VBScript code. If the file/s or folder exist I get scripting error, "File already exists". How to fix that? How to create folder only if it does not exist and copy files only that are new or do not exist in source path? How to insert the username (Point 1) after "Welcome" and at (Poin 3) instead of user cancelled? Can the buttons be changed to Copy,Update,Cancel instead of Yes,No,Cancel? (Point 2) The code: Set objFSO = CreateObject("Scripting.FileSystemObject") Set wshShell = WScript.CreateObject( "WScript.Shell" ) strUserName = wshShell.ExpandEnvironmentStrings( "%USERNAME%" ) Message = " Welcome to the AVG Update Module" & vbCR '1* Message = Message & " *****************************" & vbCR & vbCR Message = Message & " Click Yes to Copy Definition Files" & vbCR & vbCR Message = Message & " OR " & vbCR & vbCR Message = Message & " Click No to Update Definition Files." & vbCR & vbCR Message = Message & " Click Cancel (ESC) to Exit." & vbCR & vbCR X = MsgBox(Message, vbYesNoCancel, "AVG Update Module") '2* 'Yes Selected Script If X = 6 then objFSO.FolderExists("E:\Updates") if TRUE then objFSO.CreateFolder ("E:\Updates") objFSO.CopyFile "c:\Docume~1\alluse~1\applic~1\avg8\update\download\*.*", "E:\Updates\" , OverwriteFiles MsgBox "Files Copied Succesfully.", vbInformation, "Copy Success" End If 'No Selected Script If X = 7 then objFSO.FolderExists("Updates") if TRUE then objFSO.CreateFolder("Updates") objFSO.CopyFile "E:\Updates\*.*", "Updates", OverwriteFiles Message = "Files Updated Successfully." & vbCR & vbCR Message = Message & "Click OK to Launch AVG GUI." & vbCR & vbCR Message = Message & "Click Cancel (ESC) to Exit." & vbCR & vbCR Y = MsgBox(Message, vbOKCancel, "Update Success") If Y = 1 then Set WshShell = CreateObject("WScript.Shell") WshShell.Run chr(34) & "C:\Progra~1\avg\avg8\avgui.exe" & Chr(34), 0 Set WshShell = Nothing End if If Y = 3 then WScript.Quit End IF 'Cancel Selection Script If X = 2 then MsgBox "No Files have been Copied/Updated.", vbExclamation, "User Cancelled" '3* End if

    Read the article

  • Problem with WiX major upgrade!

    - by Joshua
    Okay, my last question on this journey of WiX upgrades managed to get my settings file to be preserved! However, There is another component that is being preserved that I don't want to! I need it to overwrite, and it's not. The component "Settings" now works, with the NeverOverwrite="yes", and a KeyPath="yes". However, the component immediately below it does not work! It needs to overwrite both the MDF and the LDF with new ones from the install! I've tried lots of stuff, and am stumped. Please and thank you! Here is the components: <DirectoryRef Id="CommonAppDataPathways"> <Component Id="CommonAppDataPathwaysFolderComponent" Guid="087C6F14-E87E-4B57-A7FA-C03FC8488E0D"> <CreateFolder> <Permission User="Everyone" GenericAll="yes" /> </CreateFolder> <RemoveFolder Id="CommonAppDataPathways" On="uninstall" /> <!-- <RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes" />--> </Component> <Component Id="Settings" Guid="A3513208-4F12-4496-B609-197812B4A953" NeverOverwrite="yes"> <File Id="settingsXml" KeyPath="yes" ShortName="SETTINGS.XML" Name="Settings.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Settings\settings.xml" Vital="yes" /> </Component> <Component Id="Database" Guid="1D8756EF-FD6C-49BC-8400-299492E8C65D"> <File KeyPath="yes" Id="pathwaysMdf" Name="Pathways.mdf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.mdf" /> <File Id="pathwaysLdf" Name="Pathways_log.ldf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.ldf" /> <RemoveFile Id="pathwaysMdf" Name="Pathways.mdf" On="uninstall" /> <RemoveFile Id="pathwaysLdf" Name="Pathways_log.ldf" On="uninstall" /> </Component> </DirectoryRef> And here is the features: <Feature Id="App" Title="Pathways Application" Level="1" Description="Pathways software" Display="expand" ConfigurableDirectory="INSTALLDIR" Absent="disallow" AllowAdvertise="no" InstallDefault="local"> <ComponentRef Id="Application" /> <ComponentRef Id="CommonAppDataPathwaysFolderComponent" /> <ComponentRef Id="Settings"/> <ComponentRef Id="ProgramsMenuShortcutComponent" /> <Feature Id="Shortcuts" Title="Desktop Shortcut" Level="1" Absent="allow" AllowAdvertise="no" InstallDefault="local"> <ComponentRef Id="DesktopShortcutComponent" /> </Feature> </Feature> <Feature Id="Data" Title="Database" Level="1" Absent="allow" AllowAdvertise="no" InstallDefault="local"> <ComponentRef Id="Database" /> </Feature> And here is the InstallExecuteSequence: <InstallExecuteSequence> <RemoveExistingProducts After="InstallFinalize"/> </InstallExecuteSequence> What am I doing wrong?

    Read the article

  • A script that writes errors and should create a event-error

    - by helmich
    this if it works should check the internet connection if there is a connection it does nothing. if there isn't a connection it should write a error in a txtfile if that happend 5 times it should create a error but it doesn't I will show you the whole code that i have now and the piece of code that i want in a loop. I can't get it in the way i want. I want it to creat 1 Event-error after 5 times writing to the file. this is the whole code i will put the code i want in a loop under it strDirectory = "Z:\text2" strFile = "\foutmelding.txt" strText = "De connectie is verbroken" strWebsite = "www.helmichbeens.com" If PingSite(strWebsite) Then WScript.Quit 'Website is pingable - no further action required Set objFSO = CreateObject("Scripting.FileSystemObject") RecordSingleEvent Dim fout For fout = 1 To 5 : Do If fout = 5 Then Exit Do Set WshShell = WScript.CreateObject("WScript.Shell") Call WshShell.LogEvent(1, "Test Event") Loop While False : next '------------------------------------ 'Record a single event in a text file '------------------------------------ Sub RecordSingleEvent If Not objFSO.FolderExists(strDirectory) Then objFSO.CreateFolder(strDirectory) Set objTextFile = objFSO.OpenTextFile(strDirectory & strFile, 8, True) objTextFile.WriteLine(Now & strText) objTextFile.Close End sub '---------------- 'Ping my web site '---------------- Function PingSite( myWebsite ) Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" ) objHTTP.Open "GET", "http://" & myWebsite & "/", False objHTTP.SetRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MyApp 1.0; Windows NT 5.1)" On Error Resume Next objHTTP.Send PingSite = (objHTTP.Status = 200) On Error Goto 0 End Function '----------------------------------------------- 'Counts the number of lines inside the text file '----------------------------------------------- Function EventCount(fout) strData = objFSO.OpenTextFile(strDirectory & strFile,ForReading).ReadAll arrLines = Split(strData,vbCrLf) EventCount = UBound(arrLines) End Function This is the whole code, and it doesnt work correctly becaus it creats a event-log rightaway and it should do that after the script has written 5 times to the textfile here is the code that writes to a textfile Sub RecordSingleEvent If Not objFSO.FolderExists(strDirectory) Then objFSO.CreateFolder(strDirectory) Set objTextFile = objFSO.OpenTextFile(strDirectory & strFile, 8, True) objTextFile.WriteLine(Now & strText) objTextFile.Close End sub and here is the code but this part doesnt not work or atleast i think it is this part Dim fout For fout = 1 To 5 : Do If fout = 5 Then Exit Do Set WshShell = WScript.CreateObject("WScript.Shell") Call WshShell.LogEvent(1, "Test Event") Loop While False : next Function EventCount(fout) strData = objFSO.OpenTextFile(strDirectory & strFile,ForReading).ReadAll arrLines = Split(strData,vbCrLf) EventCount = UBound(arrLines) End Function this is the not working part and I don't know what to do anymore so can you please take a look at it tank you very much. btw: this code can be very usefull for a network administrator

    Read the article

  • How to give INSTALLDIR folder permission in WIX?

    - by tete
    I am designing a WIX 3.6 installer project, during the installation we need to grand the user create file permission to the install folder(INSTALLDIR, especially with the default install folder, the Program Files, the user normally can't create file in the installation. We've experienced some failures). I guess it can be achieved by setting a Permission element, with CreateFile property. However, the INSTALLDIR is a directory, and only such elements as CreateFolder, File, FileShare, Registry, ServiceInstall can have permission element. So could anyone tell me how to do that? My directory declaration is something like this: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFiles64Folder"> <Directory Id='MANUFACTUREFOLDER' Name='$(var.ManufacturerName)'> <Directory Id="INSTALLDIR" Name="$(var.ProductName)"> Thanks!

    Read the article

  • How to create a folder for each item in a directory?

    - by Adrian Andronic
    I'm having trouble making folders that I create go where I want them to go. For each file in a given folder, I want to create a new folder, then put that file in the new folder. My problem is that the new folders I create are being put in the parent directory, not the one I want. My example: def createFolder(): dir_name = 'C:\\Users\\Adrian\\Entertainment\\Coding\\Test Folder' files = os.listdir(dir_name) for i in files: os.mkdir(i) Let's say that my files in that directory are Hello.txt and Goodbye.txt. When I run the script, it makes new folders for these files, but puts them one level above, in 'C:\Users\Adrian\Entertainment\Coding. How do I make it so they are created in the same place as the files, AKA 'C:\Users\Adrian\Entertainment\Coding\Test Folder'?

    Read the article

  • Extract files from ZIP file with VBScript

    - by Tester101
    When extracting files from a ZIP file I was using the following. Sub Unzip(strFile) ' This routine unzips a file. NOTE: The files are extracted to a folder ' ' in the same location using the name of the file minus the extension. ' ' EX. C:\Test.zip will be extracted to C:\Test ' 'strFile (String) = Full path and filename of the file to be unzipped. ' Dim arrFile arrFile = Split(strFile, ".") Set fso = CreateObject("Scripting.FileSystemObject") fso.CreateFolder(arrFile(0) & "\ ") pathToZipFile= arrFile(0) & ".zip" extractTo= arrFile(0) & "\ " set objShell = CreateObject("Shell.Application") set filesInzip=objShell.NameSpace(pathToZipFile).items objShell.NameSpace(extractTo).CopyHere(filesInzip) fso.DeleteFile pathToZipFile, True Set fso = Nothing Set objShell = Nothing End Sub 'Unzip This was working, but now I get a "The File Exists" Error. What is the reason for this? Are there any alternatives?

    Read the article

  • How can I remove .NET isolated storage setting folders during WiX uninstallation?

    - by Luke
    I would like to remove the isolated storage folders that are created by a .NET application when using My.Settings etc. The setting files are stored in a location like C:\Users\%Username%\AppData\Roaming\App\App.exe_Url_r0q1rvlnrqsgjkcosowa0vckbjarici4 As per this question StackOverflow: Removing files when uninstalling Wix I can uninstall a folder using: <Directory Id="AppDataFolder" Name="AppDataFolder"> <Directory Id="MyAppFolder" Name="My"> <Component Id="MyAppFolder" Guid="YOURGUID-7A34-4085-A8B0-8B7051905B24"> <CreateFolder /> <RemoveFile Id="PurgeAppFolder" Name="*.*" On="uninstall" /> </Component> </Directory> </Directory> <!-- LocalAppDataFolder--> This doesn't support sub-folders etc. Is the only option a custom .NET action or is there a more simple approach for removing these .NET generated setting folders?

    Read the article

  • HTA value update freezes when file copy starts

    - by Matt Hamende
    Creating an HTA that will automate the installation of several applications it starts by checking for the existence of certain files then copies a large folder to local from a flash drive if it doesn't exist, I have a textbox I'm using to update the current status of the script, but it just seems to freeze and never updates, I haven't had any luck with any of the artificial sleep functions either. here's the segment If Not objFSO.FileExists(Office10Dir) Then MsgBox("Excel is missing") BasicTextBox.Value = "Office14 Not Detected, Copying Source Files to Local" Dim objFS, objFolder Dim OfficeTemp OfficeTemp = "C:\OfficeTemp" Set objFS = CreateObject("Scripting.FileSystemObject") Set objFolder = objFS.CreateFolder(OfficeTemp) objFS.CopyFolder "OfficeTemp", "C:\OfficeTemp" BasicTextBox.Value = "Local Temp Directory Created" ELSE MsgBox("Excel is Installed") END IF All i see is the "Local Temp Directory Created" message once file copy is complete

    Read the article

  • WiX major upgrade refuses to replace existing file!

    - by Joshua
    Hello! I have inherited this project with a WiX installer, and am required to make this version usefully upgrade the previous one! My problem comes in replacing the database files with new versions. No, the problem is not that they are locked, I can replace them manually, and in fact now ONE of them is replaced, while the other is not. Please, please tell me what I'm doing wrong here. I've tried several other solutions (including registry keys as KeyPath instead of CompanionFile) but nothing is quite working. Here is (most of) the code of the .WXS file: <Product Id='$(var.ProductCode)' UpgradeCode='$(var.UpgradeCode)' Name="Pathways" Version='$(var.ProductVersion)' Manufacturer='$(var.Manufacturer)' Language='1033'> <Package Id="*" Description="Pathways Directory Software" InstallerVersion="301" Compressed="yes" /> <WixVariable Id="WixUILicenseRtf" Value="License.rtf" /> <Media Id="1" Cabinet="Pathways.cab" EmbedCab="yes" /> <Upgrade Id="$(var.UpgradeCode)"> <UpgradeVersion OnlyDetect="no" Maximum="$(var.ProductVersion)" IncludeMaximum="no" Language="1033" Property="OLDAPPFOUND" /> <UpgradeVersion Minimum="$(var.ProductVersion)" IncludeMinimum="yes" OnlyDetect="no" Language="1033" Property="NEWAPPFOUND" /> </Upgrade> <Property Id="ALLUSERS">2</Property> <!-- directories --> <Directory Id="TARGETDIR" Name="SourceDir"> <!-- program files directory --> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLDIR" Name="Pathways"/> </Directory> <!-- application data directory --> <Directory Id="CommonAppDataFolder" Name="CommonAppData"> <Directory Id="CommonAppDataPathways" Name="Pathways" /> </Directory> <!-- start menu program directory --> <Directory Id="ProgramMenuFolder"> <Directory Id="ProgramsMenuPathwaysFolder" Name="Pathways" /> </Directory> <!-- desktop directory --> <Directory Id="DesktopFolder" /> </Directory> <Icon Id="PathwaysIcon" SourceFile="\\Fileserver\Release\Pathways\Latest\Release\Pathways.exe" /> <!-- components in the reference to the install directory --> <DirectoryRef Id="INSTALLDIR"> <Component Id="Application" Guid="EEE4EB55-A515-4872-A4A5-06D6AB4A06A6"> <File Id="pathwaysExe" Name="Pathways.exe" DiskId="1" Source="\\Fileserver\Release\Pathways\Latest\Release\Pathways.exe" Vital="yes" KeyPath="yes" Assembly=".net" AssemblyApplication="pathwaysExe" AssemblyManifest="pathwaysExe"> <!--<netfx:NativeImage Id="ngen_Pathways.exe" Platform="32bit" Priority="2"/> --> </File> <File Id="pathwaysChm" Name="Pathways.chm" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Pathways.chm" /> <File Id="publicKeyXml" ShortName="RSAPUBLI.XML" Name="RSAPublicKey.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\RSAPublicKey.xml" Vital="yes" /> <File Id="staticListsXml" ShortName="STATICLI.XML" Name="StaticLists.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\StaticLists.xml" Vital="yes" /> <File Id="axInteropMapPointDll" ShortName="AXMPOINT.DLL" Name="AxInterop.MapPoint.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\AxInterop.MapPoint.dll" Vital="yes" /> <File Id="interopMapPointDll" ShortName="INMPOINT.DLL" Name="Interop.MapPoint.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Interop.MapPoint.dll" Vital="yes" /> <File Id="mapPointDll" ShortName="MAPPOINT.DLL" Name="MapPoint.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Interop.MapPoint.dll" Vital="yes" /> <File Id="devExpressData63Dll" ShortName="DAAT63.DLL" Name="DevExpress.Data.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.Data.v6.3.dll" Vital="yes" /> <File Id="devExpressUtils63Dll" ShortName="UTILS63.DLL" Name="DevExpress.Utils.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.Utils.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraBars63Dll" ShortName="BARS63.DLL" Name="DevExpress.XtraBars.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraBars.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraNavBar63Dll" ShortName="NAVBAR63.DLL" Name="DevExpress.XtraNavBar.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraNavBar.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraCharts63Dll" ShortName="CHARTS63.DLL" Name="DevExpress.XtraCharts.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraCharts.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraEditors63Dll" ShortName="EDITOR63.DLL" Name="DevExpress.XtraEditors.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraEditors.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraPrinting63Dll" ShortName="PRINT63.DLL" Name="DevExpress.XtraPrinting.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraPrinting.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraReports63Dll" ShortName="REPORT63.DLL" Name="DevExpress.XtraReports.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraReports.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraRichTextEdit63Dll" ShortName="RICHTE63.DLL" Name="DevExpress.XtraRichTextEdit.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraRichTextEdit.v6.3.dll" Vital="yes" /> <RegistryValue Id="PathwaysInstallDir" Root="HKLM" Key="Software\Tribal Data Resources\Pathways" Name="InstallDir" Action="write" Type="string" Value="[INSTALLDIR]" /> </Component> </DirectoryRef> <!-- application data components --> <DirectoryRef Id="CommonAppDataPathways"> <Component Id="CommonAppDataPathwaysFolderComponent" Guid="087C6F14-E87E-4B57-A7FA-C03FC8488E0D"> <CreateFolder> <Permission User="Everyone" GenericAll="yes" /> </CreateFolder> <RemoveFolder Id="CommonAppDataPathways" On="uninstall" /> <!-- <RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes" />--> </Component> <Component Id="Settings" Guid="A3513208-4F12-4496-B609-197812B4A953" NeverOverwrite="yes"> <File Id="settingsXml" KeyPath="yes" ShortName="SETTINGS.XML" Name="Settings.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Settings\settings.xml" Vital="yes" /> </Component> <Component Id="Database" Guid="1D8756EF-FD6C-49BC-8400-299492E8C65D" > <!-- <RegistryValue Root="HKLM" Key="Software\TDR\Pathways\Database" Name="installed" Type="integer" Value="1" KeyPath="yes" /> --> <File Id="pathwaysMdf" Name="Pathways.mdf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.mdf" CompanionFile="pathwaysExe" Vital="yes"/> <File Id="pathwaysLdf" Name="Pathways_log.ldf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.ldf" CompanionFile="pathwaysExe" Vital="yes"/> </Component> <!-- <Component Id="MDF" Guid="FFB7CE02-B592-4c44-A315-99CF4828E3D9" > <File Id="pathwaysMdf" KeyPath="yes" Name="Pathways.mdf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.mdf" /> </Component> <Component Id="LDF" Guid="9E4E3DCA-A067-47f4-9905-4AD5C35A8025" > <File Id="pathwaysLdf" KeyPath="yes" Name="Pathways_log.ldf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.ldf" /> </Component> --> </DirectoryRef> <!-- shortcut components --> <DirectoryRef Id="DesktopFolder"> <Component Id="DesktopShortcutComponent" Guid="1BF412BA-9C6B-460D-80ED-8388AC66703F"> <Shortcut Id="DesktopShortcut" Target="[INSTALLDIR]Pathways.exe" Name="Pathways" Description="Pathways Tribal Directory" Icon="PathwaysIcon" Show="normal" WorkingDirectory="INSTALLDIR" /> <RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes"/> </Component> </DirectoryRef> <DirectoryRef Id ="ProgramsMenuPathwaysFolder"> <Component Id="ProgramsMenuShortcutComponent" Guid="83A18245-4C22-4CDC-94E0-B480F80A407D"> <Shortcut Id="ProgramsMenuShortcut" Target="[INSTALLDIR]Pathways.exe" Name="Pathways" Icon="PathwaysIcon" Show="normal" WorkingDirectory="INSTALLDIR" /> <RemoveFolder Id="ProgramsMenuPathwaysFolder" On="uninstall"/> <RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes"/> </Component> </DirectoryRef> <Feature Id="App" Title="Pathways Application" Level="1" Description="Pathways software" Display="expand" ConfigurableDirectory="INSTALLDIR" Absent="disallow" AllowAdvertise="no" InstallDefault="local"> <ComponentRef Id="Application" /> <ComponentRef Id="CommonAppDataPathwaysFolderComponent" /> <ComponentRef Id="Settings"/> <ComponentRef Id="ProgramsMenuShortcutComponent" /> <Feature Id="Shortcuts" Title="Desktop Shortcut" Level="1" Absent="allow" AllowAdvertise="no" InstallDefault="local"> <ComponentRef Id="DesktopShortcutComponent" /> </Feature> </Feature> <Feature Id="Data" Title="Database" Level="1" Absent="allow" AllowAdvertise="no" InstallDefault="local"> <ComponentRef Id="Database" /> </Feature> <UIRef Id ="WixUI_FeatureTree"/> <UIRef Id="WixUI_ErrorProgressText"/> <UI> <Error Id="2000">There is a later version of this program installed.</Error> </UI> <CustomAction Id="NewerVersionDetected" Error="2000" /> <InstallExecuteSequence> <RemoveExistingProducts After="InstallFinalize"/> </InstallExecuteSequence> </Product> Running this installer attempting the upgrade from the previous version ALMOST WORKS. The file that is giving me trouble is the one called "PathwaysMdf". Even though it's Component code is EXACTLY the same as the PathwaysLdf file, that file is replaced, while the MDF is NOT. You can see, commented out, some of the other things I've attempted, some from suggestions on stackoverflow. The entire log file from running the upgrade is located at: http://pastebin.com/ppjhq6Wi THANK YOU! Joshua

    Read the article

  • Vbscript - Checking each subfolder for files and copy files

    - by Kenny Bones
    I'm trying to get this script to work. It's basically supposed to mirror two sets of folders and make sure they are exactly the same. If a folder is missing, the folder and it's content should be copied. Then the script should compare the DateModified attribute and only copy the files if the source file is newer than the destination file. I'm trying to get together a script that does exactly that. And so far I've been able to check all subfolder if they exist and then create them if they don't. Then I've been able to scan the top source folder for it's files and copy them if they don't exist or if the DateModified attribute is newer on the source file. What remains is basically scanning each subfolder for its files and copy them if they don't exist or if the DateModified stamp is newer. Here's the code: Dim strSourceFolder, strDestFolder strSourceFolder = "c:\users\vegsan\desktop\Source\" strDestFolder = "c:\users\vegsan\desktop\Dest\" Set fso = CreateObject("Scripting.FileSystemObject") Set objTopFolder = fso.GetFolder(strSourceFolder) Set colTopFiles = objTopFolder.Files 'Check to see if subfolders actually exist. Create if they don't Set objColFolders = objTopFolder.SubFolders For Each subFolder in objColFolders CheckFolder subFolder, strSourceFolder, strDestFolder Next ' Check all files in first top folder For Each objFile in colTopFiles CheckFiles objFile, strSourceFolder, strDestFolder Next Sub CheckFolder (strSubFolder, strSourceFolder, strDestFolder) Set fso = CreateObject("Scripting.FileSystemObject") Dim folderName, aSplit aSplit = Split (strSubFolder, "\") UBound (aSplit) If UBound (aSplit) > 1 Then folderName = aSplit(UBound(aSplit)) folderName = strDestFolder & folderName End if If Not fso.FolderExists(folderName) Then fso.CreateFolder(folderName) End if End Sub Sub CheckFiles (file, SourceFolder, DestFolder) Set fso = CreateObject("Scripting.FileSystemObject") Dim DateModified DateModified = file.DateLastModified ReplaceIfNewer file, DateMofidied, SourceFolder, DestFolder End Sub Sub ReplaceIfNewer (sourceFile, DateModified, SourceFolder, DestFolder) Const OVERWRITE_EXISTING = True Dim fso, objFolder, colFiles, sourceFileName, destFileName Dim DestDateModified, objDestFile Set fso = CreateObject("Scripting.FileSystemObject") sourceFileName = fso.GetFileName(sourceFile) destFileName = DestFolder & sourceFileName if Not fso.FileExists(destFileName) Then fso.CopyFile sourceFile, destFileName End if if fso.FileExists(destFileName) Then Set objDestFile = fso.GetFile(destFileName) DestDateModified = objDestFile.DateLastModified if DateModified <> DestDateModified Then fso.CopyFile sourceFile, destFileName End if End if End Sub

    Read the article

  • Stuck on preserving config file in WIX major upgrade!

    - by Joshua
    ARGH! Wix is driving me crazy. So, of course I have seen the many posts both here on stackoverflow and elsewhere about WiX and major upgrades. I inherited this software project using WiX and am releasing a new version. I need this new version to leave ONLY the one configuration file if it's present, and replace everything else. This installer works EXCEPT no matter what I have done so far, the new XML file replaces the old on every install. Even attempting to use NeverOverwrite="yes" and even trying and messing back and forth with OnlyDetect="no"! I am simply stuck and humbly request a little guidance. The file that needs to be preserved is called SETTINGS.XML and is in the All Users-ApplicationData directory. Here is (most of) my .wxs file! <Package Id='$(var.PackageCode)' Description="Pathways Directory Software" InstallerVersion="301" Compressed="yes" /> <WixVariable Id="WixUILicenseRtf" Value="License.rtf" /> <Media Id="1" Cabinet="Pathways.cab" EmbedCab="yes" /> <Upgrade Id="$(var.UpgradeCode)"> <UpgradeVersion OnlyDetect="no" Maximum="$(var.ProductVersion)" IncludeMaximum="no" Language="1033" Property="OLDAPPFOUND" /> <UpgradeVersion Minimum="$(var.ProductVersion)" IncludeMinimum="yes" OnlyDetect="no" Language="1033" Property="NEWAPPFOUND" /> </Upgrade> <!-- program files directory --> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLDIR" Name="Pathways"/> </Directory> <!-- application data directory --> <Directory Id="CommonAppDataFolder" Name="CommonAppData"> <Directory Id="CommonAppDataPathways" Name="Pathways" /> </Directory> <!-- start menu program directory --> <Directory Id="ProgramMenuFolder"> <Directory Id="ProgramsMenuPathwaysFolder" Name="Pathways" /> </Directory> <!-- desktop directory --> <Directory Id="DesktopFolder" /> </Directory> <Icon Id="PathwaysIcon" SourceFile="\\Fileserver\Release\Pathways\Latest\Release\Pathways.exe" /> <!-- components in the reference to the install directory --> <DirectoryRef Id="INSTALLDIR"> <Component Id="Application" Guid="EEE4EB55-A515-4872-A4A5-06D6AB4A06A6"> <File Id="pathwaysExe" Name="Pathways.exe" DiskId="1" Source="\\Fileserver\Release\Pathways\Latest\Release\Pathways.exe" Vital="yes" KeyPath="yes" Assembly=".net" AssemblyApplication="pathwaysExe" AssemblyManifest="pathwaysExe"> <!--<netfx:NativeImage Id="ngen_Pathways.exe" Platform="32bit" Priority="2"/> --> </File> <File Id="pathwaysChm" Name="Pathways.chm" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Pathways.chm" /> <File Id="publicKeyXml" ShortName="RSAPUBLI.XML" Name="RSAPublicKey.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\RSAPublicKey.xml" Vital="yes" /> <File Id="staticListsXml" ShortName="STATICLI.XML" Name="StaticLists.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\StaticLists.xml" Vital="yes" /> <File Id="axInteropMapPointDll" ShortName="AXMPOINT.DLL" Name="AxInterop.MapPoint.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\AxInterop.MapPoint.dll" Vital="yes" /> <File Id="interopMapPointDll" ShortName="INMPOINT.DLL" Name="Interop.MapPoint.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Interop.MapPoint.dll" Vital="yes" /> <File Id="mapPointDll" ShortName="MAPPOINT.DLL" Name="MapPoint.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Interop.MapPoint.dll" Vital="yes" /> <File Id="devExpressData63Dll" ShortName="DAAT63.DLL" Name="DevExpress.Data.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.Data.v6.3.dll" Vital="yes" /> <File Id="devExpressUtils63Dll" ShortName="UTILS63.DLL" Name="DevExpress.Utils.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.Utils.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraBars63Dll" ShortName="BARS63.DLL" Name="DevExpress.XtraBars.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraBars.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraNavBar63Dll" ShortName="NAVBAR63.DLL" Name="DevExpress.XtraNavBar.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraNavBar.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraCharts63Dll" ShortName="CHARTS63.DLL" Name="DevExpress.XtraCharts.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraCharts.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraEditors63Dll" ShortName="EDITOR63.DLL" Name="DevExpress.XtraEditors.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraEditors.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraPrinting63Dll" ShortName="PRINT63.DLL" Name="DevExpress.XtraPrinting.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraPrinting.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraReports63Dll" ShortName="REPORT63.DLL" Name="DevExpress.XtraReports.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraReports.v6.3.dll" Vital="yes" /> <File Id="devExpressXtraRichTextEdit63Dll" ShortName="RICHTE63.DLL" Name="DevExpress.XtraRichTextEdit.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraRichTextEdit.v6.3.dll" Vital="yes" /> <RegistryValue Id="PathwaysInstallDir" Root="HKLM" Key="Software\Tribal Data Resources\Pathways" Name="InstallDir" Action="write" Type="string" Value="[INSTALLDIR]" /> </Component> </DirectoryRef> <!-- application data components --> <DirectoryRef Id="CommonAppDataPathways"> <Component Id="CommonAppDataPathwaysFolderComponent" Guid="087C6F14-E87E-4B57-A7FA-C03FC8488E0D"> <CreateFolder> <Permission User="Everyone" GenericAll="yes" /> </CreateFolder> <RemoveFolder Id="CommonAppDataPathways" On="uninstall" /> <RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes" /> <File Id="settingsXml" ShortName="SETTINGS.XML" Name="Settings.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Settings\settings.xml" Vital="yes" /> </Component> <Component Id="Database" Guid="1D8756EF-FD6C-49BC-8400-299492E8C65D"> <File Id="pathwaysMdf" Name="Pathways.mdf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.mdf" /> <RemoveFile Id="pathwaysLdf" ShortName="Pathways.ldf" Name="Pathways_log.LDF" On="uninstall" /> </Component> </DirectoryRef> <!-- shortcut components --> <DirectoryRef Id="DesktopFolder"> <Component Id="DesktopShortcutComponent" Guid="1BF412BA-9C6B-460D-80ED-8388AC66703F"> <Shortcut Id="DesktopShortcut" Target="[INSTALLDIR]Pathways.exe" Name="Pathways" Description="Pathways Tribal Directory" Icon="PathwaysIcon" Show="normal" WorkingDirectory="INSTALLDIR" /> <RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes"/> </Component> </DirectoryRef> <DirectoryRef Id ="ProgramsMenuPathwaysFolder"> <Component Id="ProgramsMenuShortcutComponent" Guid="83A18245-4C22-4CDC-94E0-B480F80A407D"> <Shortcut Id="ProgramsMenuShortcut" Target="[INSTALLDIR]Pathways.exe" Name="Pathways" Icon="PathwaysIcon" Show="normal" WorkingDirectory="INSTALLDIR" /> <RemoveFolder Id="ProgramsMenuPathwaysFolder" On="uninstall"/> <RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes"/> </Component> </DirectoryRef> <Feature Id="App" Title="Pathways Application" Level="1" Description="Pathways software" Display="expand" ConfigurableDirectory="INSTALLDIR" Absent="disallow" AllowAdvertise="no" InstallDefault="local"> <ComponentRef Id="Application" /> <ComponentRef Id="CommonAppDataPathwaysFolderComponent" /> <ComponentRef Id="ProgramsMenuShortcutComponent" /> <Feature Id="Shortcuts" Title="Desktop Shortcut" Level="1" Absent="allow" AllowAdvertise="no" InstallDefault="local"> <ComponentRef Id="DesktopShortcutComponent" /> </Feature> </Feature> <Feature Id="Data" Title="Database" Level="1" Absent="allow" AllowAdvertise="no" InstallDefault="local"> <ComponentRef Id="Database" /> </Feature> <!-- <UIRef Id="WixUI_Minimal" /> --> <UIRef Id ="WixUI_FeatureTree"/> <UIRef Id="WixUI_ErrorProgressText"/> <UI> <Error Id="2000">There is a later version of this program installed.</Error> </UI> <CustomAction Id="NewerVersionDetected" Error="2000" /> <InstallExecuteSequence> <RemoveExistingProducts After="InstallFinalize"/> </InstallExecuteSequence> </Product>

    Read the article

  • How to create share for a whole drive under WiX?

    - by mem64k
    I would like to create a share for a whole drive in my WiX installer project. The default approach for share creation works just fine for folders, but not for drives! The following code snippet illustrates the problem: <!-- Works! --> <Property Id="MySharePath"><![CDATA[X:\ROOT]]></Property> <!-- Works NOT! <Property Id="MySharePath"><![CDATA[X:\]]></Property> --> <Directory Id="MySharePath" Name="."> <Component Id="C__AddShare" Guid="$(var.GuidAddhare)" KeyPath="no" Permanent="yes"> <CreateFolder/> <!-- Create necessary share --> <util:FileShare Id="MY_SHARE" Name="MY_SHARE" Description="MY_SHARE"> <util:FileSharePermission ChangePermission="yes" CreateChild="yes" CreateFile="yes" Delete="yes" DeleteChild="yes" GenericAll="yes" GenericExecute="yes" GenericRead="yes" GenericWrite="yes" Read="yes" ReadAttributes="yes" ReadExtendedAttributes="yes" ReadPermission="yes" Synchronize="yes" TakeOwnership="yes" Traverse="yes" User="LukeSkywalker" WriteAttributes="yes" WriteExtendedAttributes="yes"/> </util:FileShare> </Component> </Directory> Does anybody has a hint for this?

    Read the article

1