A while back a thread was posted that revealed a reghack for mapping drives with a GPO Script and UAC on, was not supported by Microsoft.
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Main=26719&Number=197754
The reghack required changing EnableLinkedConnections - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Main=26424&Number=195765
Since these threads I've been wanting to revisit this. I remembered another post that discussed running your mapped drives via a vbscript called launchapp.wsf. http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Board=1&Number=192303
After looking over the script, I decided I would try to convert it for kix purposes. I had to add the ablility to accept arguments and a little error testing. It appears to run for me on my computer, but none of my clients use a GPO Script.
I was wondering if someone with a GPO Script could test it and post back their results. The point of the the function is to map drives and printers in the context of the user with the UAC on (Vista, Win7) while running in a GPO script. Just create a simple mapdrives.kix file to go along with this.
if instr (@producttype ,"Vista" ) or instr (@producttype ,"Windows 7" )
$RC =RunAsInteractiveUser (@scriptdir + "\kix32.exe" , @scriptdir + "\mapdrives.kix" )
? @serror
endif
Function RunAsInteractiveUser($FQFN , optional $arguments , optional $workdir , optional $taskname , optional $donotdelete )
Dim $service , $rootfolder , $taskdefinition , $triggers ,$trigger ,$action , $settings
Dim $TriggerTypeRegistration , $ActionTypeExectuable ,$flagtaskcreate ,$logontypeinteractive
if $taskname =""
$taskname = "Run As Interactive User - " + @ticks
endif
$TriggerTypeRegistration = 7
$ActionTypeExecutable = 0
$FlagTaskCreate = 2
$LogonTypeInteractive = 3
if exist ($fqfn )
$service =CreateObject ("Schedule.Service" )
$service.Connect ()
$rootFolder =$service.GetFolder ("\" )
$rootFolder.DeleteTask ($taskname , 0 )
$taskDefinition = $service.NewTask (0 )
$triggers = $taskDefinition.Triggers
$trigger = $triggers.Create ($TriggerTypeRegistration )
$settings =$taskDefinition.Settings
$settings.DisallowStartIfOnBatteries = not 1
$settings.StopIfGoingOnBatteries = not 1
$Action = $taskDefinition.Actions.Create ($ActionTypeExecutable )
$Action.Path = $fqfn
if exist ($arguments )
$Action.Arguments = '"' + $arguments + '"'
else
exit 2
endif
if exist ($workdir )
$action.WorkingDirectory = $workdir
else
exit 2
endIf
$rc =$rootFolder.RegisterTaskDefinition ($taskname , $taskDefinition , $FlagTaskCreate ,,, $LogonTypeInteractive )
if not $donotdelete
sleep 1
$rootFolder.DeleteTask ($taskname , 0 )
endif
else
exit 2
endif
endfunction