https://flexeracommunity.force.com/customer/CCDocumentation
MS.NET technical blog
Monday, 5 January 2015
Tuesday, 30 December 2014
How to create cmd file for SVN Export operation using VBScript
Option Explicit
dim objXML2,fso,strdir,CurrentDirectory,ExportFile,LocalPath,SVNPath,colNodes,objnode,backupvalue,colNodes1
Set objXML2 = CreateObject("Microsoft.XMLDOM")
objXML2.async = "false"
strdir= WScript.Arguments.item(0) '"C:\ABC.xml"
set fso = CreateObject("Scripting.FileSystemObject")
CurrentDirectory = fso.GetAbsolutePathName(".")
Set ExportFile = fso.CreateTextFile(CurrentDirectory&"\SVNExport.cmd", True)
ExportFile.WriteLine("@echo off")
ExportFile.WriteBlankLines(1)
'ExportFile.WriteLine("start /b 1")
LocalPath = "C:\SVN Export" 'WScript.Arguments.item(1)
SVNPath = "https://svn.pointcrossblr.com/svn/Devbuild/EngineeringBuild" 'WScript.Arguments.item(2)
'ExportFile.WriteLine("LocalPath: " & LocalPath)
'ExportFile.WriteLine("SVNPath: " & SVNPath)
If (Not objXML2.load(strdir)) Then
wscript.echo "Unable to load file '" & strdir & "'. "
WScript.Quit(1)
End If
'Set colNodes = objXML2.selectNodes ("/PRODUCTINFO/PRODUCT")
'For Each objNode in colNodes
' If backupvalue <> "" Then
' ExportFile.WriteLine("start /b %~nx0 """ & objnode.getAttribute("NAME") & """")
' ExportFile.WriteBlankLines(1)
' else
' ExportFile.WriteLine("if not " & objnode.getAttribute("NAME") & "= """" goto :" & objnode.getAttribute("NAME"))
' ExportFile.WriteBlankLines(1)
' End If
' backupvalue = objNode.getAttribute("NAME")
' ExportFile.WriteLine("echo Export Completed")
'Next
Set colNodes1 = objXML2.selectNodes ("/PRODUCTINFO/PRODUCT")
'ExportFile.WriteBlankLines(1)
For Each objNode in colNodes1
wscript.echo objnode.getAttribute("NAME")& " : " & objnode.getAttribute("VERSION")
' ExportFile.WriteLine(":" & objnode.getAttribute("NAME"))
ExportFile.WriteLine("echo Getting " & objnode.getAttribute("NAME") & " of version " & objnode.getAttribute("VERSION") & " from SVN")
ExportFile.WriteLine("""C:\Program Files\TortoiseSVN\bin\svn.exe"" export --force """ & SVNPath & "/" & objnode.getAttribute("NAME") & "/" & objnode.getAttribute("VERSION") & """ """ & LocalPath & "\" & objnode.getAttribute("NAME") & "\" & objnode.getAttribute("VERSION") & """" & " --username praveen.v --password PNT@123ltd --no-auth-cache --non-interactive --trust-server-cert")
Next
'get the paths for each solutions
'wscript.echo objnode.getAttribute("NAME")& " : " & objnode.getAttribute("VERSION")
ExportFile.WriteLine("echo Export Completed")
'ExportFile.WriteLine("pause")
ExportFile.close()
dim objXML2,fso,strdir,CurrentDirectory,ExportFile,LocalPath,SVNPath,colNodes,objnode,backupvalue,colNodes1
Set objXML2 = CreateObject("Microsoft.XMLDOM")
objXML2.async = "false"
strdir= WScript.Arguments.item(0) '"C:\ABC.xml"
set fso = CreateObject("Scripting.FileSystemObject")
CurrentDirectory = fso.GetAbsolutePathName(".")
Set ExportFile = fso.CreateTextFile(CurrentDirectory&"\SVNExport.cmd", True)
ExportFile.WriteLine("@echo off")
ExportFile.WriteBlankLines(1)
'ExportFile.WriteLine("start /b 1")
LocalPath = "C:\SVN Export" 'WScript.Arguments.item(1)
SVNPath = "https://svn.pointcrossblr.com/svn/Devbuild/EngineeringBuild" 'WScript.Arguments.item(2)
'ExportFile.WriteLine("LocalPath: " & LocalPath)
'ExportFile.WriteLine("SVNPath: " & SVNPath)
If (Not objXML2.load(strdir)) Then
wscript.echo "Unable to load file '" & strdir & "'. "
WScript.Quit(1)
End If
'Set colNodes = objXML2.selectNodes ("/PRODUCTINFO/PRODUCT")
'For Each objNode in colNodes
' If backupvalue <> "" Then
' ExportFile.WriteLine("start /b %~nx0 """ & objnode.getAttribute("NAME") & """")
' ExportFile.WriteBlankLines(1)
' else
' ExportFile.WriteLine("if not " & objnode.getAttribute("NAME") & "= """" goto :" & objnode.getAttribute("NAME"))
' ExportFile.WriteBlankLines(1)
' End If
' backupvalue = objNode.getAttribute("NAME")
' ExportFile.WriteLine("echo Export Completed")
'Next
Set colNodes1 = objXML2.selectNodes ("/PRODUCTINFO/PRODUCT")
'ExportFile.WriteBlankLines(1)
For Each objNode in colNodes1
wscript.echo objnode.getAttribute("NAME")& " : " & objnode.getAttribute("VERSION")
' ExportFile.WriteLine(":" & objnode.getAttribute("NAME"))
ExportFile.WriteLine("echo Getting " & objnode.getAttribute("NAME") & " of version " & objnode.getAttribute("VERSION") & " from SVN")
ExportFile.WriteLine("""C:\Program Files\TortoiseSVN\bin\svn.exe"" export --force """ & SVNPath & "/" & objnode.getAttribute("NAME") & "/" & objnode.getAttribute("VERSION") & """ """ & LocalPath & "\" & objnode.getAttribute("NAME") & "\" & objnode.getAttribute("VERSION") & """" & " --username praveen.v --password PNT@123ltd --no-auth-cache --non-interactive --trust-server-cert")
Next
'get the paths for each solutions
'wscript.echo objnode.getAttribute("NAME")& " : " & objnode.getAttribute("VERSION")
ExportFile.WriteLine("echo Export Completed")
'ExportFile.WriteLine("pause")
ExportFile.close()
How to find the solution file paths from root folder using VBScript
Option Explicit 'force all variables to be declared
Const ForWriting = 2
Dim objFSO 'File System Object
Dim CurrentDirectory,objTS,localpath
set objFSO = CreateObject("Scripting.FileSystemObject")
CurrentDirectory = objFSO.GetAbsolutePathName(".")
Set objTS = objFSO.CreateTextFile(CurrentDirectory&"\SVNExport.txt", True)
localpath = WScript.Arguments.item(1) 'C:\Praveen'
Call Recurse(localpath)
objTS.Close()
Sub Recurse(strFolderPath)
Dim objFolder
Set objFolder = objFSO.GetFolder(strFolderPath)
Dim objFile
Dim objSubFolder
For Each objFile In objFolder.Files
'only proceed if there is an extension on the file.
If (InStr(objFile.Name, ".") > 0) Then
'If the file's extension is "pfx", write the path to the output file.
If (LCase(Mid(objFile.Name, InStrRev(objFile.Name, "."))) = ".sln") Then _
objTS.WriteLine(objfile.Path)
End If
Next
For Each objSubFolder In objFolder.SubFolders
Call Recurse(objSubFolder.Path)
Next
End Sub
Const ForWriting = 2
Dim objFSO 'File System Object
Dim CurrentDirectory,objTS,localpath
set objFSO = CreateObject("Scripting.FileSystemObject")
CurrentDirectory = objFSO.GetAbsolutePathName(".")
Set objTS = objFSO.CreateTextFile(CurrentDirectory&"\SVNExport.txt", True)
localpath = WScript.Arguments.item(1) 'C:\Praveen'
Call Recurse(localpath)
objTS.Close()
Sub Recurse(strFolderPath)
Dim objFolder
Set objFolder = objFSO.GetFolder(strFolderPath)
Dim objFile
Dim objSubFolder
For Each objFile In objFolder.Files
'only proceed if there is an extension on the file.
If (InStr(objFile.Name, ".") > 0) Then
'If the file's extension is "pfx", write the path to the output file.
If (LCase(Mid(objFile.Name, InStrRev(objFile.Name, "."))) = ".sln") Then _
objTS.WriteLine(objfile.Path)
End If
Next
For Each objSubFolder In objFolder.SubFolders
Call Recurse(objSubFolder.Path)
Next
End Sub
Friday, 26 December 2014
Good Interview questions on .Net and IIS
Interview Questions on IIS
http://www.dotnetfunda.com/ interviews/cat/122/iis
Interview Question on .Net
http://www.dotnetfunda.com/
Interview Question on .Net
Sunday, 9 November 2014
How to delete a user in Oracle 10 including all it's tablespace and datafiles
DROP USER---->
DROP USER USER_NAME CASCADE;
DROP TABLESPACE---->
DROP TABLESPACE TABLESPACE_NAME INCLUDING CONTENTS AND DATAFILES;
DROP USER USER_NAME CASCADE;
DROP TABLESPACE---->
DROP TABLESPACE TABLESPACE_NAME INCLUDING CONTENTS AND DATAFILES;
Thursday, 6 November 2014
Query to Find Column From All Tables of Database in Oracle
Oracle
---------
select table_name from all_tab_columns where column_name='IPADDRESS';
---------------------
SQL Server 2008
---------------------
SELECT ROUTINE_NAME, ROUTINE_DEFINITION, ROUTINE_TYPE FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%ABCD%'
---------
select table_name from all_tab_columns where column_name='IPADDRESS';
---------------------
SQL Server 2008
---------------------
SELECT ROUTINE_NAME, ROUTINE_DEFINITION, ROUTINE_TYPE FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%ABCD%'
Tuesday, 26 August 2014
.Net good materials links
This is the best video material links which is created by G venkat
C# and ASP.net and MVC and WCF.
http://www.pragimtech.com/c-sharp-video-tutorials.aspx
Discover the Design Patterns You're Already Using in the .NET Framework
Introducing Windows Communication Foundation in .NET Framework 4
Object-Oriented Programming (C# and Visual Basic)
Six important .NET concepts: Stack, heap, value types, reference types, boxing, and unboxing
A Guide to Designing and Building RESTful Web Services with WCF 3.5
Basic Security Practices for Web Applications
Building web apps without web forms
C# Tuterails link
.Net interview real time interview questions
Subscribe to:
Posts (Atom)