From: "fortran_guy" <>
| Windows 7 32 bit but the intended target is a Windows Server 2008 R2
| as an inbound and outbound FTP server. I've run Set-ExecutionPolicy
| unrestricted, set it to run with gpedit.msc, and both RSOP.MSC and
| sysinternals AUTORUNS show it running through local group
| policy. .ps1 is associated with PowerShell, the script is in c:
| \windows\system32\grouppolicy\machine\scripts\star tup (which I believe
| is the default location) and the file even shows under the PowerShell
| "Show Files" button. So what tweaks/changes/etc. am I missing.
| The script is:
| # Check for changes every 60 seconds
| $currentFiles = Get-ChildItem D:\inetpub\ftproot\localuser\username
| \UNEDITEDIMAGES
| while(-1){
| $newFiles = Get-ChildItem D:\inetpub\ftproot\localuser\username
| \UNEDITEDIMAGES
| if($newFiles.count -ne $currentFiles.count){
| $currentFiles = $newFiles
| (new-object Media.SoundPlayer "C:\WINDOWS\Media\notify.wav").play()
| }
| Start-Sleep(60)
| }
Look at the POV the script is running under and the privileges provided.
When you run it it uses your credentials.
If it is failing it may be because of the credentials of the environment it is running
under.
--
Dave
Multi-AV Scanning Tool -
http://www.pctipp.ch/downloads/dl/35905.asp