The remote procedure call failed and did not execute : Explorer won’t load

email me

Try the following steps :

Type Services into the start menu search box.

In Services, scroll down to “Remote Procedure Call” and make sure the status says “Started”

and set to Automatic.

The second “RPC Locator” should be set to “Manual”.

Now, if that doesn’t work:

Try sfc /scannow from an admin prompt

Finally, if those two fail, try copying the files and folder from another computer:

Copy these folders into the failed machine’s c:\Windows folder

ccmcache
ccmcache

Note, you will probably have to copy the folders using the admin share (or WinPE), such as \\Non-workingMachine\C$\Windows, from the working computer

If everything fails, perform a repair using the W7 Setup DVD

  1. Put the disc in your optical drive and restart to boot from the DVD. You may have to change the boot settings in your BIOS if booting from a CD/DVD is not enabled. Watch for the  “Press any key to boot from CD or DVD” message.
  2. On the “Install Windows” screen, make the appropriate selections for language, time, and keyboard, and then click “Next”.
  3. On the next screen, click “Repair Your Computer”. Do not click “Install now”
  4. In “System Recovery Options”, select which operating system you want to restore if any are listed. It will be blank in many systems with only one operating system.
  5. Click “Next”.
  6. The “System Recovery Options” screen shown below will open.
  7. Select “Startup Repair” or whichever option you wish to apply.

Forum reference:

http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_update/the-remote-procedure-call-failed-and-did-not/445c3192-466e-476f-a552-535da05f086c

Disable Right-click in HTAs or Web Pages

email me

Disabling right-click on your webpage or in your HTA forms and splash screens

You should insert the following code in the head of your HTML document, between the <HEAD></HEAD> tags.

<SCRIPT LANGUAGE="JavaScript">  
<!-- Disable  
function disableselect(e){  
return false  
}  

function reEnable(){  
return true  
}  

//if IE4+  
document.onselectstart=new Function ("return false")  
document.oncontextmenu=new Function ("return false")  
//if NS6  
if (window.sidebar){  
document.onmousedown=disableselect  
document.onclick=reEnable  
}  
//-->  
</script>

LANDesk Inventory

Scanning custom information

The Windows inventory scanner utility automatically scans the device’s registry for custom information. When you configure a device, the following keys are installed into the registry:

  • HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDESK\INVENTORY\CUSTOM FIELDS

The inventory scanner always scans the registry for the Custom Fields key and picks up any information it finds under that key. It then enters the custom information into Custom fields in the core database. The information in the Custom Fields keys can be whatever you need it to be. When you view this data in the console, it displays under Custom fields.

The inventory scanner reads two data types:

  • REG_SZ
  • REG_DWORD

NOTE: Custom field subkeys
The inventory scanner doesn’t scan for any subkeys below Custom fields.

NOTE: Custom fields string length
ASCII character strings must be no longer than 255 characters. Multi-byte character set (MBCS) strings must be between 127 and 255 characters.

Specifying the software scanning interval and history

You can specify when to scan a device’s software and how long to save the inventory changes history log on the core server. These intervals apply to every device.

NOTE: A device’s hardware is scanned every time it boots and is connected to the network.

To specify the software scanning settings
  1. In the console’s network view, click Configure > Services > Inventory > Software.
  2. Specify the frequency of software scanning.
  3. Specify the number of days to save the history.

NOTE: The core server and software scanning
This feature affects only devices. It doesn’t affect the core server, which is always scanned daily.

Scanner command-line parameters

You can add command-line parameters to the inventory scanner’s (ldiscn32.exe) shortcut properties to control how it functions.

The following table lists the scanner’s command-line parameters:

Option Description

/NTT=IP

Core server’s IP address or DNS name and UDP port. For example, /NTT=123.123.123.123:5007 or /NTT=CORESERVER:5007.

/UDP

Scanner communicates via UDP instead of TCP. Combine this switch with /NTT=[IP].

/NOUI

