I am trying to unmount a drive, mount the drive, start a view, mount vobs then call a perl script.
The problem that I am running into is, it seems I have to run as administrator to mount drives but my program has to run as a specific user.
I can get the mount commands to run if I run the the powershell as an admin but I need to run the perl scipts as a user.
How do I get both parts to run as a user?
I have tried commented and uncommented versions
c:\WINDOWS\system32\net.exe use Z: /d
#Remove-PSDrive Z
sleep 2
cleartool endview -server Bedrock_Main_mvwd01tc_1
sleep 2
##new-psdrive -name Z -psprovider FileSystem -root \\view\Bedrock_Main_mvwd01tc_1
c:\WINDOWS\system32\net.exe use Z: \\view\Bedrock_Main_mvwd01tc_1
sleep 2
##%DRIVE% ##|| goto NETUSEERROR
Set-Location Z:\CMTools\buildtools
cd Z:\CMTools\buildtools
cleartool mount -a
### SET THE CONFIG SPEC TO THE NIGHTLY TIMESTAMP.
\\usmvwc0wafnsrv.ww005.siemens.net\EngTools\bin\chrcs -p $PROJECT -n -m -f