copying files and registering ocx

G

Guest

We have logon scripts in our organisation, so when users log-in it calls a specific login script to map network drive letters etc.

We have a problem that one of our intranet application requires the use of the flash.ocx (flash player) to be copied to the PC to the c:\winnt\system32\macromed\flash directory and the file needs registering using regsvr32 flash.ocx

The problem lies that because they are normal domain users, they do not have access to the registry on their PCs (windows 2000 professional), which means that the file cannot be copied to the c:\winnt\system32\macromed\flash as they do not access to directory and also register the file.

So, is there a way that:

a) As part of the login script, the permission rights be granted on the c:\winnt\system32\macromed\flash directory.

b) Be able to register the flash.ocx file

Thanks
 
T

Torgeir Bakken \(MVP\)

Raks said:
We have logon scripts in our organisation, so when users log-in it calls a specific login script to map network drive letters etc.

We have a problem that one of our intranet application requires the use of the flash.ocx (flash player) to be copied to the PC to the c:\winnt\system32\macromed\flash directory and the file needs registering using regsvr32 flash.ocx

The problem lies that because they are normal domain users, they do not have access to the registry on their PCs (windows 2000 professional), which means that the file cannot be copied to the c:\winnt\system32\macromed\flash as they do not access to directory and also register the file.

So, is there a way that:

a) As part of the login script, the permission rights be granted on the c:\winnt\system32\macromed\flash directory.

b) Be able to register the flash.ocx file
Hi

You might get something to work using a Runas wrapper utility or
similar, take a look here:

http://groups.google.com/[email protected]

Another one that is not mentioned above:

LSrunas/LSrunasE (the latter with password encryption)
http://www.linkselection.com/lsrunas.asp


If this is am Active Directory domain, this is a better solution:

You can do it in a computer startup script that runs as part of
the boot up process (before the user logs in). It runs under the system
context and has admin rights.

To be able to access files (e.g. flash.ocx) over the network from the
computer startup script, you could put the file(s) on a network share
and grant read access for the AD group "Domain Computers" to the share.

Alternatively, from the startup script, you could map a drive on
the fly, like this (VBScript example):

'--------------------8<----------------------
sDomainUser = "arp.corp\computer_fix"
sPswd = "something"

Set oNetwork = CreateObject("Wscript.Network")

oNetwork.MapNetworkDrive _
"Y:", "\\server\netlogon\some folder",, sDomainUser, sPswd
'--------------------8<----------------------



Here is a VBScript that will do the job, you only need to change the
path in the variable sSourceFile:

'--------------------8<----------------------
Set oShell = CreateObject("Wscript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
sWinSysDir = oFSO.GetSpecialFolder(1).Path

sTargetFile = sWinSysDir & "\Macromed\Flash\Flash.ocx"

sSourceFile = "\\someserver\someshare\somefolder\Flash.ocx"

If Not oFSO.FileExists(sTargetFile) And oFSO.FileExists(sSourceFile) Then
On Error Resume Next
oFSO.CreateFolder sWinSysDir & "\Macromed"
oFSO.CreateFolder sWinSysDir & "\Macromed\Flash"
On Error Goto 0
oFSO.CopyFile sSourceFile, sTargetFile
oShell.Run sWinSysDir & "\Regsvr32.exe /s " & sTargetFile, 1, True
End If
'--------------------8<----------------------
 
T

Torgeir Bakken \(MVP\)

Raks said:
We have logon scripts in our organisation, so when users log-in it calls a specific login script to map network drive letters etc.

We have a problem that one of our intranet application requires the use of the flash.ocx (flash player) to be copied to the PC to the c:\winnt\system32\macromed\flash directory and the file needs registering using regsvr32 flash.ocx

The problem lies that because they are normal domain users, they do not have access to the registry on their PCs (windows 2000 professional), which means that the file cannot be copied to the c:\winnt\system32\macromed\flash as they do not access to directory and also register the file.

So, is there a way that:

a) As part of the login script, the permission rights be granted on the c:\winnt\system32\macromed\flash directory.

b) Be able to register the flash.ocx file
Hi

You might get something to work using a Runas wrapper utility or
similar, take a look here:

http://groups.google.com/[email protected]

Another one that is not mentioned above:

LSrunas/LSrunasE (the latter with password encryption)
http://www.linkselection.com/lsrunas.asp


If this is am Active Directory domain, this is a better solution:

You can do it in a computer startup script that runs as part of
the boot up process (before the user logs in). It runs under the system
context and has admin rights.

To be able to access files (e.g. flash.ocx) over the network from the
computer startup script, you could put the file(s) on a network share
and grant read access for the AD group "Domain Computers" to the share.

Alternatively, from the startup script, you could map a drive on
the fly, like this (VBScript example):

'--------------------8<----------------------
sDomainUser = "arp.corp\computer_fix"
sPswd = "something"

Set oNetwork = CreateObject("Wscript.Network")

oNetwork.MapNetworkDrive _
"Y:", "\\server\netlogon\some folder",, sDomainUser, sPswd
'--------------------8<----------------------



Here is a VBScript that will do the job, you only need to change the
path in the variable sSourceFile:

'--------------------8<----------------------
Set oShell = CreateObject("Wscript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
sWinSysDir = oFSO.GetSpecialFolder(1).Path

sTargetFile = sWinSysDir & "\Macromed\Flash\Flash.ocx"

sSourceFile = "\\someserver\someshare\somefolder\Flash.ocx"

If Not oFSO.FileExists(sTargetFile) And oFSO.FileExists(sSourceFile) Then
On Error Resume Next
oFSO.CreateFolder sWinSysDir & "\Macromed"
oFSO.CreateFolder sWinSysDir & "\Macromed\Flash"
On Error Goto 0
oFSO.CopyFile sSourceFile, sTargetFile
oShell.Run sWinSysDir & "\Regsvr32.exe /s " & sTargetFile, 1, True
End If
'--------------------8<----------------------
 
U

_UE_

It is possible using FlashPlayerControl is the way to solve you
problem... FlashPlayerControl allows to embed flash.ocx int
application so you can forget about user permissions problem etc


-
_UE
 
U

_UE_

It is possible using FlashPlayerControl is the way to solve you
problem... FlashPlayerControl allows to embed flash.ocx int
application so you can forget about user permissions problem etc


-
_UE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top