Forces the scanner to run with no user interface.

/i=inifile

Provides the path (HTTP, UNC), or a drive letter to the master LdAppl3 file. ldiscn32.exe also copies the LdAppl3 file found in this location to the device’s localLdAppl3.ini file. The scanners compare the date of the master LdAppl3 with the local LdAppl3.ini; if the dates don’t match, the master file is copied locally.

/d=directory

Starts the software scan in the specified directory. By default, the scan starts in the root directory of each local hard drive.

/L

Sends the scan to the core server the device was configured from. When you use /L, the /NTT parameter isn’t necessary.

/sync

Forces a full scan, including a complete software scan. Full scan files can be several megabytes in size.

/n

Doesn’t search subdirectories.

/v

Verbose mode.

/Z=retry count

Specifies how many times the scanner will try to resend the scan.

/W=wait in seconds

Have the scanner wait the number of seconds specified before starting a scan.

/? or /h

Displays the command-line syntax help.

/s=servername

Specifies the core server to store the inventory data on.

/f or /f-

Forces a software scan regardless of the software scan interval set at the console. Specify /f- to disable a software scan regardless of the software scan interval set at the console.

/t=[path]filename

Copies the contents of the specified file to the core database. Use this option to enter inventory data from standalone devices or from separate inventory files.

/o=[path]filename

Writes inventory data to the specified output file.

/m

Creates a non-unicode ldiscan.mif file in the C:/DMI/DOS/MIFS directory. This file contains the inventory data discovered during the scan.

/muni

(ldiscn32.exe only) Creates a unicode ldiscan.mif file in the directory found in LdAppl3.ini file’s MIFPATH. This file contains the inventory data discovered during the scan.

/do16

Enables the 16-bit inventory scanner (inv16.exe) on managed devices.

Editing the LdAppl3.Template file

Information about the scanner’s inventory parameters is contained in the LdAppl3.Template file. This template file works with the LdAppl3 file to identify a device’s software inventory.

You can edit the template file’s [LANDesk Inventory] section to configure the parameters that determine how the scanner identifies software inventory. By default, LdAppl3.Template is located in this directory on the core server:

  • \Program Files\LANDesk\ManagementSuite\LDLogon

Use this table to help you edit the [LANDesk Inventory] section in a text editor.

Option Description

Mode

Determines how the scanner scans for software on devices. The default is Listed. Here are the settings:

  • Listed: Records the files listed in LdAppl3.

  • Unlisted: Records the names and dates of all files that have the extensions listed on the ScanExtensions line but that are not defined in the LdAppl3. This mode helps discover unauthorized software on the network.

  • All: Discovers files with extensions listed on the ScanExtensions line.

Duplicate

Records multiple instances of files. Set the value to OFF to record only the first instance, or ON to record all detected instances. The default is ON.

ScanExtensions

Sets the file extensions (.exe, .com, .cfg, etc.) that will be scanned. Use a space to separate the file extensions. By default, only .exe files are scanned.

Version

Is the version number of the LdAppl3 file.

Revision

Is the revision number of the LdAppl3 file; helps ensure future compatibility.

CfgFiles 1-4

Records the date, time, file size, and contents of the specified files. You can leave out the drive letter (for example, c:) if you want to search all local drives. You can specify more than one file on each of the four lines, but the line length is limited to 80 characters.

Separate path names on the same line by a space.

The scanner compares the date and size of the current file with that of the previous scan. If the date and size don’t match, the scan records the contents of the file as a new revision.

ExcludeDir 1-3

Excludes specific directories from a scan. You can leave out the drive letter (for example, c:) if you want to exclude all local drives. Enumeration must start at 1 and be continuous. You can use environment variables in this format: “%varname%”. You can use a wildcard (*) in a “begins with” form only ( ExcludeDir=%windir%\$NtUninstall*\ ). You must end each line with “\”.

MifPath

Specifies where MIF files are stored on a device’s local drive. The default location is c:\DMI\DOS\MIFS.

