Tech Community Live: Endpoint Manager edition
Jul 21 2022, 08:00 AM - 12:00 PM (PDT)
SOLVED

deploying tricky exe's

%3CLINGO-SUB%20id%3D%22lingo-sub-3029062%22%20slang%3D%22en-US%22%3Edeploying%20tricky%20exe's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3029062%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20this%20software%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.gaomon.net%2Fdownload%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.gaomon.net%2Fdownload%2F%3C%2FA%3E%26nbsp%3Bwhich%20I%20tried%20to%20convert%20into%20a%20msi%20via%20Advanced%20installer%20and%20no%20parameters%20I%20try%20works%2C%20I%20cant%20bypass%20the%20accept%20terms%20and%20other%20bits%20from%20the%20wizard.%20I%20have%20tried%20%2Fqn%2C%20%2Fquiet%20and%20%2Fs%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENothing%20seems%20to%20work.%20If%20I%20was%20going%20to%20deploy%20this%20via%20the%20win32%20method%20would%20this%20work%3F%20If%20so%20which%20sort%20of%20commands%20would%20I%20use%20as%20the%20website%20for%20this%20software%20doesnt%20show%20how%20to%20do%20this!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3029062%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Friday%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EConditional%20Access%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Application%20Management%20(MAM)%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Device%20Management%20(MDM)%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESoftware%20Management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3065190%22%20slang%3D%22en-US%22%3ERe%3A%20deploying%20tricky%20exe's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3065190%22%20slang%3D%22en-US%22%3EThe%20software%20and%20it's%20site%20(Multiple%20Google%20Drive%20download%20links%20for%20official%20software%3F!%3F)%20seems%20almost%20not%20real%2Fscam%2C%20but%20I%20downloaded%20the%20software%20in%20a%20Sandbox%20VM%20and%20installed%20it..%20Almost%20seems%20like%20you%20can%20install%20it%2C%20copy%20the%20Gaomon%20and%20Goamontablet%20directory%20from%20your%20Appdata%5CRoaming%20folder%20to%20another%20pc%20and%20you%20can%20start%20it%20without%20installing%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3073988%22%20slang%3D%22en-US%22%3ERe%3A%20deploying%20tricky%20exe's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3073988%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3ESomething%20like%20this%3F%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcall4cloud.nl%2F2021%2F08%2Fremote-app-the-last-whish%2F%23option3%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcall4cloud.nl%2F2021%2F08%2Fremote-app-the-last-whish%2F%23option3%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%20just%20wondering%20by%20what%20happens%20when%20you%20try%20to%20%22extract%22%20the%20exe%20file%20%3F%20with%20this%20parameters%3CBR%20%2F%3Eexefile%20%2Fs%20%2Fx%20%2Fb%22C%3A%5Ctemp%22%20%2Fv%22%2Fqn%22%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3074029%22%20slang%3D%22en-US%22%3ERe%3A%20deploying%20tricky%20exe's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3074029%22%20slang%3D%22en-US%22%3Ethat%20didn't%20work.%3CBR%20%2F%3E%3CBR%20%2F%3ERegarding%20the%20link%20you%20sent%20does%20the%20folder%20I%20fetch%20from%20a%20device%20which%20I%20manually%20installed%20it%20need%20to%20be%20put%20it%20in%20a%20location%20which%20im%20going%20to%20packaged%20as%20a%20intunewin%20and%20call%20the%20folder%20remoteapp.rdp%3F%3CBR%20%2F%3E%3CBR%20%2F%3Ealso%20Unsure%20what%20you%20mesn%20by%20When%20chrome%20is%20installed%20browse%20to%20your%20RDWeb%20page%3C%2FLINGO-BODY%3E
Super Contributor

Hi all,

 

I have this software https://www.gaomon.net/download/ which I tried to convert into a msi via Advanced installer and no parameters I try works, I cant bypass the accept terms and other bits from the wizard. I have tried /qn, /quiet and /s

 

