Link to home
Start Free TrialLog in
Avatar of Scott Lamond
Scott LamondFlag for United States of America

asked on

Windows 7 Security

I'm sure this is a Windows 7 Security issue: We have a dedicated PC that plays our phone system hold music. Every hour it runs a VBS script to change the playlist in the PC's Startup folder and then a scheduled task to boot the PC. The boot task is working (a BAT file containing shutdown.exe with switches) but not the VBS script. It worked fine in WindowsXP but after replacing the machine with a Windows7 machine it only executes the first command in the VBS script. That is, it deletes the playlist shortcut (Windows shortcut to a WinAmp m3u) in the Startup folder but never writes the new playlist shortcut to the folder. I've already checked that all the vbs command lines use the same folder syntax, added both the vbs file and it's location folder to Microsoft Security Essentials exceptions and verified that hold-pc\admin2015 has full rights to the Startup folder (which had been Shared as part of troubleshooting to execute the vbs file from a different machine).

It works fine if I run the VBS by simply double-clicking it.
But if it's run by the Task Scheduler it only deletes the shortcut but never writes the new one to the Startup folder.
Avatar of Scott Lamond
Scott Lamond
Flag of United States of America image

ASKER

I found the problem myself. But I'll award the points to the first to guess what it was. :)
Attached is the script, renamed with a TXT extension, as an aid in guessing.
holdmusic.txt
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Close enough. I replaced the "M:" with "\\hold-pc\mpx". I'm assuming the system or the wscript.exe program doesn't like mapped drives.
It does, but you didn't map, first, other mappings are not universally available, that's why unc paths are easier here.
But it ran fine when done manually, accepting the M: mapping. So, I had assumed it's only the Task Scheduler (system) that doesn't accept mappings for some security reason.