Setting up the default browser (IE, Homepage) - powershell

Those are actually two different questions but still they are connected. I am trying to make a script to automate the installation of company PCs for new employees.
An old script used to work fine but as of the 1703 update (or some time prior. No-one really knows), the changes no longer do their job and I cannot seem to find a fix.
The task:
Change the default browser from Edge to Internet Explorer
Set the IE homepage to "https://www.google.com"
Concerning the first problem: I have tried changing the Registry entries at
HKCU:\Software\Microsoft\Shell\Associations\UrlAssociations\http(s)\UserChoice\ No luck there. I have also tried exporting and the setting using DISM but importing them back has proven to be beyond my capabilities (Basically, I ran into this problem: https://social.technet.microsoft.com/Forums/en-US/d5fad871-8f5e-4c74-abaf-627809f8844b/ I cannot programatically change the settings for an existing user)
When facing the second problem, I tried searching the registry for the default site "go.microsoft.com/fwlink/p?LinkId=..." and changing the values. At one startup (After I modiffied the registry key
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main value "Start Page"), IE displayed a prompt to the user informing them that an external appliation wishes to change the homepage but no change actually occured. And this only happened once (even after I changed the value again to a different site)
A preferred method would be using Powershell but after googling and ripping my hair out for two days straight, I am open to any suggestions. If it makes any difference, it's a 64-bit Windows 10 Pro

Related

Problems with MS TFS 2018's Dashboards, Build Pipelines, and Icons

I am having some recent problems with TFS 2018 that have escaped my ability to troubleshoot. The application runs on a Hyper-V VM hosting Server 2019 and connects to a separate MS SQL 2016 database over on a separate Windows 2019 VM.
A few weeks ago we migrated our database server over to a new machine which, over the course of setting our existing TFS server up to use the new database, required us to run though the TFS setup wizard again.
Everything was fine for about a week when we started to have issues, specifically with the TFS web front-end we use. First we lost various icons on the webpage, with the browsers (Chrome, Firefox, etc). replacing them with rectangles:
A little while after that we lost our project Dashboards, and the whole dashboard page is just blank now. A little while after that, our WIP build/test automation feature also lost its management section of the site.
Other than these things not displaying, things generally "work" - the source control stuff functions, work items can be interacted with, etc. It's just that the interface is clumsier without the icons (which extends to every icon within every work item type, not just the banner I shared) and we can't get our automated test reports without the site's front-end for it. The latter is the real show stopper.
I spent some time troubleshooting and at best was able to figure out a maybe solution for the icon problem: https://social.msdn.microsoft.com/Forums/en-US/c1038468-9d94-473d-a020-254789e9a19b/tfs-2015-update-2-missing-icons?forum=tfsgeneral
This seemed to do the trick for just the icon problem, though some time later they disappeared and reappeared when people were refreshing pages. I'm still unsure if the re-failure was a fluke or not, as we rolled back the VM snapshot the changes were made on shortly after.
Using Chrome's developer tools, it seems like the lack of dashboard data is related to issues retrieving content on the host server for a cause we cannot determine.
Here is what shows up on the DevTool in Chrome for our main project's Dashboard:
What's interesting is the error claims widget.css is either not present or empty. Neither of these are the case as I can find the file and read data in it.
I recognize MIME types as a thing that shows up in IIS but I don't know what to do with the information. Should I be adding .css to the MIME Types list within IIS? Maybe that was set and the wizard reverted it?
Here's what shows up in the Builds section:
Thing is, I don't know what to do with this information. I found some vague hints online from people having similar issues with sites they were themselves coding (which stated the errors in question were red herrings), but this TFS front end is not something I've created and I had not any idea what to do with the information shared.
Does anyone have an idea of what might have gone wrong with the dashboards here? I have run out of ideas and can't figure out a different attack angle to approach this from.

BSOD when modifying an XPage

I have a very weird situation. Since a few days, the following actions will crash my Windows 10 PC (using Notes R9.01FP8):
I open my Prefs page in the Domino Designer
click on the Source tab
move to a specific location in a table
then I add a Repeat control
I then open the Properties of the Repeat control
to set the data to JavaScript...
and nothing happens, until after a few seconds: BSOD - Unexpected Kernel Mode Trap in either win32kfull.sys or ntoskrnl.exe.
Sometimes, the JavaScipt box is displayed, so I can paste my code, but a short while later the PC still crashes.
I have to say that my PC crashed a lot lately, so I reinstalled Windows and all drivers, so there might be a rotten one that causes all this. According to DriverEasy, all drivers are now up to date. The Event viewer displays a BugCheck event, but nothing relevant (to me anyway).
What I did for further analysis:
I removed Cache.ndk, it didn't help (of course)
in a copy of the XPage, the system crashes when I add the Repeat
ditto, in a different XPage
it seems to work in a different Notes database, on a different XPage
so I created a new database, copied all elements from the original database over, and still the system crashes when I add the Repeat
I'll be doing so more tests, e.g. with an empty database and just one XPage, then adding my Prefs page, or with the same database but then on a server. Actually, one could say I'm kind of lost, and stumbling around in the dark.
My questions to the XPages/Eclipse gurus:
could it be the workspace, and is there any way to reset it?
do you have any suggestions how to get this solved?
Thanks!
The Windows Creator update that MS posted does not seem to fix the Designer crash.
https://grahamacres.wordpress.com/2017/07/10/domino-designer-still-crashes-after-windows-10-creators-update/

Why does adding URL to IE Compatibility View fix PowerShell 'Cannot find an overload for getElementByName' error?

I had a similar issue compared to the following SO threads:
Powershell System.__ComObject.document property no longer works under IE 9
PowerShell IE9 ComObject has all null properties after navigating to webpage
Cannot find an overload for "getElementById" and the argument count: "1"
My error was something to the effect of:
Cannot find an overload for "getElementsByName" and the argument count: "1"...
So I looked at each of these threads to help determine the why and the solutions to this problem.
I'm running PowerShell 4.0 on Windows Server 2012 R2. The script runs with Execution Policy Bypass and I am also running PowerShell as an Administrator (i..e. Administrator: Windows PowerShell ISE) AND my user account is part of the Administrator group. The URL the script is accessing is on the Intranet (one would think Internet Explorer isolates it to the proper zone, namely the Intranet Zone).
The script worked fine on my local machine but not on this server.
Here are the list of things I tried--one at at time, never in combination--that failed to yield a successful outcome:
Disabled Protected Mode in the Internet Zone.
Added URL to Trusted Zone Sites. Note that Protected Mode was already disabled. Only change I made here was adding the URL to the Trusted Sites list.
Disabled IE Enhanced Security Configuration completely. Administrators was already set to Off, but Users was set to On. I set Users to Off, which had no effect.
Ensured PowerShell ISE was running in Administrator mode (elevated privileges). It didn't seem to matter what mode PowerShell ISE was running in, likely because Execution Policy is set to Bypass.
Added URL to Intranet Zone Site List. Note that Protected Mode was set to disabled, prior to. Only change I made in this zone was adding the URL to its Site List. Initially worked but then I tried again and same problem. May have been a fluke that it worked.
Here are the list of things that I tried--again, one at a time--that solved the problem:
Added URL to Compatibility View with Display intranet sites in Compatibility View unchecked.
Added URL to Compatibility View with Display intranet sites in Compatibility View checked.
So the question is why does employing Compatibility View resolve the problem? What's different about this that the other things I tried didn't work?
One would think Trusted Zone Site List should do the trick. Security Level for Trusted Zone is set to Medium. For Intranet Zone, it's Medium-low. And for Internet Zone, it's set to Custom.
Is it related to one or more of the individual properties that you can set in a Security Level? Is it something under the covers with Registry, COM, IE?
Good thing is I found 2 solutions which worked. Bad thing is I don't quite understand why. Obviously, it works because of some relaxed security permissions. Maybe it's also tied to Group Policy settings. I'm not sure.
Anyone have any ideas here? Thank you.

Access Table Update fails on some computers

Okay, this is kind of odd and it is driving us nuts. I'll outline what is going on as best I can, then I can provide specific details and/or code as folks request it, because I'm not sure what will be needed to suss this out.
I have an access database I have built so our analysts can work within a queue, select records, do whatever research is needed, then either mark the record in question as okay, or fill in some blanks and mark it as needing a dispute (we work in billing).
Basically, the database opens and a hidden form pulls the NT User Name from the local machine, then opens a visible form that queries the database via SQL ODBC to display a list of records with that NT User Name attached to them.
The user can then scroll through the records, select them to get more information, and click a button to mark them as okay, or another to mark them as needing a dispute.
If they click the okay button, it fires off an update query to mark the record as okay. If they click the dispute button, then it opens a third form to show them the line item they are disputing with values from all of the other text fields on the form that they can select from/fill in. On that form there is a button to commit the dispute, which fires off another query to update the values into the same table as the 'okay' button.
So, the issue is, that this all works perfectly on my workhorse machine, and an essentially naked test machine. It also works on another co-worker's machine. However, whenever we try to run it on two other coworkers' machines, everything works just fine, except for any of the queries that attempt to write back to the ODBC connection. All of the read-only stuff works just fine, just not the updates. But the updates work perfectly, and super-fast on my machine, my test rig, and my other co-worker's machine.
We've tried reinstalling the ODBC connection, and the ODBC SQL Drivers.
No go.
We've tried just opening the table in question on the affected machines and making direct edits to the table.
This works if no forms are open in the database, but as soon as we open a form, no update query will run against the table.
So, we tried commenting out all code on all open forms except the docmd.openquery code for the single button we used to test the update query.
No go.
We even built a new form with just a button on it that triggers a new update query that makes only one simple update (Now()) to the table in question.
This runs fine on its own, but times out when run off the button click from the form.
We tried changing the MS Office install on one machine to 'run all from computer' to make sure all necessary components are installed/present.
No go.
We tried installing the ODBC connection both via the normal windows interface, and through the access linked table manager interface.
No go.
We tried installing both 64-bit and 32-bit ODBC connections, both under USER DSN and SYSTEM DSN, and all permutations of one and not the other that we could think of.
No go.
It seems that no update query will write to that table while any form is open, but works just fine with no forms open. But only on these other two machines. Everything works fine on the other three machines we've tested on, whether forms are open or not.
We're kind of at wit's end here and don't know where to go. Google is proving unhelpful, possibly because we just don't know exactly how to search the problem out.
Here's basic technical stuff and I am happy to provide whatever other details, code, queries, etc. that are needed to troubleshoot upon request:
OS: Windows 7 Enterprise 64-bit
Software: MS Office Enterprise 2013 32-bit
ODBC: SQL Server
All users have admin access to their respective machines.
Turns out that the issue here seems to have been an intermittent issue with Access being unable to determine which record to update due to the way we were calling details from a continuous form.
We went back to formula on our UI and built it so there is only ever one record on a form when we try to make changes to records, so there can be no system confusion about what record to update.
Still no clue as to why it was working intermittently, but the new iteration is working now.
Thank you all for your questions and suggestions. :)