Nothing seems to work. If I was going to deploy this via the win32 method would this work? If so which sort of commands would I use as the website for this software doesnt show how to do this!

 

Thanks in advance!

20 Replies
The software and it's site (Multiple Google Drive download links for official software?!?) seems almost not real/scam, but I downloaded the software in a Sandbox VM and installed it.. Almost seems like you can install it, copy the Gaomon and Goamontablet directory from your Appdata\Roaming folder to another pc and you can start it without installing?
Looks like a click to play/run installation indeed.. I have seen this weird software often... just install it one a (test)device, fetch that directory from the device. Now we need to create a win32app to deploy it to another device. Create a powershell script and place that folder in it. And within that powershell script just make sure you copy that folder to a program files directory, now convert that powershellscript (and folder) to a win32app and upload it to intune...
Detection rule --> the folder in the program files folder
Hi Rudy,

What would the script look like to copy a specific folder into program files? Also with it being a win32 app would we point to the script?
Hi,
Something like this?
https://call4cloud.nl/2021/08/remote-app-the-last-whish/#option3

Also just wondering by what happens when you try to "extract" the exe file ? with this parameters
exefile /s /x /b"C:\temp" /v"/qn"
that didn't work.

Regarding the link you sent does the folder I fetch from a device which I manually installed it need to be put it in a location which im going to packaged as a intunewin and call the folder remoteapp.rdp?

also Unsure what you mesn by When chrome is installed browse to your RDWeb page

Hi @Rudy_Ooms_MVP 

 

I have tried using this instead: 

 

Screenshot 2022-01-27 at 5.32.27 PM.png

 

Screenshot 2022-01-27 at 5.31.45 PM.png

Which works on a test machine if I run the install: 

 

What would I need to add to create a shortcut for the app? 

 

 

 

 

@AB21805 

 

Something like this?

 

# Create Shortcut to desktop
$TargetFile = "c:\installllocation\executablename.exe"
$Icon = "c:\installllocation\executablename.exe"
$ShortcutFile = "$env:Public\Desktop\applicationname.lnk"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $TargetFile
$Shortcut.Description = "Application Name"
$Shortcut.IconLocation = $Icon
$Shortcut.WindowStyle = 3
$Shortcut.Save()
Thank you! I’ll give this a go tomorrow and let you know !
The script harm sended, is indeed the way to go... its just Like I am using in this blog
https://call4cloud.nl/2022/01/updating-apps-a-new-era/

Hi @Harm_Veenstra

 

I have tried this: Install.PNG 

 

But getting this error: 

 

install 2.PNG

 

Any ideas? 

Not sure about the first error, you're trying to copy something that is in use? The second one is a permissions issue, if you create the shortcut in c:\users\public\desktop, you must run the script as system/administrator
Did you manage to solve this?
I will try this tomorrow but im sure I ran as admin. Regarding the script instead of pointing to the exe for a shortcut shouldnt I be pointing to a .ico file?
Shortcut icon can be from a .dll, .exe or .ico file. There's also a space between Gaemon and .lnk btw ;)
So I have got abit further I can make the shortcut with a separate script:
param (
[system.string]$ShortcutName = "GaomonTablet",
[system.string]$ShortcutUrl = "C:\GaomonTablet\GaomonTablet.exe",
[system.string]$IconURL = ".\GaomonTablet\GaomonTablet.ico",
[system.string]$Desktop = [Environment]::GetFolderPath("Desktop"),
[system.string]$IntuneProgramDir = "$env:APPDATA\Intune",
[System.String]$TempIcon = "$IntuneProgramDir\GaomonTablet.url",
[bool]$ShortcutOnDesktop = $True,
[bool]$ShortcutInStartMenu = $True
)

#Test if icon is currently present, if so delete it so we can update it
$IconPresent = Get-ChildItem -Path $Desktop | Where-Object {$_.Name -eq "$ShortcutName.lnk"}
If ($null -ne $IconPresent)
{
Remove-Item $IconPresent.VersionInfo.FileName -Force -Confirm:$False
}

