Change compatibility mode/run as using logon script - group-policy

We have 200+ freshly imaged machines and have learned that in some of them Audacity does not work properly. For some reason, on certain (seemingly random) machines, Audacity needs to be in XPSP3 compatibility mode to run properly and be run as an administrator. Since we have 200+ of these, we are trying to find a way to tell a logon script to change Audacity for us. That way, all we have to do is start the machines and log in. I have looked around and haven't found much. Is this even possible? Thanks

To set these on a system wide basis you just need to push out a reg file like so:
-----------------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Full\\Path\\To\\File.exe"="WINXPSP3"
-----------------------------------
There are additional options if you need them, manually set some yourself and check this registry key.

Related

How can I completely reset Powerhsell?

I'd like to reset every single change made to Powershell. Including permission, window sizes, colors, formatting, etc. As if I just installed Powershell on my machine, totally virgin.
Is there a way to do this with one command?

Setting up the default browser (IE, Homepage)

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

Change Epson Cash Drawer setting

I'm looking for a way to change the settings that control the cash drawer either with powershell, vbscript, batch, etc. We have over 40 stores with several registers each. All of those receipt printers were originally configured to open the cash drawer before each print. I have updated our POS software such that it now sends the correct code to prompt the printer to open the drawer only when it is needed (cash transaction, not credit/debit). I'm looking for a way to update the driver setting for all of these printers without having to manually adjust each one. The computers are running Windows 7.
I have tried using PowerShell with some combination of Get-Printer and Set-PrinterProperty, but those cmdlets are not available with Windows 7. I've tried using cscript prncnfg.vbs, but there are no configurable settings options with that command that I could use for this specific settings.
There are only so many places that settings can be saved (Registry, File...). Use Sysinternal's Process Monitor to monitor where the setting is changed.
Start the application.
Just before you go to configure the setting, start capturing in Process Monitor.
Make the change to the setting.
Stop capturing in Process Monitor.
Filter by the PID or Process Name.
Look for write operations to the registry or a file that might represent that setting in your application.
Verify the setting by making changes manually and checking in the application GUI.
You can then use batch, Powershell, VBS, DSC, SCCM or whatever to make that change for all of your clients.

Automated Updating of a Program via powershell

I am trying to updating a software that is company wide. When the update is applied to the server, the client machines recognize they need an update and ask if you wish to update or not. To update, the user would need to run as admin, which is'nt an option in this case.
We would like to automate this process using powershell, using the Invoke-Command feature. For the most part, the only thing that the update does is copy new files to the programs folder, which we have achieved with robocopy. However, there is one registry key that needs to be added in multiple locations. There is a setup file that does this, but requires a user (with admin privileges) click a couple buttons, and we want this to be completely automated.
So I guess the short version of my question is, what is the best way to handle the registry changes that setup.exe does? It would be nice if there was a way to invoke the script that the executable does.
As for my question, I solved the problem with a slightly diferent approach. (One that should have been tried initially)
When (ProgramName).exe is run, if it sees that it needs updated, it runs a program called (ProgramName).setup.exe with the parameters :
Client="Local folder" server="server location"
These parameters did NOT work from the command line, however, and so I ended up using a powershell script to make a scheduled task that ran (ProgramName).setup.exe with said parameters.
Another huge advantage to this was the fact that I could create an icon that allowed a regular user to run the scheduled task with admin privileges. I couldn't setup a shortcut directly, however, I wrote an AUTO-it Executable that would run the task as admin.
I hope someone can get some level of help out of this post!

Script to open two applications on start up and snap them with one being 80% screen and the other being 20% in Windows 8.1 Desktop

I am not a programmer rather a designer but have been trying to write a .bat file for weeks to have two applications, which I specify, open automatically and snap to a scale of 80% left hand side and 20% for the second app on the right hand side. I have looked into multiple options without having any luck. Currently, I can create a script to open two files and automate key strokes to have them snap 50-50%, however I really need the 80-20% screen real estate. Any chance anyone would be able to help me out?
I am currently trying to use PowerShell with WASP (http://wasp.codeplex.com/) but scripting in this is beyond my knowledge. Many thanks!
You should try UI Automation PowerShell Extensions.
It supports testing for Metro Apps. The initial setup is a bit tedious (as described in the link provided) but it is well worth it. You have a UI action recording tool UIAutomationSpy which records all of your actions and generates corresponding PowerShell scripts. You can then run these scripts using the UIARunner tool.
With respect to the current problem, you could simulate the steps for snapping the apps using the recorder. You could then create a task which runs a batch file (executing the concerned script) on startup.