No video

Use vbScript to Deploy your Access Front End, Create Shortcuts, and Check for Updates on User Login

  Рет қаралды 3,031

Sean MacKenzie Data Engineering

Sean MacKenzie Data Engineering

Күн бұрын

In this episode, we're going to deploy our Access database app using a script that can be used in a user's startup folder. This will be a script that will check if the app has been deployed, create the deployment folder and retrieve the front-end file from the server, put a shortcut on the user's desktop if needed, and then check if the front-end is the current version each time the user logs into their computer. This kind of script can save developers a lot of time on administration tasks and user management. Let's go and deploy our Access front-end using vbScript!
Related Videos:
How to disable and enable the Bypass Key on your MS Access app so users cannot bypass Autoexec/Forms
• How to disable and ena...
Link and Relink Your Access Front-End App Using vbScript and a Table-Based Approach
• Link and Relink Your A...
How to Use vbScript to Relink Your User's MS Access Application Front-End Automatically
• How to Use vbScript to...
Use vbScript to Deploy your Access Front End, Create Shortcuts, and Check for Updates on User Login
You are watching this video now!
How to Encrypt and Hash Passwords in MS Access
• How to Encrypt and Has...
How to Encrypt Sensitive Data in Microsoft Access
• How to Encrypt Sensiti...
How to Kick Users out of Your MS Access Database
• How to Kick Users out ...
How to Get the IP Address in Microsoft Access
• How to Get the IP Addr...
How to Get the Windows Username in MS Access
• How to Get the Windows...
How to Set Basic Startup Options on Your Microsoft Access Database
• How to Set Basic Start...
Interested in transforming your career or finding your next gig?
system.billzon...
Want my team to do a project for you? Let's get to it!
system.billzon...
Want to get access to premium content made just for you and have a chat with me? Find me on Patreon :
/ mackenziedataengineering
Demo of my BZ RDP Cloaker:
www.patreon.co...
Want to work with me 1:1? Contact me today and book your free 20 min consultation!
Contact form you can find at www.mackenziema...
Follow me on social media:
/ mackenziedataanalytics
/ seamacke
/ seamacke
/ seamacke
/ psmackenzie
Get Microsoft Office including Access:
click.linksyne...
Got a KZfaq Channel? I use TubeBuddy, it is awesome. Give it a try:
www.tubebuddy....
#vbscript #msaccess #vba
• Use vbScript to Deploy...