UseDefaultVersion

If set to TRUE, the scanner reports a match when a file matches an exact filename and file size entry in LdAppl3 on filename only (the version will be reported as EXISTS). This can cause some false positives for applications that share a common filename with an unknown application. In the as-delivered LdAppl3.Template file, this parameter is set FALSE; that is, only add an entry if the match is exact. If the parameter is missing, it defaults to TRUE.

SendExtraFileData

If set to TRUE, sends extra file data to the core server. The default is FALSE. This means that by default, only path, name, and version are entered into the core database.

Making inventory scan changes available to clients

When you make changes to the LdAppl3.template file, you need to deploy the changes to managed devices in order to change the way inventory scans run. The changes will be applied if the /i scanner command line parameter is used on your managed devices.

To edit the LdAppl3.Template file
  1. From your core server, go to the LDLogon directory and open LdAppl3.Template in Notepad or another text editor.
  2. Scroll down to the parameter you want to update and make your changes.
  3. Save the file.
To deploy scanning changes to managed devices
  1. Edit and save the LdAppl3.Template file.
  2. In the console, click Tools > Reporting/Monitoring > Manage Software List.
  3. Click the Make Available to Clients toolbar button to make the most recent changes available to devices the next time they run an inventory scan.

Adding BIOS text strings to the core database

There is a section in the LdAppl3.Template file called [BIOS Info]. This section provides the capability to search for information inside the BIOS of a computer. You can add one or more entries to the [BIOS Info] section. These entries define new keys in the core database and provide parsing instructions to the inventory scanner. The parsing instructions identify where to look in the LDBIOS.TXT file for a specific string. Using these instructions, the inventory scanner populates the core database with the strings from the LDBIOS.TXT file.

The inventory scanner uses a parsing method to locate BIOS information. This allows you to search for information one or more lines away from a specified text string. Such a search would enable you to locate random letter and number combinations assigned to computer hardware.

Text strings in LDBIOS.TXT

If you run the inventory scanner with the /do16 command line parameter, during an inventory scan, the text strings available in the BIOS are exported to a text file called LDBIOS.TXT. LDBIOS.TXT stores all of the strings that are created by the scanner. If you want to store this information in the database, you can store it as a configuration file by using the CFGFILES parameter in Ldappl3.ini.

Sample of BIOS entries in the LdAppl3.Template file

Here is an example from the [BIOS Info] section in the Ldappl3.Template file:

[BIOS Info]

StringLength=4

Key = BIOS – Manufacturer

Parameters = AllValues,FirstInstance

Value = AMI|American Megatrends::AMI::BIOS – AMI

Value = Copyright.*Dell::Dell::BIOS – Dell

[BIOS – AMI]

Key = % – Version

Parameters = FirstValue,FirstInstance

Value = BIOS Version \(.*\)::\1

Key = % – Copyright Notice

Parameters = AllValues,AllInstances

Value = ©.*\(AMI|American Megatrends\)

[BIOS – Dell]

Key = % – Version

Parameters = FirstValue,FirstInstance

Value = BIOS Version \(A.+\)::\1

Value = BIOS Version: \(A.+\)::\1

Key = % – Copyright Notice

Parameters = AllValues,AllInstances

Value = ©.*Dell|[Cc]opyright.*Dell

Understanding BIOS entries

Entries in the [BIOS Info] section consist of the following:

  • [Section name] Identifies a new component in the core database.
  • StringLength= Specifies the minimum length of the strings to search for.
  • Key= Identifies the class and attribute name of the information returned from searching the LDBIOS.TXT file.
  • Parameters= Specifies the search criteria that tells the scanner where and how to search for values associated with a specific key.
  • Value= Specifies the value that is searched for in the BIOS. A value has three main sections, each separated by two colons (::). The strings identified in the value entry are case-sensitive. All characters in the value, even spaces, are included in the search unless they are an operator.

