Script to simulate Guest Mode - powershell

This is my first question here so, sorry if I break any rule I didn't know yet or don't follow any good practice. But, let's go.
I have a Windows 7 laptop and, usually, colleagues ask me to use it to google something, use Word or something else. I'd like to have a secure area for guests (like what Guest Mode was going to be, until it was removed from Windows 7 final version), enabling guests to browse, do what they want and, during the logoff, undo any changes made and wipe guest user data. As I'm former linux user, my first thought was something like a script called by Cron or on the Init appropriate level.
After googling a bit, I've found information about logon and logoff scripts. I know nearly nothing about scripting in MS platform. Do you think that this approach would be a good solution to my problem? If it is, in which language would I have to write this script? If possible, please provide some simple examples. After getting the basic concepts I can handle the rest.
Thanks a lot!

I am hoping this can answer your question, even though it will not include batch scripting.
Here is a guest account on windows 7:
(source: sevenforums.com)
Open the Control Panel (All Items View).
Click on the User Accounts icon.
Click on the Manage another account link. (See screenshot below)
(source: sevenforums.com)
If prompted by UAC, then click on Yes.
Click on the listed Guest account. (See screenshot below)
(source: sevenforums.com)
Click on the Turn On button. (See screenshot below)
(source: sevenforums.com)
The guest account is now turned on. Close the User Accounts window. (See screenshot below)
(source: sevenforums.com)
A script to delete things is:
rd c:\directory1\ /s /q
md c:\directory1
rd c:\directory2\ /s /q
md c:\directory2
ect.
so...
rd "Insert filepath you want removed here" /s /q
md "Same filepath"
For each directory your want removed, you must have a rd and md.
Save this into your "startup" folder so it will run each time you log-in.

Related

Allow Safely Remove Media in GPO

I have a system that I want to lock down, only running certain programs.
All is working so far when I use "Run only specified Windows applications" (under Local Computer\User Configuration\Administrative Templates\System) except when I try to add an option to remove media.
I have the policy enabled with a list of all applications I want to be able to load. And this: "rundll32.exe shell32.dll, Control_RunDLL HotPlug.dll"
but when I run my shortcut for this I just get the error "This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator"
I saw someone online with a similar problem with rundll32.exe but that was with a printer and they got it working by adding a printui.dll. Am I missing something or doing something wrong or is this not possible? I need this option because I have to disable right click in our locked down system.

MobaXterm created `xwin_mobax.exe` or it is a virus?

Using Personal Edition v20.2 of MobaXterm at Windows 10...
No problem to remove a strange file like C:\Users\USERNAME\Documents\MobaXterm\slash\bin\xwin_mobax.exe ?
PS: this page say that xwin_mobax.exe is a virus, and windows asking about pemission (I cancel).
The page link that you mentioned in your post describes about checking running processes associated with MobaXterm program and if you find those suspicious then it can be dangerous but they are not categorizing as threat since it is tool for SSH and as you know for that it reads keystrokes and mouse inputs.
So simple answer is NOT currently but if you monitor some unusual behavior by its process then it can be.
Did you check this?
1 Antivirus labeled it as Trojan.Heur
The most significant indicator is an Anti-VM trick
(You can also check here and here)
Conclusions:
You can continue using your "Personal Edition v20.2 of MobaXterm", but
You can to delete as precautionary, but it is only 2.5% (1 of 40 detector-engines) as metadefender report YnpJd01EUXdNWEo1YUhSSmFEQXRSRlVyMWlGMkNidzg. Seems that will not affect MobaXterm functions

Clear recently used programs from Windows 7 start menu

Does anyone know a way to clear MRU start menu programs on windows 7 using powershell? I saw a way using a registry edit, but I would prefer if at all possible to avoid that.
If you want to clear recent programs list (one that appears when the start button is pressed), here are your options:
1) Use the following Powershell script and restart Explorer (credit goes here):
del HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist
2) Because you also said disabling recent programs list works for you, here are the two ways to do it:
Using a REG File Download (see above link).
Through the Local Group Policy Editor (I would recommend this one).
And this is just another useful article that covers related topics and explains how it works in detail:
Clear recently used programs in Start Menu in Windows 7.

Handling UAC prompts when doing UIAutomation

Is there a way to access the UAC prompts via UIAutomation (I'm writing a test for an installation process).
From http://msdn.microsoft.com/en-us/library/ms742884.aspx it looks like there is a way to set this up.
So the question is how to make this automatically?
My current UIAutomation setup is made of the amazing White API (white.codeplex.com) with a bunch of extension methods from the O2 Platform
For security reasons, this is guaranteed to be impossible.
The whole point of UAC is that programs cannot automatically click Allow.
Not exactly the answer you'd have liked but a workaround based on SLaks's answer (Thanks #SLaks for answer) i.e. for security reasons Windows wouldn't allow automated clicks on the 'yes'. In that case if bypassing is the only option we could have same effect as elevated prompt and clicked yes by setting "UAC: Behaviour of elevation prompt for administrators in Admin Approval Mode" to 'Elevate without prompting' in security policy. I tried this in my automated tests and they are giving me same effect as clicking 'yes' on that prompt if it was prompted. Of course it isn't prompting since I've changed that option.

Is there a way to automatically log onto a Windows XP machine at specific time?

How to set a specific logon time for a specific user on Windows XP?
For example, the computer is an "always on machine" and most of the time no one is logged on. I want to set a time for my user to log on, without someone actually having to be in front of the machine. I've tried a workaround with the built-in auto logon function (control userpassword2), but I still need a secure system as I'm not the only user, and would still want a password even if I was the only user.
I have searched for third party software, but to no avail. I've a good knowledge of batch and Python scripting and a little of Java, so any pointers with any of those would help.
How can it be "secure" if it logs you on without you being there? Surely it would be better for it to wait for you to type in a password (i.e. the login prompt)?
If you want a fast "startup" time, then you can lock the workstation (ctrl+alt+del to open the Task Manager and then click 'Lock'. This shows a dialog just like the login prompt, but when you enter your password you instantly continue your existing session). Or if you want to be more eco friendly, put your PC into Sleep mode, which most PCs will return from (again with an optional password prompt) in less than 5 seconds.
One way I just thought of: Run a Vnc Server, and hack into an open source viewer program. Then you can rig it with some code to pass keyboard commands back into the computer, maybe implement some screen scraping to make sure it only does it when appropriate.
But seriously, there has to be a better way. Why are you trying to do this?