Visual studio online source control breaks debugging

I'm completely new to source/version control and I recently decided to try out the Visual Studio online service (the renamed TFS online service). I ran into a problem and now I'm not sure if I'm doing something wrong or is the VSOnline service faulty.
Problem is as follows:
Completely working Windows phone 8 project. Compiler and debugger working as expected in VS13 ultimate (also in VS12 pro).
However, when I add the project to source control and check it in. Then check it back out it breaks.
Symptoms:
1) XAML markup not recognized. IntelliSense reports error for every single XAML tag, even fundamental tags like Phone:PhoneApplicationPage. These errors can be cleared if I change from debug to release mode, but they re-appear when I launch project next time.
2) Debug target not changeable. In the dialog where you can typically choose between device and different emulator modes there is only one option "start". Impossible to deploy app on actual device. "Start" always launches default emulator (which works fine, no bugs there), but you can't choose which emulator.
3) VS13 crashes when I try to open debug tab in project properties/settings.
4) Attempt to build the solution in VSonline fails.
I realize there is a possibility I'm doing something wrong. Never used source control before, but in my understanding I still should be able to handle the project completely normal after check-out. Restrictions to debugging or deploying to device would seem counter-productive to me.
And also the false errors and VS13 crashing in settings implies there is something broken.
Any opinion, advice or help will be hugely appreciated.
After few days of relentless effort I was able to solve the problem.
As I work from home and my own computer, I'm always logged in with my personal account.
And I was logged in visual studio with my work account which has the MSDN subscription.
This caused account clash and all the odd behavior. Logging out from all browser didn't help, it mysteriously kept my personal account always logged in. And I believe this is caused by Skydrive.
So I set up new user account for my work id, log in using that and all started working perfectly.
Bottom line: If you wish to use visual studio online or log in in VS, make sure you are logged in with same account on the computer.