Run VB Script on Fista
-
I've just written a VB script that i need to run to collect information about my computer. I only need to run it once and then It'll languish in my documents folder until I finally upgrade to XP and have to use it again. vbs files don't give a run as administrator option and i don't seem to able to get WSHShell up and running. How would you get a script running under UAC? It writes some stuff to C:/Program files which i think is why it's failing.(Further tests show the same error writing to my own Documents directory) Russell
-
I've just written a VB script that i need to run to collect information about my computer. I only need to run it once and then It'll languish in my documents folder until I finally upgrade to XP and have to use it again. vbs files don't give a run as administrator option and i don't seem to able to get WSHShell up and running. How would you get a script running under UAC? It writes some stuff to C:/Program files which i think is why it's failing.(Further tests show the same error writing to my own Documents directory) Russell
Run the script from an elevated command prompt. cmd.exe -> Run as administrator -> wscript yourscript.vbs
-
Run the script from an elevated command prompt. cmd.exe -> Run as administrator -> wscript yourscript.vbs
i've tried doing that and it doesn't seem to make a difference I've even tried running explorer from an elevated command prompt and using that to start the script but that doesn't seem to work either. I've rewritten the code in c# now so at least I've managed to get the work done Thanks for the help Russell