scotitpulsa
IS-IT--Management
I have a script at login that I want to delete files from the root of C but permission is denied. Can someone throw me a bone on how to impersonate administrator or the like so the script can run, then turn off the impersonation after the files delete? Thanks in advance...here is the snippet of my script:
'dim feedback_old, intranet_old, nextish_old, pulsabg_old
'feedback_old = "c:\documents and settings\all users\desktop\feedback.url"
'intranet_old = "c:\documents and settings\all users\desktop\Rochester Intranet.url"
'nextish_old = "c:\nextish.ico"
'pulsabg_old = "c:\pulsabg.gif"
'if fs.fileexists(feedback_old) = true then
' set feedback_old = fs.GetFile(feedback_old)
' feedback_old.delete [force]
'end if
'if fs.fileexists(nextish_old) = true then
' set nextish_old = fs.GetFile(nextish_old)
' nextish_old.delete [force]
'end if
'dim feedback_old, intranet_old, nextish_old, pulsabg_old
'feedback_old = "c:\documents and settings\all users\desktop\feedback.url"
'intranet_old = "c:\documents and settings\all users\desktop\Rochester Intranet.url"
'nextish_old = "c:\nextish.ico"
'pulsabg_old = "c:\pulsabg.gif"
'if fs.fileexists(feedback_old) = true then
' set feedback_old = fs.GetFile(feedback_old)
' feedback_old.delete [force]
'end if
'if fs.fileexists(nextish_old) = true then
' set nextish_old = fs.GetFile(nextish_old)
' nextish_old.delete [force]
'end if