Deploying Junos Pulse Client

email me

Deploying the Junos Pulse Client poses one major problem, if you don’t have some kind of endpoint server, there is no way to bundle configuration settings. For example, with an endpoint it works like this:

msiexec -i JunosPulse.x86.msi CONFIGFILE=”PathToConfig\myconfiguration.jnprpreconfig” ADDLOCAL=PulseSA /q

Of course, that doesn’t help us if we don’t have a centralized setup. The best I could figure out is wrapping up the 32 and 64 bit MSIs into one package, deploying them, and having the user enter the URL to the server; it’s not great…and I expect more from Juniper. See my working script at the bottom.


Things I did try (that did not work):

(1) Performing a snapshot of the install…capturing the settings.
(2) Modifying the MSI
(3) Creating a MST
(4) Creating my own config file
(5) Using MSI options


Sample Config File (the unique info is in bold)

schema version {

version: “1”
}
machine settings {
    version: “5”
    guid: “test12345678910-test1234-1234test-1234-12345678910
    connection-source: “preconfig”
    server-id: “12345678910-1234-1234-1234f-12345678910”
    allow-save: “true”
    user-connection: “true”
    splashscreen-display: “false”
    dynamic-trust: “true”
    dynamic-connection: “true”
    wireless-suppression: “false”
}
ive “test12341324-1234-1234-1234-12345678910” {
    friendly-name: “SA auto connect”
    version: “3”
    guid: “test12345-1234-1234-1234-12345678910
    server-id: “test12345678910-test1234-1234test-1234-12345678910”
    connection-source: “preconfig”
    uri: “vpn.ourcompany.com”
    connection-policy-override: “true”
    use-for-secure-meetings: “false”
    use-for-connect: “true”
    connection-identity: “user-at-credprov”
    connection-policy: “automatic”
    preferred-realm: “OurCompany”
    preferred-roleset: “OurCompany_Computer_Windows_autoconnect”
    sso-max-delay: “120”
    sso-user-based-virtual-lan: “false”
}


Other important information


Sample Output

When you use ADDLOCAL, you should append msiexec options /qn or /qb to the command line to suppress the installation program user interface. These examples use /qb.

To install PulseUAC with 802.1x and Enhanced Endpoint Security support on a Windows 32-bit endpoint using a configuration file, use the following command line:

msiexec -i JunosPulse.x86.msi CONFIGFILE=c:\pulse\Pulse-Connection-no.jnprpreconfig ADDLOCAL=PulseUAC,Pulse8021x,UACEndpointDefense /qb
To install PulseSA on a 32-bit Windows endpoint using a configuration file, use the following command line:

msiexec -i JunosPulse.x86.msi CONFIGFILE=c:\temp\myconfiguration.jnprpreconfig ADDLOCAL=PulseSA /qb
To install PulseSA with Enhanced Endpoint Security and Host Checker on a 64-bit Windows endpoint using a configuration file, use the following command line:

msiexec -i JunosPulse.x64.msi CONFIGFILE=c:\temp\myconfiguration.jnprpreconfig ADDLOCAL=PulseSA,SAEndpointDefense,SAHostChecker /qb
To install PulseAppAccel on a 64-bit Windows endpoint using a configuration file, use the following command line:

msiexec -i JunosPulse.x64.msi CONFIGFILE=c:\temp\myconfiguration.jnprpreconfig ADDLOCAL=PulseAppAccel /qb
To install all Pulse components on a 64-bit Windows endpoint using a configuration file, use the following command line:

msiexec -i JunosPulse.x64.msi CONFIGFILE=c:\temp\myconfiguration.jnprpreconfig /qb

 

Summary

Two users are trying to connect to the SA device and launch Junos Pulse. The first user’s Junos Pulse session is disconnected, when the second user connects to the same SA device (as the first user) and launches Junos Pulse.


Problem:

User A connects to the SA device via Junos Pulse.

