BakerSyd
asked on
how to delete outlook signature file with VBS
hi all
i need to create a vbs script to delete a outlook signature from the signatures folder.
im fairly new to vbs scripting and im not sure which is the best way to go around this... ive seen plenty of examples of file name contains this and that...
but im totally confused as to what is the best process for me.
the difficulty here is that the file names created contain the username variable
what i mean by that is that the final name is called
ausamj_Signature.htm
every user has one of these, and every file is called AUS***_Signature.htm
this file resides in
C:\Users\ausamj\AppData\Ro aming\Micr osoft\Sign atures
in regards to the scripting side, my understanding is that we need to find out first who is logged on, so i have a script for that.
Dim objNetwork
Dim userName
Set objNetwork = CreateObject("WScript.Netw ork")
userName = objNetwork.UserName
WScript.Echo userName
and then somehow use the UserName variable to find the .htm file containing ausamj
and then delete it.... am i on the right path?
the reason why we cant delete *.htm is because users create their own signatures, so delete *.htm would remove all of them.
we only want to delete the standard one that is created by us.
so we need to find out who is logged on
locate the correct .htm file for the user, and then delete it.
appreciate if somebody could give me a hand with this
cheers!
i need to create a vbs script to delete a outlook signature from the signatures folder.
im fairly new to vbs scripting and im not sure which is the best way to go around this... ive seen plenty of examples of file name contains this and that...
but im totally confused as to what is the best process for me.
the difficulty here is that the file names created contain the username variable
what i mean by that is that the final name is called
ausamj_Signature.htm
every user has one of these, and every file is called AUS***_Signature.htm
this file resides in
C:\Users\ausamj\AppData\Ro
in regards to the scripting side, my understanding is that we need to find out first who is logged on, so i have a script for that.
Dim objNetwork
Dim userName
Set objNetwork = CreateObject("WScript.Netw
userName = objNetwork.UserName
WScript.Echo userName
and then somehow use the UserName variable to find the .htm file containing ausamj
and then delete it.... am i on the right path?
the reason why we cant delete *.htm is because users create their own signatures, so delete *.htm would remove all of them.
we only want to delete the standard one that is created by us.
so we need to find out who is logged on
locate the correct .htm file for the user, and then delete it.
appreciate if somebody could give me a hand with this
cheers!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome, good luck with the implementation, and thanks for the grade!
ASKER
that script is fantastic, does exactly what i want
thanks for your help !