Learn how to a build a cloud-first strategyRegister Now

x

Microsoft Development

47K

Solutions

32K

Contributors

Most development for the Microsoft platform is done utilizing the technologies supported by the.NET framework. Other development is done using Visual Basic for Applications (VBA) for programs like Access, Excel, Word and Outlook, with PowerShell for scripting, or with SQL for large databases.

Share tech news, updates, or what's on your mind.

Sign up to Post

Good Morning

I need to discover in a server group all the Windows services that are configured to start with a specific user.

Would anyone have any scripts to help with this job?

Thank you very much
0
Keep up with what's happening at Experts Exchange!
LVL 11
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Hi
I have a got a list of files in a folder text file with names like this:
baseFile_03_17_2017 .txt
baseFile_04_17_2017  .txt
baseFile_05_17_2017  .txt

Keep in mind>> there is no date column within each the text file.

 I want to a do a SSIS (SQL Server Integration Services)  loop where I loop through each file and insert it into a stage table which has an extra empty “Reportdate” column at the very end.

The SSIS job then gets the date from the file name and inserts it into the very last “ReportDate” column in that stage table


How do I do that?

Thanks
0
Using SharePoint Online and SP2013 Designer.

I'm creating an approval process by assigning tasks.  When the request is initiated I need to manually fill in two approvers and have a third approver "Manager" of initiator "CreatedBy" to prepopulate.  This was very easy with SP2010 designer.  It's not supported in SP2013 designer.  I have seen that a HTTP call can be used to accomplish this but I have not been able to make it work.  Does anyone have a GOOD walkthrough to get the manager in a SP2013 workflow.
0
Using Excel 2016: In the following code:  Sub getIE_makeChild_ofXl() opens internet explorer as a child of ThisWorkbook.
As expected, when the workbook is dragged, the IE wondow moves. When the excel.App.window is clicked, the IE window remains on top of thisWorkbook

However, I could not release IE from its parent either via Sub releaseParent1() nor via Sub releaseParent2().

Can you help me to release the child window?
Thanks, Kelvin

Option Explicit

#If Win64 Then
    'source (Chip Pearson) https://www.pcreview.co.uk/threads/in-vba-make-ie-browser-object-always-in-foreground.2503326/
    Declare Function SetParent Lib "user32" (ByVal hWndChild As LongLong, ByVal hWndNewParent As Long) As LongLong

    'source: http://www.vbforums.com/showthread.php?526112-RESOLVED-Undo-SetParent
    Declare Function GetDesktopWindow Lib "user32.dll" () As LongLong
#Else
    Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    Declare Function GetDesktopWindow Lib "user32.dll" () As Long
#End If

Private oIE As Object

'this places the IE window ontop of the Excel sheet window, U can drag it about to see the xl window,
'' but the VISIBLE part of the IE window is that WITHIN the margins of the xl window.
   
Sub getIE_makeChild_ofXl()
   
    Set oIE = CreateObject("InternetExplorer.application")
    oIE.Visible = True
    oIE.navigate ("http://bbc.co.uk")
    oIE.Visible = True
   
    'make child
 …
0
Hello,

I am getting this error when I try to install/update my ClickOnce application:
The file, Focus Studio Acc.exe.config, has a different calculated hash than the hash specified in the manifest.
I already tried adding a new config, remade the whole project, but nothing has fixed the error.

Some more info:
- I signed the application with a test certificate (.pfx)
- I did not sign the assemblies
- I did enable the security settings (full trust)
- I did select the option that adds .deploy to the files
- I am working with Visual Studio 2015

Does anyone here knows what other solutions I can try?

Thanks!
0
Hi Guys,

I have a working VB Script - sending an e-mail.  (Please see script below)
I would like to modify the script to include a conditional trigger.

The script will be called every 5 minutes from Windows Task Scheduler, but should only trigger an e-mail, if a "file being monitored" is older than 15 minutes.

For example:  We have a reporting tool, writing a file to:  C:\OUTPUT\Report.PDF

We need an e-mail notification, if the time-stamp of the file (Report.PDF) is older than 15 minutes (Thus not replaced or updated)

My Current Working VB Script:

on error resume next
 
Const schema   = "http://schemas.microsoft.com/cdo/configuration/"
Const cdoBasic = 1
Const cdoSendUsingPort = 2
Dim oMsg, oConf
 
' E-mail properties
Set oMsg      = CreateObject("CDO.Message")
oMsg.From     = "user@domain.com"  ' or "Sender Name <from@gmail.com>"
oMsg.To       = "user@domain.com"    ' or "Recipient Name <to@gmail.com>"
oMsg.Subject  = "Messaging Script"
oMsg.TextBody = "Messaging Script"
 
