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.
slamondAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slamondAuthor Commented:
I found the problem myself. But I'll award the points to the first to guess what it was. :)
0
slamondAuthor Commented:
Attached is the script, renamed with a TXT extension, as an aid in guessing.
holdmusic.txt
0
McKnifeCommented:
Drive m wasn't mapped, right?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hey MSSPs! What's your total cost of ownership?

WEBINAR: Managed security service providers often deploy & manage products from a variety of solution vendors. But is this really the best approach when it comes to saving time AND money? Join us on Aug. 15th to learn how you can improve your total cost of ownership today!

slamondAuthor Commented:
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.
0
McKnifeCommented:
It does, but you didn't map, first, other mappings are not universally available, that's why unc paths are easier here.
0
slamondAuthor Commented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
OS Security

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.