Archive

Posts Tagged ‘x86’

Create a shortcut with script

13 August 2018 Leave a comment

I create a shortcut with a script, but why? Some applications do not know the cause, do not create a shortcut during installation or after installation. The following Script allows you to create shortcuts with the variables entered.

VBScript

The shortcut name, shortcut path, file name of the target application, shortcut icon, and system architecture are automatically selected.

Script

‘Script Started

‘Option Explicit

‘Create Shortcut

strComputer = “.”

On Error Resume Next

Dim objShell, objDesktop, objLink, strDesc,objItem ,colItems

Dim strAppPath, strWorkDir , WshShell

Set WshShell     = Wscript.CreateObject(“Wscript.Shell”)

Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)

Set colItems = objWMIService.ExecQuery(“Select * from Win32_ComputerSystem”,,48)

For Each objItem in colItems

If objItem.SystemType = “x64-based PC” Then

‘Variables

strWorkDir =”C:\”

strAppPath = “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”

strDesc=”Google Chrome”

‘——

Set objShell = CreateObject(“WScript.Shell”)

objDesktop=objShell.SpecialFolders(“Desktop”)

Set objLink = objShell.CreateShortcut(objDesktop & “\Google Chrome.lnk”)

objLink.Description = strDesc

objLink.TargetPath = strAppPath

objLink.WindowStyle = 3

objLink.WorkingDirectory = strWorkDir

objLink.IconLocation = “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”

objLink.Save

‘————————————-‘

‘ Add Registry key

else

‘Variables

strWorkDir =”C:\”

strAppPath = “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”

strDesc=”Google Chrome”

‘——

Set objShell = CreateObject(“WScript.Shell”)

objDesktop=objShell.SpecialFolders(“Desktop”)

Set objLink = objShell.CreateShortcut(objDesktop & “\Google Chrome.lnk”)

objLink.Description = strDesc

objLink.TargetPath = strAppPath

objLink.WindowStyle = 3

objLink.WorkingDirectory = strWorkDir

objLink.IconLocation = “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”

objLink.Save

end if

next

wscript.quit

‘Script Finished

Enjoy!

 

 

Advertisements

Access useful information from the SCCM’s DB #1

There were thousands of machines in the majority of the large companies I consulted and they wanted to follow these machines with SCCM. Reports that are available in the SCCM sometimes may not provide enough information. In such cases the solution comes with Microsoft SQL Management Studio. If you are a system administrator, you will find yourself writing SQL 🙂

Microsoft SQL Server Management Studio 17

I’m not sure if I can help you write SQL, but I have a lot of ready-made SQL that my customers like a lot. I plan to share these with you one by one. Most of my customers wanted a report like the one below. I have changed the report according to the wishes of the years and I share the final status with you.

Read more…

SCCM ‘de Clientlarda yüklü x64 ve x86 uygulamaların olduğu makinelerin Query ile Collectiona alınması

03 August 2012 Leave a comment

Windows 7 ‘nin çıkması, ev ve iş bilgisayarlarında 64 ve 32 bit ayrımı belirgin bir şekilde hayatımıza girmiş oldu. 64 bir uygulama eski 32 bit makineye kurulmaz veya uygulamayı güncellemek istediğinizde 64 ise 64, 32 ise 32 bit güncellemesini bulmanız gerekir. Sistem yöneticileri özellikle SCCM de bir uygulamanın yüklü olduğu bilgisayarları bir collection altına toplama ihtiyacı duyabilmektedir.

03-08-2012 12-15-18

Bu senaryomuzda 64 ve 32 bit uygulamayı ayrı iki collectiona alacağız. Böylece System yönetici, 64 uygulamanın sayısını görebilecek veya iki ayrı paket hazırlayarak uygulamayı güncelleme imkanını bulmuş olacak.

Read more…

Categories: SCCM Tags: , , , , , , , , , ,