User B connects to the same SA device via Junos Pulse and User A’s session is automatically ended.


Cause:

This issue is due to Disk Imaging-cloning.

The GUID on every client is the number that identifies the client to the server.

If the client and the connection GUIDs match, then the old session is terminated, as the server assumes that an existing client is creating a new session to a connection; to which it already has a connection.

The Client ID is the unique ID of the client and the channel ID is the unique ID of the connection.

Multiple clients can have the same connection ID; but multiple clients cannot have the same client ID.

Both the devices must have a unique GUID.


Solution:

The device must be cloned, prior to making the connection to IVE or the GUID must be deleted in the following section before cloning:

The Junos Pulse connection configuration, which is located at C:\Program Files (x86)\Common Files\Juniper Networks\ConnectionStore\connstore.dat, contains the following section:

machine
“local” {
    guid: “9e4898e81ca026623e7fb4c9f4de1f678244fa62”
    pulse-language: “en-US”
}

Remove the GUID.

 

Settings Location

C:\ProgramData\Pulse Secure\ConnectionStore


Older Settings Location

C:\Program Files\Common Files\Juniper Networks\connstore.dat
C:\Program Files (x86)\Common Files\Juniper Networks\connstore.dat


Uninstall and Save Settings

msiexec /x{BAFD722A-4B9A-4152-B565-5BAFDA00A6BE} SAVESETTINGS=1

 

 

My script

@Echo on

title Administrative Installation by Eddie Jackson
color 0a
set CurDir=%CD%

set UserN=DeploymentServer

EVENTCREATE /T INFORMATION /L Application /ID 777 /d “Junos Pulse Client 5.0.48695.0 installation STARTED by %UserN%:: 64BIT
if exist “C:\Program Files (x86)\” (
c:\windows\system32\msiexec.exe /i “%CurDir%\JunosPulse.x64.msi” /qn /norestart
EVENTCREATE /T INFORMATION /L Application /ID 777 /d “Junos Pulse Client 5.0.48695.0 64bit installation COMPLETED!”
goto :END
)

:: 32BIT
c:\windows\system32\msiexec.exe /i “%CurDir%\JunosPulse.x86.msi” /qn /norestart
EVENTCREATE /T INFORMATION /L Application /ID 777 /d “Junos Pulse Client 5.0.48695.0 32bit installation COMPLETED!”
goto :END

:END
%windir%\system32\REG.exe ADD “HKEY_LOCAL_MACHINE\SOFTWARE\DEPLOYEDSOFTWARE\Junos\Pulse\5.0.48695.0” /v InstallDate /d “%date% %time%” /t REG_SZ /f
%windir%\system32\REG.exe ADD “HKEY_LOCAL_MACHINE\SOFTWARE\DEPLOYEDSOFTWARE\Junos\Pulse\5.0.48695.0” /v InstalledBy /d “%UserN%” /t REG_SZ /f
exit /b 0

 


Notes

Also see: Pulse disconnecting users

Reset Password using WinPE – Sticky Key Method

email me

Boot to WinPE disc

At the console window (the black window)
Control-C
Select [Y] to break out
copy /y d:\windows\system32\sethc.exe d:\keep.exe (where d: is the Windows partition/drive)
copy /y d:\windows\system32\cmd.exe d:\windows\system32\sethc.exe
exit (computer will restart)
 
You may need to take ownership or change file attributes using the attrib command:
d:\windows\system32\attrib.exe d:\windows\system32\sethc.exe -r -h
 

Boot into Windows normally

After you see the logon screen, press the SHIFT key five times (a black window should appear)
type: net user USERNAME PW (the account name and password to reset)

copy /y c:\keep.exe c:\windows\system32\sethc.exe
exit

log in normally with new password

Return UTC with Parsing

email me

Set dateTime = CreateObject(“WbemScripting.SWbemDateTime”)
dateTime.SetVarDate (now())
UniversalDate = dateTime.GetVarDate (false)
a=Split(UniversalDate,” “,2)
for each myDate in a
exit for
next