Пікірлер: 25
@bumpersmith
@bumpersmith 2 жыл бұрын
Definitely interested in a linking video. These are very helpful. Also a compact and repair script for the backend and the front end would be very helpful. Thank you
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
I put it on my list! Thanks for the feedback.
@miles6875
@miles6875 Жыл бұрын
Excellent video - thanks Sean!
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Many thanks and glad it helped!
@simonmaersk
@simonmaersk Жыл бұрын
This is great! Is there anywhere I can download your script? Thanks!
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
I added it to the bottom of the list: www.mackenziemackenzie.com/downloads/
@simonmaersk
@simonmaersk Жыл бұрын
@@seanmackenziedataengineering Awesome, thank you!
@billdowler
@billdowler 2 жыл бұрын
Great video Sean. Is there somewhere where we can download the script file?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Try this: billzone.com/ep_146_vbscript_deploy.zip Have fun!
@anhtung1364
@anhtung1364 Жыл бұрын
Can i dowload a .accde file from ggdrive or one drive…. By use vbs file? Thanks you so much!
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
I'm pretty sure you can! I have not done it - perhaps a future episode. These guys tried with VBA: stackoverflow.com/questions/66147047/download-google-drive-file-from-excel-sheet-using-vba
@anhtung1364
@anhtung1364 Жыл бұрын
@@seanmackenziedataengineering Thanks you
@ODOLTechAdvisor
@ODOLTechAdvisor Жыл бұрын
I don't know if you check these comments still but I appear to be having an issue getting this work when the folder doesn't already exist. I will always get a "Path not found" error on the line that is trying to create the folder in the first place. In the DoFullDeploy Sub, on the line of If blnFolderExists = False Then objFso.CreateFolder strDeployFolder. Did something get left out of the code? I've looked up other "Create Folder" code snippits and tried to use those in place of this, but they all come back with the same error of "Path not found". I know it's not found, it hasn't been created yet, that's what we are trying to do on this very line.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Interesting - it is possible that blnFolderExists is false because it could not find the folder. But it is ALSO possible that the rest of your folder path is not valid (maybe a typo). Also, are there any spaces in your path? In that case you'll need to put some quotes around the path. ie. strDeployFolder = Chr(34) & "C:\dev\my folder with some spaces" & Chr(34)
@vastoholic2
@vastoholic2 Жыл бұрын
@@seanmackenziedataengineering It believe the answer is none of the above. My agency is controlled by another IT department and I don't believe we have the proper permissions to execute this directly into main C: drive folder. My permissions under C: show only Read & Execute, List folder contents, and Read. I think this is what is stopping the script from creating the folder. If I manually create the folder Dev under C: it will execute properly and create other subfolders under that. This throws a kink in my plans, lol. I was hoping to pass out this script alone to all my users. I may try to incorporate a way for the script to get the usernames so it will automatically create folders under their C:\Users\"USERNAME" folder. They should all have read/write permissions in there at least.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
@@vastoholic2 I see! That makes sense. If you need it, you can use the first method from this video to get the username in vbScript: kzfaq.info/get/bejne/q5-EhdioybqYZok.html Just remove "As String" from variable declarations since vbScript uses only Variant declarations (no types). Good luck!
@vastoholic2
@vastoholic2 Жыл бұрын
@@seanmackenziedataengineering Thanks. I realized it probably looks weird, but I made the original comment on my work account.
@RockasKane
@RockasKane Жыл бұрын
And yet, another question. I managed to set a custom Icon to the desktop shortcut through the vbs inserting the code to copy the ico file to the deploy folder as the db file and then I added objShortCut.IconLocation = strDeployFolder & "\MyApp.ico" ... so far so good. But now I want to add /runtime in the end of the shortcut target but even if i type "/" my shortcut always gets a "\" so I have a resilt with untime and ofc this won't run. Any clues on how can I add the "/runtime"? Thank you so much for your time.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
I don't think I've run into that one before! Are you able to set the target of the shortcut programmatically as well? ie. objShortCut.Target = .. To do it with double quotes, you may have to do something like: strTarget = Chr(34) & "C:\whatever\my file.accdb" & Chr(34) & " /runtime" objShortCut.Target = strTarget No idea if .Target is available, it could have another name / you may have to research it.
@RockasKane
@RockasKane Жыл бұрын
@@seanmackenziedataengineering No luck.... I get an error "error: Invalid procedure call or argument" "code: 800A0005" "Source: Microsoft VBScript runtime error Anyway... I managed to get what i want just pointing the shortcut to my vbs file and launch the db from it. I also changed the version check routine to get the date from a txt file... in my case it is alot faster. That txt file is created with the database everytime I change the Application Title. If you, for some reason, you want to check my changes, I can send you the code, no problem. I know I am repeating myself alot, but you can't imagine how much I am learning from you. THANKS!!!
@lorenzogaruglieri7046
@lorenzogaruglieri7046 Жыл бұрын
hi Sean. Question: is it possible, via vbscript, to open a database with a password (obviously I know it) then remove the password, make a backup of the file with compaction (I have the code ready and I know that it is not possible to compact a file with a password with VBS ) and then reset the password? Then I would perform the following steps: 1- open the db and remove the password 2.backup with compaction 3- reset the password What do you think? I need to know point 1 and 3 Thank you Lorenzo
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Hey Lorenzo, I think that is possible. In step 1 you can create an Access reference, ie something like: Set acc = WScript.CreateObject("Access.Application") acc.OpenCurrentDatabase(myDBName, False, "myPassword") Set db = acc.CurrentDB() 'Do some stuff to backup acc.Quit I'm not sure about resetting the password. Great topic for a video! Needs a little research.
@RockasKane
@RockasKane Жыл бұрын
Hi again Sean. It's me buggin' again 🙂 One question... wouldn't it be easier to write this code in am Access Module so it gets easier to detect errors and then copy paste it to a text file? I think it's possible but is it advisable? Thanks again for your great work 👍
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Actually, that's a great idea! I have done this a few times myself over the years. You just have to resist the temptation to give variables their types before copying over to .vbs 😁
@RockasKane
@RockasKane Жыл бұрын
@@seanmackenziedataengineering Thank you 🙂
How to Use vbScript to Relink Your User's MS Access Application Front-End Automatically
16:55
Sean MacKenzie Data Engineering
Рет қаралды 2,2 М.
How to Use Class Modules in Microsoft Access
26:35
Sean MacKenzie Data Engineering
Рет қаралды 845
wow so cute 🥰
00:20
dednahype
Рет қаралды 26 МЛН
👨‍🔧📐
00:43
Kan Andrey
Рет қаралды 11 МЛН
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 44 МЛН
10 Mistakes that a Microsoft 365 Admin Must NEVER Make!
33:06
Andy Malone MVP
Рет қаралды 38 М.
The Clever Way to Count Tanks - Numberphile
16:45
Numberphile
Рет қаралды 1 МЛН
How to Use vbScript to Open and Work with Data in Access accdb Files - Late Binding Example
12:12
What Backup Software Should I Use?
10:12
Ask Leo!
Рет қаралды 16 М.
Use One Function to Handle Many Form Events in MS Access
10:49
Sean MacKenzie Data Engineering
Рет қаралды 1,2 М.
Automated Export of Data from Microsoft Access to Excel with Just One Click
20:47
Computer Learning Zone
Рет қаралды 15 М.
Web Scraping Made EASY With Power Automate Desktop - For FREE & ZERO Coding
13:11