portable exe to modify certain user registry entries on public computers

0

Apologies if this is in the wrong forum, but stackexchange is overboard on that issue so...again, apologies.

I log on to public Windows computers all the time. These computers do not allow admin privileges, and do not allow direct editing of the Registry with Windows builtin tools like Regedit.exe.

However, they do allow user accounts to do the following:

  • execute WSH VBScripts and Powershell scripts
  • query WMI
  • Allow portable executables to run (NOT software setup EXEs)

So, there are certain operations that I currently have to do manually every time I log on, and it's getting to be a pain. For example, turning all icons on in the taskbar notification area.

I would like to write a WSH VBScript, a powershell script, or an EXE, that can either modify the Registry via the Windows API, or by making WMI calls. I could add this functionality to a login batchfile, thus automating these functions.

Is this possible?

Thanx

JB

John Bonifas

Posted 2016-10-06T18:55:12.823

Reputation: 1

Yes. Does that answer your question? Please rephrase so that you get answers that are actually helpful. – Thomas Weller – 2016-10-06T18:57:32.880

Your question is too vague to answer. Please specifically describe what you are trying to accomplish and where you are stuck in doing so. – root – 2016-10-06T19:20:33.373

If its possible depends on the configuration. I would caution you from doing something, you are not authorized to do, writting your own executable and putting it on this system likely falls in the thing you are not suppose to do. – Ramhound – 2016-10-06T19:33:56.850

Please note that https://superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?.

– DavidPostill – 2016-10-06T19:35:22.923

You can modify the registry using Powershell, Take a look at this article: https://blogs.technet.microsoft.com/heyscriptingguy/2015/04/02/update-or-add-registry-key-value-with-powershell/

– Kage – 2016-10-08T21:34:44.447

sigh. as usual, stackexchange replies with: 'wrong whatever', 'broke the rules', etc. But at least Kage gave me an answer, thanx Kage. – John Bonifas – 2016-10-19T19:01:13.673

sigh. as usual, stackexchange replies with: 'wrong whatever', 'broke the rules', 'be more specific', etc. How do I ask a good question on stackexchange? that's like asking, how can I turn in a good tax return to the IRS. But at least Kage gave me an answer, thanx Kage.

I figured it out myself. The Wscript.Shell Object has Reg() methods that can read and write to the Registry, and they are allowed at my school per policy.

Set objWshShell = CreateObject("Wscript.Shell") With objWshShell .RegRead(strRegKey) .RegWrite(strRegKey) .RegDelete(strRegKey) End With – John Bonifas – 2016-10-19T19:14:05.290

Answers

0

Here is the answer. I figured it out and am posting the answer for others.

  • The Wscript shell object has RegRead, RegWrite, and RegDelete methods, and at my school we are allowed to write to the HKEY_CURRENT_USER hive:

    Set o = Wscript.CreateObject("Wscript.Shell")
    
  • Our school allows 3rd party registry editing utilities to run, such as RegKit and Regalyzer. And they are better than RegEdit or Regedt32 anyhow.

  • Wscript can make WMI calls by using the GetObject() statement, and using winmgmts protocol URLs as parameters.

Slowly

Posted 2016-10-06T18:55:12.823

Reputation: 1