' GMail SMTP server configuration and authentication info
Set oConf = oMsg.Configuration
oConf.Fields(schema & "smtpserver")       = "mail.domain.com" 'server address
oConf.Fields(schema & "smtpserverport")   = 587              'port number
oConf.Fields(schema & "sendusing")        = cdoSendUsingPort
oConf.Fields(schema & "smtpauthenticate") = cdoBasic         'authentication type
oConf.Fields(schema & "smtpusessl")       = "False"             'use
0
por favor, alguém pode me fornecer uma string de conexão com VISUAL BASIC 6.0 COM ACCESS  2016
0
I am looking for how to properly move an ASP.NET website to a VS2013 website project or website application?

Thanks,
Andrew
0
Hello,

i want to install a printer, that i want to be named "INVOICE"

what i want : a user opens a file PDF and selects the printer named INVOICE.
The printer will print the current document 3 times (it is just one page) from a specific paper tray, in this case tray 3.

 i tried setting number of copies and paper tray setting in the basic "printing preferences" and "default printer settings" from the printer driver.  it  works for selecting paper tray, but the number of copies always get discarded.  

can this be achieved and how ?  may using a visual basic script ?
Settings-LPR-op-TCP-IP.jpg
0
With a lot of help, I have written a small c# app that will paste the contents of the clipboard to a specified folder.  Sadly, however, when I put the .exe file onto my RDP - it doesn't work (I'm guessing because it's looking at the RDP clipboard).  Any pointers (or nuget suggestions), would be greatly appreciated - here's the code that I've been working with:

using System;
using System.IO;
using System.Windows.Forms;

namespace TSPaste2
{
    class Program
    {
        //Getting destination foler
        String[] args = Environment.GetCommandLineArgs();

        [STAThread]
        static void Main(string[] args)
        {
            //Setting Destination foler
            string DestFolder = args[0];

            if (Clipboard.ContainsFileDropList())
            {
                //copy to folder as set in the Command line
                foreach (string source in Clipboard.GetFileDropList())
                {
                    string Dest = DestFolder + "\\" + Path.GetFileName(source);
                    File.Copy(source, Dest);
                }
            }
        }
    }
}

Open in new window

0
Configuration Guide and Best Practices
LVL 1
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Hi Experts,

I have a gridview. one of its column has s plus sign. When I click the plus sign it makes the other gridview visible . When I click the minus sign it is invisible. Is there anyway I can save the data of the popup gridview in a dataset or a datatable when the minus sign is clicked. I have attached the screenshots.

Thanks in advance.


Code for + and -
----------------------------

 <script  type="text/javascript" src="Jqueries/jquery_nestedGrid.min.js"></script>
     <script type="text/javascript">
         $("[src*=plus]").live("click", function () {
             $(this).closest("tr").after("<tr><td></td><td colspan = '900'>" + $(this).next().html() + "</td></tr>")
             $(this).attr("src", "images/minus.png");
             
         });
         $("[src*=minus]").live("click", function () {
             $(this).attr("src", "images/plus.png");
             $(this).closest("tr").next().remove();
         });
     </script>


Gridview column
---------------------------
  <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <asp:image alt = "" style="cursor: pointer;" src="images/plus.png" id="ImgPlusMinus" runat="server" />
                        <asp:Panel ID="pnlOrders" runat="server" Style="display: none">
                            <asp:GridView ID="gvVendors" runat="server" AutoGenerateColumns="false" CssClass = "ChildGrid SetLeftMarginChildGrid">
                          …
0
Just switched to a new computer and WebMatrix is not available any longer so I am playing around with this product.  How do I get my pages and changes to the server?

Thank you!
0
Hello

I have a program on Windows 10 that just does not want to uninstall. Any ideas? (I rather not post the name of the program in case anyone is wondering).
0
Since an application upgrade the CPU is spiking for my application. The behaviour is the application starts to consume CPU it grows to about 70 % then the system process kicks in and the app CPU reduces but between the system and app CPU its at 100%.

How can I see what is happing in the system process and why it is kicking in. Windows based system 2012R2
0
Can you please tell me why I am getting this error?
screenshot.pngscreenshot2.png
System.Data.Entity.Core.EntityCommandExecutionException was unhandled by user code
  HResult=-2146232004
  Message=An error occurred while executing the command definition. See the inner exception for details.
  Source=EntityFramework
  StackTrace:
       at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
       at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass3.<GetResults>b__2()
       at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass3.<GetResults>b__1()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
       at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
       at 

Open in new window

0
I am trying to understand this article:

http://www.codemag.com/article/1705021

and how they fulfill the WebAPI mentioned under the heading:

"Create Web API"

I see they stat with an empty C# Controller, but can not find what exactly they mean by WebAPI.

