Jump to content

AaronLongJBC

Members
  • Posts

    5
  • Joined

  • Last visited

Reputation

0 Neutral

About AaronLongJBC

Personal Information

  • Occupation
    IT Support Analyst
  • Location
    Montgomery, AL
  1. Is there anyway I could just add it onto the powershell script I am already running.
  2. I've tried setting it up through a scheduled task but I can't get it to work. Also it is running on the local computer so the remote logoff for inactivity in GPO is for terminal services only. If there is another way I haven't found it but I am a little new at this and don't know all the GPO settings. #shell.ps1New-PSDrive -Name "Y" -PSProvider FileSystem -Root "\\vader\adsapps\ads11_apps" -Persist & 'Y:\wipt.exe' assembly-out sleep -s 15 while(get-process wipt*){sleep -s 3} & 'Y:\wipt.exe' /terminate logoff.exe My setup if it helps for the whole picture is we have a plant that uses a bar code system to keep up with the different pieces as it goes through production. The computers we are going to be putting in are Windows 8.1 and they need to be locked down as much as possible. To do so I changed the shell to run powershell and the designated the script to run in a hidden window to launch the program and close when the program is closed. The data is safe from a logoff when the program is open as long as they have completed the scan process on it at the specific computer, which we already do with our TS in place, which we are wanting to get away from. I also need to be able to force a log off on the computer when inactive so that they are not in it at night when reports are ran and they need to be out for them to run. So that's some background on this if it helps. Also, our DC is a Win Server 2008.
  3. Is there any way to also get this to logoff when the screensaver started? I tried a few things but never could get it to work.
  4. Ok so this is what I have in PS. #shell.ps1 New-PSDrive -Name "Y" -PSProvider FileSystem -Root "\\vader\adsapps\ads11_apps" -Persist & 'Y:\wipt6.exe' assembly-out sleep -s 15 while(get-process wipt6.exe){sleep -s 10} & 'Y:\wipt6.exe' /terminate logoff.exe It is working for loading the program but it is killing the process and logging off while the program is still running. I'm kind of new at this so, any ideas on why? Nevermind found it. It was the .exe on the get-process.
  5. I am trying to fine tune a vbs script that I am using to open a program as shell when the user logs on and to automatically log the user off when the program is closed. I have tried just setting the program as shell on the computer but it does not log off when the program is closed. This is what I have right now. Set objShell = CreateObject("WScript.Shell") strCmd = "net use Z: \\vader\adsapps\ads11_apps /persistent:yes /YES" set objExec = objShell.Exec(strCmd) set oShell=createobject("wscript.shell") sCmd="Z:\WIPT6.exe assembly-out" oShell.run sCmd,1,true 'true forces it to wait for process to finish Set OpSystems = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true") for each OpSys in OpSystems OpSys.Win32Shutdown 0 next sCmd="shutdown /l" oShell.run sCmd It works decently but it has some bugs that I need to work out. Mainly it is just not very reliable as when the user logs on it sometimes logs off before the program even opens. User sometimes has to log in 5 or 6 times before it works properly. I also want to eventually make the script to also log off the user after a set amount of inactivity. Any help would be nice to make it more reliable when starting up.
×
×
  • Create New...