Search:

Type: Posts; User: robertx

Page 1 of 13 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    6
    Views
    1,242

    VS 2019 Re: Execute PowerShell code in VB.NET

    I was trying to execute a larger and more complex PowerShell script part of which was this registry interaction. The script was failing to execute correctly and I discovered that this was the...
  2. Replies
    6
    Views
    1,242

    VS 2019 Re: Execute PowerShell code in VB.NET

    This was the issue. However, the .NET application was compiled as 32-bit. After compiling as 64-bit, the correct result is returned. I am wondering whether it is possible to run this code correctly...
  3. Replies
    6
    Views
    1,242

    VS 2019 Execute PowerShell code in VB.NET

    I am trying to execute PowerShell code to query the registry using System.Management.Automation. The following executes successfully in an elevated PowerShell window and returns the correct key count...
  4. SQL Server uninstall instance only via command line

    How can an SQL Server instance be removed via the command line without removing the whole database engine?

    I am passing the following parameters:

    /QS /IACCEPTSQLSERVERLICENSETERMS="1"...
  5. Re: Block SQL server logon to database via Office applications

    I think this issue can be solved using a database application role with db_datawriter and db_datareader permissions assigned. Standard user accounts and groups should have no write permissions on the...
  6. Block SQL server logon to database via Office applications

    I would like to block logging onto an SQL Server database via Office, SSMS and applications other than a custom client. On a dedicated server, the following logon trigger achieves this. It allows for...
  7. VS 2017 Re: Detect whether application is visually loaded

    Yes this appears to achieve the desired outcome. Process.MainWindowHandle returns a handle when any visual element of the application is displayed.
  8. VS 2017 [RESOLVED] Detect whether application is visually loaded

    I am trying to design a splash screen application which launches another application from a remote server and provides a visual indication that something is happening where there is latency. The...
  9. VS 2017 Re: Get .NET framework version of remote machines

    I have an installer with .NET 4.8 packaged. The application launches via an SMB share. Previous versions targeted 4.5. I don’t need to reach every machine and install locally. I just need to verify...
  10. VS 2017 Re: Get .NET framework version of remote machines

    I have tried using PowerShell and it has been hit and miss. I have admin permissions on the remote machines and some machines fail to retrieve the information even after I confirm that they are...
  11. VS 2017 Get .NET framework version of remote machines

    Is there a way using VB.NET to get the version of .NET framework that is installed on remote machines to confirm whether they meet the minimum requirements for running an application targeting .NET...
  12. VS 2017 Re: Retrieve current Windows user when application is run as other user

    I resolved this using a very tidy library called Cassia:

    https://code.google.com/archive/p/cassia/


    Imports Cassia

    Dim t As New TerminalServicesManager
    Dim sCurrentWindowsUsername As...
  13. VS 2017 [RESOLVED] Retrieve current Windows user when application is run as other user

    If an application is executed as a user other than the current Windows user, how can the current Windows user be retrieved? Environment.Username returns the "run as" user and not the current Windows...
  14. Get username of user associated with SQL server connection

    Is there a way of getting the username of the user that is currently associated with an SQL server connection object? "SELECT CURRENT_USER" seems to just return "dbo".
  15. VS 2017 Re: LogonUser API returning false on Windows Server

    I experimented with the value of the LogonType parameter and the issue is resolved if 3 or 9 are passed. What is the practical difference between these values? Which value is best to use? I can't see...
  16. VS 2017 Re: LogonUser API returning false on Windows Server

    Yes this is what I am doing except that I am passing the value 2 for the fourth parameter. Could this be relevant?
  17. VS 2017 LogonUser API returning false on Windows Server

    I have implemented the LogonUser API in a client/server application that is running on Windows Server 2016 and workstations running Windows 10 Pro in an Active Directory environment. This API...
  18. Re: SQL Server Windows Authentication - Running application as another domain user

    I need to present a login screen and switch the user that is connected to the database without closing the application. This achieved exactly what I was wanting to:
    ...
  19. Re: SQL Server Windows Authentication - Running application as another domain user

    I understand what you're saying. I am wanting to know whether there is a way of making it appear to SQL Server that the Active Directory user that authenticated has made the database connection...
  20. [RESOLVED] SQL Server Windows Authentication - Running application as another domain user

    I have an application that connects to an SQL Server database using Windows Authentication. Permitted users belong to an Active Directory group. The application has an auto log off after a period of...
  21. VS 2017 Send string directly to local unshared USB Zebra label printer

    A string can be sent to a local USB Zebra printer (without ethernet connectivity) that is shared using a UNC path \\HOSTNAME\SHARENAME. Is there a way of printing directly to the printer in an...
  22. Re: Pass a list of integers to stored procedure and perform insert on each

    Thanks this led me to this solution which was a bit clearer for my situation:

    https://www.admfactory.com/split-a-string-and-loop-in-sql-server/
  23. Re: Pass a list of integers to stored procedure and perform insert on each

    I believe string_split wasn’t introduced until SQL Server 2016 and I need to be able to support 2012 and 2014. Is there an alternative method that is supported by these versions?
  24. Re: Pass a list of integers to stored procedure and perform insert on each

    Is there a way of looping through a table-valued parameter and assigning each value to a variable so that it can be passed to an insert query?
  25. Re: Pass a list of integers to stored procedure and perform insert on each

    I know how to pass a list to a stored procedure. How can I iterate it and perform an insert query with each value?
  26. Re: Pass a list of integers to stored procedure and perform insert on each

    MSSQL Server
  27. Pass a list of integers to stored procedure and perform insert on each

    Is there a way to pass a list of integers to a stored procedure and perform an insert query on each? I have tried running a SELECT query to return the integer list within the stored procedure but it...
  28. Replies
    1
    Views
    707

    VS 2017 .NET Framework Backward Compatibility

    I have an application that targets .NET Framework 4.5.2. Which versions of .NET Framework will be compatible? Is each subsequent version backward compatible?
  29. Replies
    18
    Views
    3,839

    VS 2017 Re: Programmatically set file association

    I revisited this topic - this time with some success as follows:

    First call the CreateFileAssociation method as per:
    ...
  30. Replies
    1
    Views
    781

    VS 2017 Application Freezing Randomly

    I have an application that is freezing periodically and randomly in the same process with one particular deployment. There is no exception thrown. The application simply freezes and becomes...
  31. VS 2017 Re: Show message box looping in BackgroundWorker_RunWorkerCompleted event procedure

    The form is a new instance displayed using ShowDialog. I figured out the problem. The background worker's RunWorkerAsync method was called in the form activate event procedure. I moved it the Shown...
  32. VS 2017 [RESOLVED] Show message box looping in BackgroundWorker_RunWorkerCompleted event procedure

    I have a message box that displays in a BackgroundWorker_RunWorkerCompleted event procedure called as follows:

    Private Sub myBackgroundWorker_RunWorkerCompleted(ByVal sender As Object, ByVal e As...
  33. Replies
    18
    Views
    3,839

    VS 2017 Re: Programmatically set file association

    I ran the test application and the test text file opened in Notepad. Not sure what the issue in on my machine.
  34. Replies
    18
    Views
    3,839

    VS 2017 Re: Programmatically set file association

    Did you get it to work? When I set Notepad as the default application for txt files then run the code (as administrator) using the parameters in my previous post, no exception is thrown but txt files...
  35. Replies
    18
    Views
    3,839

    VS 2017 Re: Programmatically set file association

    The CreateSubKey method creates a new subkey or opens an existing subkey.
  36. Replies
    18
    Views
    3,839

    VS 2017 Re: Programmatically set file association

    The procedure adds the leading dot if it is missing.
  37. Replies
    18
    Views
    3,839

    VS 2017 Re: Programmatically set file association

    So when trying to associate txt files with Notepad++, I passed as follows:

    extension = "txt"
    className = "txtfile"
    description = "Text File"
    exeProgram = "C:\Program...
  38. Replies
    18
    Views
    3,839

    VS 2017 Re: Programmatically set file association

    So when trying to associate txt files with Notepad++, I passed as follows:

    extension = "txt"
    className = "txtfile"
    description = "Text File"
    exeProgram = "C:\Program...
  39. Replies
    18
    Views
    3,839

    VS 2017 Re: Programmatically set file association

    In the case of the .NET code method, I ran the application as administrator. Should that be enough or does the manifest file need to be modified as well? From my experience, when registry...
  40. Replies
    18
    Views
    3,839

    VS 2017 Re: Programmatically set file association

    The solutions suggested in this thread were amongst those that I tried and couldn’t get to work.
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width