I am not understanding what is meant by the term.

Please explain.

Thanks
0
I am a Senior .NET Full Stack Developer but want to have a sharper eye on the new technologies that are coming and the current technologies which are passing into the dustbin of history. What on-line industry publications are good for this?

Thanks
0
I am refreshing my memory about the various things which can cause a long response time on .NET MVC web pages and the tools to fix them.

A badly written stored procedure is the most obvious and this kind of bug can be uncovered first by looking at the Network tab of the browser and when the response time's too high, you may need to debug into the code to the point where the stored procedure is executed. You can also use SSMS to execute and fix it until the overall execution time becomes acceptable.

What other things can cause slow response and what methods uncover the problem?

Thanks
0
Hi

I am looking for a VB script that would allow to type full name or users name in a search box that would run against certain LDAP groups (43 groups) to confirm if the user exists. If the user exists the output should be display on the screen and save in CSV file.

These 43 groups exists in AD (LDAP).

Thank you, M
0
Veeam Disaster Recovery in Microsoft Azure
LVL 1
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

I need to refresh my use of writing unit tests with Visual Studio and hope to download some simple program with a handful of working unit tests I can inspect.

Thanks
0
I know that strings are immutable and that C# offers the StringBuilder class which allows you to manipulate the string without constantly re-creating that string.

What other features of C# are there for large strings? Just the class name is fine.

Thanks
0
I am trying to get ready for a coding test and would like to have a list of C# looping constructs on the top of my mind.

I can think of:

- For loop (indexing and arrays)
- Foreach (items in a list)
- While
- Do while

and some reserved words which relate are:

break
continue
return
yield

what did I miss?

And how about LINQ?

Are there explicit loops possible?

Thanks.
0
I have not done unit testing for a little while and expect a test upcoming to verify I can quickly write unit tests.

Suggestions of the thing I should be practicing?

Unit tests generate their own mock data, but I doubt a test would include me setting up a mocking framework. I think hard coded lists of objects would be the ideal method, on a coding test.

I assume the object wold be written already for me (it's going to be a 15 minutes test only)

I would create an instance of the object, review the parameter list for that method being tested...

I could create multiple sets of test data. Would a switch statement be appropriate for this kind of knock em out unit test? I could iterate through and handle a handful of test conditions...


Assertions are key.

Once it fails, the unit test fails. I need to be sure the specific test condition which failed the assertion is visible in the console.

Am I approaching this test the right way?

Suggestions?

Thanks.
0
I use Visual Studio Code on Windows to code Angular, with a Node server running and Chrome as the browser.

Is there a way to set breakpoints?

I assume Chrome breakpoints work the same as with Javascript, with no issue.

I also know that Visual Studio debugs Javascript (with breakpoints) for the old Internet Explorer.

What are my options for setting breakpoints easily with Angular? I do not find Chrome easy since I need to find the file, find the line number, etc. I much prefer using Visual Studio since it's more like a WYSIWYG type of setting breakpoints.

Suggestions?

Is there a modern browser which works with Visual Studio the way VS once suppoted Internet Explorer?

Thanks
0
I have the following script but when trying to send from another account/shared mailbox the script will not run but works fine from the default email account

Any pointers where I've gone wrong?

Public Sub SendDrafts()
 
Dim lDraftItem As Long
Dim myOutlook As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myFolders As Outlook.Folders
Dim myDraftsFolder As Outlook.MAPIFolder
 
'Send all items in the "Drafts" folder that have a "To" address filled in.
 
'Setup Outlook
 
Set myOutlook = Outlook.Application
Set myNameSpace = myOutlook.GetNamespace("MAPI")
Set myFolders = myNameSpace.Folders
 
'Set Draft Folder. This will need modification based on where it's being run.
 
Set myDraftsFolder = myFolders("Credit Control").Folders("Drafts")
 
'Loop through all Draft Items
 
For lDraftItem = myDraftsFolder.Items.Count To 1 Step -1
 
'Check for "To" address and only send if "To" is filled in.
 
If Len(Trim(myDraftsFolder.Items.Item(lDraftItem).To)) > 0 Then
 
'Send Item
 
myDraftsFolder.Items.Item(lDraftItem).Send
 
End If
Next lDraftItem
 
'Clean-up
 
Set myDraftsFolder = Nothing
Set myNameSpace = Nothing
Set myOutlook = Nothing
 
End Sub

Open in new window

0

Microsoft Development

47K

Solutions

32K

Contributors

Most development for the Microsoft platform is done utilizing the technologies supported by the.NET framework. Other development is done using Visual Basic for Applications (VBA) for programs like Access, Excel, Word and Outlook, with PowerShell for scripting, or with SQL for large databases.