Skip to main content


Runas Touch Screen Application
















Purpose:
One of the problems I had at work was the ability to run an application as a different user on a touch screen computer. So I wrote an application that dynamically creates buttons based on what it reads from a text file called paths.txt. This program does support arguments and should be able to figure out how to break up the path to find them.

To install just extract the application and paths.txt to a folder and runas away.

Requirements:
.net 4 framework
osk.exe in the usual place if you want to use the onscreen keyboard

TODO:
Add some more error checking with reading the text file
Clean code
Maybe allow this to work with domain user if someone wants.



Paths.txt 

name,path
------------------------------------------------------------------------------
Add\Remove Programs,rundll32.exe shell32.dll,Control_RunDLL Appwiz.cpl
Command Prompt,C:\Windows\System32\cmd.exe
Datetime,rundll32.exe shell32.dll,Control_RunDLL TimeDate.cpl
Display Properties,rundll32.exe shell32.dll,Control_RunDLL Desk.cpl
Notepad,C:\Windows\Notepad.exe
System Properties,rundll32.exe shell32.dll,Control_RunDLL Sysdm.cpl
Taskmgr,taskmgr
Control Panel,rundll32.exe shell32.dll,Control_RunDLL
------------------------------------------------------------------------------

Download Link: 
RunasUserTS.zip

Source code:
Leave a message and I will work on uploading the source

Comments

Popular posts from this blog

Excel document for pinging list of computers VBA

Here is an excel document I created that will ping a list of nodes in column A and give results in column B. There are much better tools that can be used such as angry ip scanner  http://www.angryip.org/w/Home . I just wrote this as an example Requirements: Tested with Office 2010 Download: Download

Powershell - Com+ Application Recycle

Needed a script to recycle a com+ application nightly and this is what i came up with. This script will write each recycle it does to the event log under application. Run locally or via a scheduled task. #Recycle COM+ Application and write to the event log the status # 1.0 Release # Run script locally # Write to the event log ######################################## #Configurable ######################################## #Com+ ApplicationName $ComPlusLikeAppName = "Put the name of Com+ Application here a like statement is used to eval so you can get away with putting part of it" #EventLog to write to. $eventlog = "Application" #Source for eventlog. $source = "RecycleComObject" #Successful Event ID $SEventID = 0 #Error Event ID $EEventID = 666 #Process that COM+ runs under $process = "dllhost.exe". ######################################## #Clear $CurrentMemory = $null $PRocessID = $null $Commandline = $null $GUID = $null $AppID = $null $Messag

Powershell : Certutil Find Expired Certs on CA server

Wrote this to get certificate expiration information for certificates that expired 5 days ago to ones that expire in 90 days. Wrap an invoke-command around this for remote query. $Before = (get-date).adddays(90).ToString("MM/dd/yyyy") $After = (get-date).AddDays(-5).ToString("MM/dd/yyyy") <# https://blogs.technet.microsoft.com/poshchap/2016/01/01/powershell-and-certutil-exe/ We create a date range with $Before, i.e. certificates expiring before this date, and $After, i.e. certificates expiring after this date. These values are converted into something that certutil can understand - $Restrict. This is then used with the certutil -restrict parameter. #> $Restrict = "NotAfter<=$Before,NotAfter>=$After" $Report = @() $cmd = & certutil.exe -view -restrict $Restrict -out "RequesterName,CommonName,Certificate Expiration Date","Certificate Template" $SplitLines = $cmd.Split("`n`r") $Index = 0 foreach ($line in $Sp