Question about Computers & Internet

1 Answer

The fallowing script says VBScript runtime error: Path not found if the directory dose not exsists. However the point of the script is to check if the directory exists and if not create it. Option Explicit Dim LocalDir Dim ServerDir Dim LocalDisk Dim oShell Dim strUserName Dim strHomeDrive Dim objNetwork Dim objFSO REM Set objNetwork = WScript.CreateObject("WScript.Network") REM strUserName = objNetwork.UserName Set oShell = CreateObject("WScript.Shell") strUserName = oShell.ExpandEnvironmentStrings("%USERNAME%") strHomeDrive = oShell.ExpandEnvironmentStrings("%HOMEDRIVE%") LocalDir = strHomeDrive&"\E810\PD810\Export" ServerDir = "\\epcdhe.com\public\profiles\"&(strUserName)&"\E810\PD810\Export" Set objFSO = CreateObject("Scripting.FileSystemObject") If Not objFSO.FolderExists(LocalDir) Then objFSO.CreateFolder(LocalDir) End If If Not objFSO.FolderExists(ServerDir) Then objFSO.CreateFolder(ServerDir) End If

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    Hot-Shot:

    An expert who has answered 20 questions.

    Corporal:

    An expert that hasĀ over 10 points.

    Mayor:

    An expert whose answer gotĀ voted for 2 times.

  • Expert
  • 107 Answers

Hello,
I have the solution.
You must create each subfolder in every folder.

Check this script that is working and you must just to adjust for your needs:

