CPGDeveloper
Board Regular
- Joined
- Oct 8, 2008
- Messages
- 189
I administer an MS Access DB with approximately 20 end users. Each user has a copy of the FE on their desktop. When I need to make changes, the Form_Load Event of the initial form identifies that a new version is available and runs a batch script to copy down the new version of the front end to the users' desktop (I found this batch script on this forum I believe). It works great.
I have a request to change the generic MS Access Logo of the Application that sits on the users' desktop. The only way I believe to do this (without altering the registry) is to simply have a shortcut on the users' desktop that points to their copy of the FE. I'm able to alter the batch script to put the application in a different folder, but am having issues creating the shortcut and using the specific image that I want. Any ideas of how I would go about doing that? Can I add to this current batch script -- or perhaps I need to create a separate one? Thanks in advance!
' sets the file name of the batch file to create
TestFile = CurrentProject.Path & "\UpdateDbFE.cmd"
' sets the restart file name
strRestart = """" & strKillFile & """"
' creates the batch file -- The 10 after the ping -n is the delay for it to copy needs to be this for large front ends
Open TestFile For Output As #1
Print #1 , "Echo Off"
Print #1 , "ECHO Deleting old file"
Print #1 , ""
Print #1 , "if exist """ & strBackUp & """ del """ & strBackUp & """"
Print #1 , ""
Print #1 , "ECHO Copying backup file"
Print #1 , "Echo Off"
Print #1 , "ping -n 14 127.0.0.1 > nul"
Print #1 , ""
Print #1 , ":Fileready1"
Print #1 , "Ren """ & strKillFile & """ """ & strTarget & """"
Print #1 , "ECHO Copying New file"
Print #1 , "Echo Off"
Print #1 , "Copy /Y """ & strReplFile & """ """ & strKillFile & """"
Print #1 , ""
Print #1 , ":checkfilecreation"
Print #1 , "REM Now that a .mov file has been added to the folder check to see if the file has "
Print #1 , "REM completed the conversion or copying to the folder before starting "
Print #1 , ""
Print #1 , "CLS"
Print #1 , ""
Print #1 , "for %%I in (""" & strKillFile & """) do ( (call ) >>%%I ) 2>nul && (cls && set b=%%I && @Echo !b! is completed and transfer is ready && GOTO :fileready"
Print #1 , ") || (cls && echo %%I is still being created"
Print #1 , ")"
Print #1 , ""
Print #1 , ":ContinueCheck"
Print #1 , "REM Go back to checkfilecreation module"
Print #1 , "GOTO :checkfilecreation"
Print #1 , ""
Print #1 , ""
Print #1 , "if exist """ & strBackUp & """ del """ & strBackUp & """"
Print #1 , ""
Print #1 , ":Fileready"
Print #1 , "Echo CLICK ANY KEY TO RESTART THE ACCESS PROGRAM"
Print #1 , "START /I " & """MSAccess.exe"" " & strRestart
Close #1
I have a request to change the generic MS Access Logo of the Application that sits on the users' desktop. The only way I believe to do this (without altering the registry) is to simply have a shortcut on the users' desktop that points to their copy of the FE. I'm able to alter the batch script to put the application in a different folder, but am having issues creating the shortcut and using the specific image that I want. Any ideas of how I would go about doing that? Can I add to this current batch script -- or perhaps I need to create a separate one? Thanks in advance!
' sets the file name of the batch file to create
TestFile = CurrentProject.Path & "\UpdateDbFE.cmd"
' sets the restart file name
strRestart = """" & strKillFile & """"
' creates the batch file -- The 10 after the ping -n is the delay for it to copy needs to be this for large front ends
Open TestFile For Output As #1
Print #1 , "Echo Off"
Print #1 , "ECHO Deleting old file"
Print #1 , ""
Print #1 , "if exist """ & strBackUp & """ del """ & strBackUp & """"
Print #1 , ""
Print #1 , "ECHO Copying backup file"
Print #1 , "Echo Off"
Print #1 , "ping -n 14 127.0.0.1 > nul"
Print #1 , ""
Print #1 , ":Fileready1"
Print #1 , "Ren """ & strKillFile & """ """ & strTarget & """"
Print #1 , "ECHO Copying New file"
Print #1 , "Echo Off"
Print #1 , "Copy /Y """ & strReplFile & """ """ & strKillFile & """"
Print #1 , ""
Print #1 , ":checkfilecreation"
Print #1 , "REM Now that a .mov file has been added to the folder check to see if the file has "
Print #1 , "REM completed the conversion or copying to the folder before starting "
Print #1 , ""
Print #1 , "CLS"
Print #1 , ""
Print #1 , "for %%I in (""" & strKillFile & """) do ( (call ) >>%%I ) 2>nul && (cls && set b=%%I && @Echo !b! is completed and transfer is ready && GOTO :fileready"
Print #1 , ") || (cls && echo %%I is still being created"
Print #1 , ")"
Print #1 , ""
Print #1 , ":ContinueCheck"
Print #1 , "REM Go back to checkfilecreation module"
Print #1 , "GOTO :checkfilecreation"
Print #1 , ""
Print #1 , ""
Print #1 , "if exist """ & strBackUp & """ del """ & strBackUp & """"
Print #1 , ""
Print #1 , ":Fileready"
Print #1 , "Echo CLICK ANY KEY TO RESTART THE ACCESS PROGRAM"
Print #1 , "START /I " & """MSAccess.exe"" " & strRestart
Close #1