msgbox “My Date: ” & (UniversalDate)

‘returns hour
strHour = DatePart(“h”, UniversalDate)

‘returns day in year
strDayInYear = DatePart(“y”, UniversalDate)

‘returns day in month 1-31
strDayInMonth = day(UniversalDate)

‘returns day in week 1-7
strWeekDay = Weekday(UniversalDate)
msgbox strHour
msgbox strDayInYear
msgbox strDayInMonth
msgbox strWeekDay

Convert Older Office Format to New Format

email me

I created a script that will convert office file formats from older to newer formats.

Script

‘SET PATH LOCATION
””””””””””””””””””””””””””””””””””””””””””
thePATH=”C:\myFilesPath”
””””””””””””””””””””””””””””””””””””””””””
””””””””””””””””””””””””””””””””””””””””””
‘Created by Eddie Jackson
‘Date: 11/3/2014
‘Used to convert office file formats
‘from older to newer formats in the
‘same folder
‘Usage: update files path above
‘run _RUNME.vbs
””””””””””””””””””””””””””””””””””””””””””

on error resume next
SET objShell = CreateObject(“WScript.Shell”)
SET FSO = CreateObject(“Scripting.FileSystemObject”)

CONST ForReading = 1
CONST ForWriting = 2

IF NOT (fso.FileExists(“C:\scripts\Office_Converter\FileFormatConverters.exe”)) THEN
Msgbox “Missing Files!”
Wscript.Quit(0)
END IF

IF NOT (fso.FileExists(“C:\scripts\Office_Converter\ofc.exe”)) THEN
Msgbox “Missing Files!”
Wscript.Quit(0)
END IF

IF NOT (fso.FileExists(“C:\scripts\Office_Converter\comptool.dll”)) THEN
Msgbox “Missing Files!”
Wscript.Quit(0)
END IF

IF NOT (fso.FileExists(“C:\scripts\Office_Converter\vet.exe”)) THEN
Msgbox “Missing Files!”
Wscript.Quit(0)
END IF

IF NOT (fso.FileExists(“C:\scripts\Office_Converter\template.ini”)) THEN
Msgbox “Missing Files!”
Wscript.Quit(0)
END IF

‘INSTALLS FILE CONVERTERS IF NEEDED
IF NOT (fso.FileExists(“C:\Program Files (x86)\Microsoft Office\Office12\excelcnv.exe”)) THEN
objShell.Run “C:\scripts\Office_Converter\FileFormatConverters.exe /quiet /norestart”,0,true
END IF

‘COPIES TEMPLATE INI FILE
objShell.Run “%comspec% /c copy /y C:\scripts\Office_Converter\template.ini C:\scripts\Office_Converter\ofc.ini”,0,true
SET objFile = FSO.OpenTextFile(“C:\scripts\Office_Converter\ofc.ini”, ForReading)

strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, “zzzzz“, thePATH)

‘UPDATES OFC.INI WITH FILES NAME
SET objFile = FSO.OpenTextFile(“C:\scripts\Office_Converter\ofc.ini”, ForWriting)
objFile.WriteLine strNewText
objFile.Close

‘RUNS CONVERTER – GENERATES XLSX FILES
objShell.Run “C:\scripts\Office_Converter\ofc.exe”,0,TRUE

‘REMOVES OLD XLS FILES

strExtensionsToDelete = “xls”
‘strExtensionsToDelete = “wav,avi,mp3″

RecursiveDeleteByExtension thePATH,strExtensionsToDelete

SUB RecursiveDeleteByExtension(byval strDirectory,strExtensionsToDelete)
DIM objFolder, objSubFolder, objFile
DIM strExt

