1

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
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
emptyshell
  • 103
  • 1
  • 13

1 Answers1

1

On Windows, all dynamic views are mounted automatically on M: drive, so you shouldn't need to use a non ClearCase command (net.exe) to start a view.

Simply cleartool startview aViewTag is enough.

If you need to use a drive letter for a specific view, start the view first (for dynamic view especially, otherwise it won't be visible under M:\), and then use subst.

See " ClearCase, Mapping specific folders into Drives, using dynamic views " for a concrete example.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250