schtasks.exe via vbscript .Run parm
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
schtasks.exe via vbscript .Run parm
I'm looking to run this command in a script if certain conditions are met all that is fine however, due to the Windows 7 secuirty options, I get access denied. However if you manually launch CMD as administraor by right clicking and typing the command line the tasks creates.oWSH.Run cmd /k schtasks /Create /XML c:path to XML file /tn:at1So my questions is does anybody know a scirpted solution around this I have my task stored in an XML and yes it needs to be created as the User and only run if the user is logged in (the XML contains all the control data). When running the task it uses the Builtin Users.Any idea how to make vbscript do the same as run. Using WMI does it as system by default unless there is some way around this I'am missing.Thank you for any insight
schtasks.exe via vbscript .Run parm
Thisis a scripting forum. If you have C# questions you will need to ask them in a Developers forum.
Yes - we know that you can create trusted assemblies that will get you where you need to go. It is kind of overkill scince you can run schtasks remotely without elevation and not have an issue. In POwerShell V3 this wil actually be even easier however elevation will always be required when altering the local machine.
Occam's Razor. Use it.jvierra2012-03-31 10:01:10
Yes - we know that you can create trusted assemblies that will get you where you need to go. It is kind of overkill scince you can run schtasks remotely without elevation and not have an issue. In POwerShell V3 this wil actually be even easier however elevation will always be required when altering the local machine.
Occam's Razor. Use it.jvierra2012-03-31 10:01:10