Option Explicit
Dim LocalDir
Dim ServerDir
Dim LocalDisk
Dim oShell
Dim strUserName
Dim strHomeDrive
Dim objNetwork
Dim objFSO
Set objNetwork = WScript.CreateObject("WScript.Network")
strUserName = objNetwork.UserName
Set oShell = CreateObject("WScript.Shell")
strUserName = oShell.ExpandEnvironmentStrings("%USERNAME%")
strHomeDrive = oShell.ExpandEnvironmentStrings("%HOMEDRIVE%")
LocalDir = strHomeDrive&"\E810\PD810\Export"
REM msgbox(strUserName)
REM msgbox(strHomeDrive)
REM msgbox(LocalDir)
ServerDir = "\\epcdhe.com\public\profiles\"&(strUserName)&"\E810\PD810\Export"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(LocalDir)=false Then
objFSO.CreateFolder(strHomeDrive&"\E810")
objFSO.CreateFolder(strHomeDrive&"\E810\PD810")
objFSO.CreateFolder(strHomeDrive&"\E810\PD810\Export")
End If
If objFSO.FolderExists(ServerDir)=false Then
objFSO.CreateFolder("\\epcdhe.com\public\profiles\"&(strUserName)&"\E810")
objFSO.CreateFolder("\\epcdhe.com\public\profiles\"&(strUserName)&"\E810\PD810")
objFSO.CreateFolder("\\epcdhe.com\public\profiles\"&(strUserName)&"\E810\PD810\Export")
End If

Posted on May 27, 2010

  • Ciprian Ciolacu May 27, 2010

    If you need more help my e-mail is: ciprian.ciolacu@gmail.com

×

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Cant download skype, problem with toolbar, error 2738


Take a look in Event Viewer I looked in Event Viewer to find out what MSI-file that generated the error message and found:
Log Name: Application
Source: MsiInstaller
Date: 23.09.2010 21:58:26
Event ID: 1040
... ...
Description:
Beginning a Windows Installer transaction: C:\ProgramData\Skype\{D103C4BA-F905-437A-8049-DB24763BBE36}\SkypeToolbars.msi. Client Process Id: 6564.
2. Running MSIEXEC with logging options I started a "Command Promt" and used the command: "cd C:\ProgramData\Skype\{D103C4BA-F905-437A-8049-DB24763BBE36}" to navigate into the folder containing the MSI-file.
Now using the command: "msiexec /i SkypeToolbars.msi /lv log.txt" (msiexec options: /i = Install, /lv = Log + Verbose output).
After clicking away the error message I just wrote "log.txt" in my "Command Promt" to open the log-file. Near the bottom of the log-file I found this line:
DEBUG: Error 2738: Could not access VBScript runtime for custom action
3. DEBUG: Error 2738 After a quick search at Google I found out this error indicates that the VBScript engine is not registered on the computer.

The solution for a Windows Vista or Windows 7 32bit:
- Click Start -> All Programs -> Accessories
- Right click "Command Promt" and click on "Run as administrator"
- Write "cd %windir%\system32" and hit Enter
- Write "regsvr32.exe vbscript.dll" and hit Enter
- You should now get a message that says: "DllRegisterServer in vbscript.dll succeeded."
- Click "OK"
The solution for a Windows Vista or Windows 7 64bit:
- Click Start -> All Programs -> Accessories
- Right click "Command Promt" and click on "Run as administrator"
- Write "cd %windir%\syswow64" and hit Enter
- Write "regsvr32.exe vbscript.dll" and hit Enter
- You should now get a message that says: "DllRegisterServer in vbscript.dll succeeded."
- Click "OK"
4. Try again... Now I tried once more to run "msiexec /i SkypeToolbars.msi /lv log.txt" (I kept the /lv log.txt option to look for changes if the installer would fail again).
If you still get the same Error than continue to step 5.
5. Cleanup registry first, then re-reg My installation still gave me the same error, so after some more searching and reading on Google I found a solution that explained what I tried before (with the regsvr32.exe) and also an alternative step if that one should fail. The alternative step was to remove the Registry Key pointing to vbscript.dll.
The alternative solution for a Windows Vista or Windows 7 32bit is then:
- Click Start -> All Programs -> Accessories
- Right click "Command Promt" and click on "Run as administrator"
- Write "reg delete "HKCU\SOFTWARE\Classes\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" /f" and hit Enter
- Write "cd %windir%\system32" and hit Enter
- Write "regsvr32.exe vbscript.dll" and hit Enter
- You should now get a message that says: "DllRegisterServer in vbscript.dll succeeded."
- Click "OK"
The alternative solution for a Windows Vista or Windows 7 64bit:
- Click Start -> All Programs -> Accessories
- Right click "Command Promt" and click on "Run as administrator"
- Write "reg delete "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" /f" and hit Enter
- Write "cd %windir%\ syswow64" and hit Enter
- Write "regsvr32.exe vbscript.dll" and hit Enter
- You should now get a message that says: "DllRegisterServer in vbscript.dll succeeded."
- Click "OK"
Now using the command "msiexec /i SkypeToolbars.msi /lv log.txt" the installer started perfectly, ran all the way thru and Finished.
Conclusion This message indicates that VBScript engine is not currently registered on the Computer running the installer.
Vbscript.dll must get registered to solve the problem.

Ref: http://community.spiceworks.com/how_to/show/1577

Apr 25, 2011 | Computers & Internet

1 Answer

When downloading Skype beta for Windows error code 2738 appears.


Hello. I think this is caused by a vbscript runtime error. If you're on windows vista, run command prompt with administrator privileges(right click on the command prompt icon then click run as administrator) to get to C:\windows\system32. Type the following on prompt: regsvr32.exe vbscript.dll You should get a popup saying DllRegisterServer in vbscript succeeded. If you do then try to download and install again.

Sep 22, 2010 | Computers & Internet

4 Answers

I get the fallowing error message with my script below any thoughts or ideas? C:\Documents and Settings\karmstrong\Desktop\JDE Backup>cscript JDEBackup.vbs Microsoft (R) Windows Script Host Version...


This problem is caused when a Site Server Web is mapped to a Membership Server, the HTML Administrator pages run in the context of the proxy account for the Membership instance. Normally, this account will be MemProxyUserX (where X is a number). The user logged on to the Administrator pages at this point is likely to be the Site Server Administrator. In this case, the Administrator's privileges are dynamically added to the MemProxyUserX account. Unfortunately, the Site Server Administrator does not have the necessary privileges to call BeginTransaction method of the "SiteServer.ContentIndex.1" object.
To solve this problem, follow the instructions below:
1. Add the Site Server Administrator to the Windows NT Server Administrator group and verify that Anonymous and Automatic Cookie Authentication are not enabled on the SiteServer\Admin virtual Directory. To do this, perform the following steps:
2. Open the properties for the Site Server Administrator (in the members container) in the MMC. Be sure to log on to the MMC with the Administrator account.
3. Click the Groups tab, and then click Add.
4. In the Show names from drop-down list, select ou=NTGroups.
5. On the Available item tab, you will find the Administrator group (not Site Server Administrator).
6. Add the Site Server Administrator to the Windows NT Administrator group.
7. Expand the virtual directories for the Web Site where the Web Based Administration is being performed.
8. Expand the Site Server virtual directory.
9. Open the properties for the Admin directory.
10. On the Membership Authentication tab, make sure that the Anonymous Authentication check box is clear, and that you do not use Automatic Cookie Authentication.

Good luck.

May 26, 2010 | Computers & Internet

1 Answer

Fix error 2738


This error usually appears on a system during some installations because Visual Basic Script (VBScript) is not installed or has been disabled. Make sure VBScript is installed, turn off script blocking in anti-virus and personal firewall software, reregister VBScript, and then run the installation again.

Mar 31, 2010 | Skype IM

1 Answer

Everytime i open iternet windows script host appear with the following data: Line 24, Character 1, Error permission denied, Code: 800A0046, Source:Microsoft VBScript runtime error. Please help me to solve...


It is a Windows Internet Explorer bug that could be fixed by upgrading your IE to version 8. Also, check your "home page"found at Tool => Internet Options and set it to some legitimate website. The error message simply means that the page you are viewing has scripts that return an error.

Feb 02, 2010 | Computers & Internet

3 Answers

I am trying to install QuickBooks Pro 2007 on a new computer that has Windows Vista Business with SP1, and I had updated Windows, then installed QB but when I imported the company file, QB gave me a...


Why is this happening This issue can occur as a result of uninstalling the Google Desktop installed by Quickbooks on a computer running Microsoft Windows Vista. Launching QuickBooks after uninstalling Google will cause the error message.




Note: This issue is also known to occur with computers that have been upgraded from Windows XP to Windows Vista, where Google Desktop was uninstalled under Windows XP. Both cases would yield the same error message.
How to fix the problem This issue was resolved in the latest release for your version of QuickBooks.
Detailed Instructions Please update your program to the most current release.

just click on that link above then click on the 909ffb0.jpg(update) image on that page.




Oct 27, 2009 | Intuit QuickBooks Pro 2007 Full Version...

1 Answer

Can't get itunes to work


The error message “The folder iTunes cannot be found or created”. It was referring to the My Music directory that is usually located in the My Documents folder on the partition containing the operating system. The iTunes software creates an iTunes folder in the My Music directory on first start and if that directory is not accessible it will throw the error message and fail to load.
Since this error is related to the My Music folder it is important to check the directory path of that folder in the Windows Registry. This is best done by using the shortcut [Windows R], typing [regedit] and hitting the [enter] key.
The fastest way of location the two locations that contain path information for the My Music folder is to use the search by pressing [F3] and entering [My Music] in the search box. A click on [Find Next] will start the search and reveal the two locations.
The test computer system did not have path information listed at all. This can be changed by double-clicking the My Music key in the Registry and changing the path to an valid path manually.
The two Registry locations that list the My Music path are the following two:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Make sure both point to a valid path on the system. Once the path has been changed iTunes will create the iTunes folder in that location and start up without this error message.

Please back up your registry before doing this. messing in the registry can make your computer stop functioning.

Make sure you follow the correct registry entry.

Apr 26, 2009 | Apple iTunes

1 Answer

VBScript compilation error ''800a0408''


The Symptoms you get The script does not execute as you had hoped. Instead you get a WSH message box.
The Cause of error 800A0408 Your VBScript contains an illegal character, often at the beginning of a line. It can happen if you copy the script from word, then paste into notepad. For example, to 'Rem out a line we need the apostrophe, which is ASCII character 39; however if you paste from word you may get ASCII 96 (Grave accent).
Note the clue Source: Microsoft VBScript compilation error, this means a syntax error in your script.
The Solutions Check the punctuation marks in your VBScript, particularly look out for apostrophes and commas that do not display correctly. The reference to Line: 1 Char 1, means that the very first symbol that is probably wrong.

Mar 13, 2009 | Microsoft Computers & Internet

2 Answers

PHP Trouble


$path="yourdirectory";
$dh = opendir($path);
while ($temp = readdir($dh)) {
if ($temp!='.' && $temp!='..' && $temp!='.htaccess') chmod($temp,777); }

Aug 04, 2008 | The PHP Group PHP

2 Answers

Error Message 2738 ipod shuffle install


Symptoms In some instances, the iTunes and QuickTime Installers may unexpectedly quit during the "Preparing to Install" stage of the installation with the following message:
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2738. In some cases, the error message may read
"iTunes could not be installed because Visual Basic Script (VBScript) is not installed or has been disabled. Make sure VBScript is installed, turn off script blocking in anti-virus and personal firewall software, reregister VBScript, and then install iTunes." Products Affected iTunes 7 for Windows, QuickTime 7 (Windows), Microsoft Windows 2000, Windows XP, Windows Vista
Resolution Windows XP or Windows Vista
Download and install iTunes 7.6 or later.

Dec 26, 2007 | Apple iPod shuffle Second Gen. Silver (1...

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

153 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...