$WScriptShell = New-Object -ComObject WScript.Shell

If ((Test-Path -Path $IntuneProgramDir) -eq $False)
{
New-Item -ItemType Directory $IntuneProgramDir -Force -Confirm:$False
}

#Start download of the icon in blob storage
Start-BitsTransfer -Source $IconURL -Destination $TempIcon


if ($ShortcutOnDesktop)
{
$Shortcut = $WScriptShell.CreateShortcut("$Desktop\$ShortcutName.lnk")
$Shortcut.TargetPath = $ShortcutUrl
$Shortcut.IconLocation = $TempIcon
$Shortcut.Save()
}

if ($ShortCutInStartMenu)
{
$Shortcut = $WScriptShell.CreateShortcut("$env:APPDATA\Microsoft\Windows\Start Menu\Programs\$ShortcutName.lnk")
$Shortcut.TargetPath = $ShortcutUrl
$Shortcut.IconLocation = $TempIcon
$Shortcut.Save()
}

But ideally id like this with

New-Item -Path "c:\" -Name "Gaomon" -ItemType "directory" -force
Copy-Item -Path "Gaomon\*" -Destination "C:\Gaomon" -Recurse -force
New-Item -Path "c:\" -Name "GaomonTablet" -ItemType "directory" -force
Copy-Item -Path "GaomonTablet\*" -Destination "C:\GaomonTablet" -Recurse -force

It errors out when I have them together. Any ideas on how I can combined these to scripts so it does everything together firstly create the folders then the shortcut
best response confirmed by AB21805 (Super Contributor)
Solution

Perhaps this you're overengineering ;) What you could do is create a folder on your hard-drive c:\install. Copy all the files and directories like in your screenshot in it (Gaomon, GaomonTablet and the install.ps1.) Create another directory in c:\install, Shortcut for example, and copy shortcuts for your application in it that do work (Just create them on a system on which the applications already are installed) Adjust your install.ps1 script like this

 

#Copy files
New-Item -Path "c:\" -Name "Gaomon" -ItemType "directory" -force
Copy-Item -Path "Gaomon\*" -Destination "C:\Gaomon" -Recurse -force
New-Item -Path "c:\" -Name "GaomonTablet" -ItemType "directory" -force
Copy-Item -Path "GaomonTablet\*" -Destination "C:\GaomonTablet" -Recurse -force

$Copy Shortcuts
[system.string]$Desktop = [Environment]::GetFolderPath("Desktop")
Copy-Item -path "Shortcut\Gaomon.lnk" -Destination "$($Desktop)\Gamon.lnk"
Copy-Item -path "Shortcut\Gaomon.lnk" -Destination $($env:APPDATA)\Microsoft\Windows\Start Menu\Programs"
Copy-Item -path "Shortcut\Gaomon Tablet.lnk" -Destination "$($Desktop)\Gamon.lnk"
Copy-Item -path "Shortcut\Gaomon Tablet.lnk" -Destination $($env:APPDATA)\Microsoft\Windows\Start Menu\Programs"

 

 

Uninstall.ps1 would be something like this perhaps:

 

#Remove files

remove-item c:\Gaomon -recurse -force
remove-item c:\GaomonTablet -recurse -force
[system.string]$Desktop = [Environment]::GetFolderPath("Desktop")
remove-item "$($desktop\gaomon.lnk" -force
remove-item "$($desktop\gaomon tablet. lnk" -force
remove-item "$($env:APPDATA)\Microsoft\Windows\Start Menu\Programs\gamon.lnk" -force
remove-item "$($env:APPDATA)\Microsoft\Windows\Start Menu\Programs\gamon tablet.lnk" -force

 

 

Not sure if you need shortcuts for Gaomon and Gaomon on all locations :) Create a .intunewin package from your c:\install location

 

Ha I think i am! But thank you I will try this later today and let you know thank you!
And? Did it work?
I have literally only just deployed jt, I will let you know! Fingers crossed aha