SET objFolder = FSO.GetFolder(strDirectory)
FOR EACH objFile IN objFolder.Files
FOR EACH strExt IN SPLIT(UCASE(strExtensionsToDelete),”,”)
IF RIGHT(UCASE(objFile.Path),LEN(strExt)+1) = “.” & strExt THEN
‘wscript.echo “Deleting:” & objFile.Path
objFile.Delete
EXIT FOR
END IF
NEXT
NEXT
FOR EACH objSubFolder IN objFolder.SubFolders
RecursiveDeleteByExtension objSubFolder.Path,strExtensionsToDelete
NEXT
END SUB

 

 

The template.ini

;Please refer to the online documentation for more information.

[Run]
; LogDestinationPath: the path where the log files will be written to
LogDestinationPath=C:\scripts\Office_Converter\logs

; Description: this can be any text to describe extra information about the run
;Description= “Test run of the Office File Converter”

; FileListFolder: the folder containing the File List exported from the OMPM Reporting Tool
; (do not include if specifying FoldersToConvert)
;FileListFolder=dataexport\list1\

; TimeOut: a limit in seconds for the conversion of a single file. (default 300 seconds)
; If expired, the Office File Converter will cancel the conversion of the current file and move on to the next file.
; Conversion will never timeout if this value is set to 0.
; Set to a higher value if experiencing difficulties with larger files.
TimeOut = 300

[ConversionOptions]
; FullUpgradeOnOpen: if set to 1, Word documents will be fully converted to the OpenXML format
; if set to 0 (default), Word documents will be saved in the OpenXML format in compatibility mode
; Not applicable to Excel or PowerPoint files.
FullUpgradeOnOpen=1

; CABLogs: if set to 1 (default), XML log files will be compressed into CAB files
; if set to 0, XML log files will be written separately
CABLogs=1

; MacroControl: if set to 1, VBA projects will not be included in converted files
; if set to 0 (default), VBA projects will be maintained in the converted files
MacroControl=0

[FoldersToConvert]
; The Converter will attempt to convert all supported files in the specified folders
; (do not include if specifying FileListFolder)
;fldr=C:\Documents and Settings\Administrator\My Documents
fldr=zzzzz

[ConversionInfo]
; Use SourcePathTemplate and DestinationPathTemplate to specify the destination folder structure.

; SourcePathTemplate: a sequence of ‘*\’ that determines how many directories from the source path will be captured.
; DestinationPathTemplate: path where converted files will be saved, possibly including captured folder names from the SourcePathTemplate
; The converted file will be saved at: DestinationPathTemplate + Remaining uncaptured source path
;
; For example:
; Source files are contained in \\userfiles\[user name]\docs\
; Desired output is to \\newserver\docs\[user name]\
;
; The following settings would enable this example scenario:
; SourcePathTemplate = *\*\*\
; DestinationPathTemplate = \\newserver\*3\*2
; Explanation: The first three folder names are captured in order (“*X” designates which captured folder name to use):
; *1 = userfiles
; *2 = [user name]
; *3 = docs
; Here are some sample file source files and converted files for this example:
; \\userfiles\Bob\docs\Personal\Rept1.doc => \\newserver\docs\Bob\Personal\Rept1.docx
; \\userfiles\James\docs\New Folder\Schedule.doc => \\newserver\docs\James\New Folder\Schedule.docx
; \\userfiles\Cliff\docs\notes.doc => \\newserver\docs\Cliff\notes.docx
;
; Please refer to the online documentation for more information and examples.

SourcePathTemplate=*\*\*\*\*\
DestinationPathTemplate=*1\*2\*3\*4\*5

Return Time Zone

email me

strComputer = “.”

Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)
Set colItems = objWMIService.ExecQuery(“Select * From Win32_TimeZone”)

For Each objItem in colItems
Set colItems2 = objWMIService.ExecQuery(“Select * From Win32_ComputerSystem”)

For Each objItem2 in colItems2
blnDaylightInEffect = objItem2.DaylightInEffect
Next

If blnDaylightInEffect Then
Wscript.Echo objItem.DaylightName
Else
Wscript.Echo objItem.StandardName
End If
Next