Jump to content
Ketarin forum

Etz

Members
  • Posts

    143
  • Joined

  • Last visited

Posts posted by Etz

  1. Nevermind, I`m an idiot... :D

    Get-Content (Join-Path $($GlobalVars.item('settings').cachedcontent)\"K-Lite Codec Pack"\klcp_standard_unattended.ini) 
    

    should be replaced with:

    (Get-Content (Join-Path $($GlobalVars.item('settings').cachedcontent)\"K-Lite Codec Pack"\klcp_standard_unattended.ini)) 
    

    So this was kind of expected behavior...unless Get-Content is enclosed into parenthesis it will leave file open.

  2. Wondering why this does not work in Ketarin, while similar operation works in everywhere else:

    if ((Get-WmiObject -Class CIM_VideoController).Caption -like "Intel*") {
        $hwa_lav_hwaccel = 2
    } else {
        $hwa_lav_hwaccel = 4
    }
    
    Get-Content (Join-Path $($GlobalVars.item('settings').cachedcontent)\"K-Lite Codec Pack"\klcp_standard_unattended.ini) | ForEach-Object {
        $_ -replace "^hwa_lav_hwaccel\s*=.*","hwa_lav_hwaccel=$hwa_lav_hwaccel"
    } | Set-Content (Join-Path $($GlobalVars.item('settings').cachedcontent)\"K-Lite Codec Pack"\klcp_standard_unattended.ini)
    

    Capture.png

     

    File itself is plain txt file and is not open in everywhere else.

    Reading it seems to work, but Set-Content aka saving part fails, unless I give different filename to it.

     

    Seems like Ketarin leaves file open after reading contents of it, so saving to it becomes impossible.

  3. Find a minor bug/feature, when you are saving powershell script as snippet and try to reuse that snippet it won`t work.
     

    As it keeps default "Write-Host $App.Name" statement in that window and appends it to last command of the the snippet, instead of just replacing it with snippet.

    So each time you use a snippet, you have to delete that manually...

     

    If intenion is to keep it (by design), it should be either first separate line, so snippet code would be appended afterwards beginning of the second line to it or it should be appended as separate line into end. Right now it appends it to the last command of snipped, which makes snippet code to fail unless you delete it before adding snippet or after adding snippet.

  4.  

    But I cannot get the value of a 'Content from URL (start/end)' variable. In this case '$app.Variables.{VariableName}.CachedContent' is empty.

    I think it is by design, as those results are not cached into Jobs.db as well, so it is actually empty as variable retrieves them from jobs.db AFAIK. 

  5. You can use the "Variables" collection for user defined variables. The global variables are not accessible yet, but I suppose I could make it happen.

     

    Actually it would be great, if you could implement global variables access too, like Batch scripts have them.

    As I have quite a few Install/destination paths defined as global variables.

     

    EDIT: OK, already Figured out how to get custom variable value:

    $app.variables.item("%VARIABLE_NAME%").cachedcontent
    
  6. Well, I can confirm that at least creating shortcuts works via powershell method...

    $WShell = New-Object -ComObject WScript.Shell
    $ShortCut = $WShell.CreateShortcut("$env:AppData\Microsoft\Internet Explorer\Quick Launch\$($App.Name).lnk")
    $Shortcut.TargetPath = "$env:SystemDrive\$($App.Name)\$($App.Name).exe"
    $Shortcut.WorkingDirectory = "$env:SystemDrive\$($App.Name)"
    $Shortcut.IconLocation = "imageres.dll,-65"
    $Shortcut.Save()
    

    So I could drop usage of nircmd.exe (actually that was the only reason to use it for me) for this...

    Copy-Item
    
    Remove-Item 

    Works too...

     

    Unfortunately I must say, I have had no time to test anything else, as my personal life kicked in a bit... :(

     

    EDIT: Forgot to add that:

    Expand-Archive -Path $App.CurrentLocation -Destination "C:\Temp"
    

    Works too (Extracts the Zip file, requires Powershell 5.x), and "Expand-Item" throws error messagebox (As it should), as I managed to enter incorrect cmdlet name... :P

     

    Also, who is interested variable $App psobjects, which you can use in scripts, I dumped them:

     

     

     

    $App | Get-Member
    
    13.02.2016 19:43.47: PowerShell: void Delete()
    13.02.2016 19:43.47: PowerShell: bool Equals(System.Object obj)
    13.02.2016 19:43.47: PowerShell: void ExecutePostUpdateCommands()
    13.02.2016 19:43.47: PowerShell: int GetHashCode()
    13.02.2016 19:43.47: PowerShell: string GetTargetFile(System.Net.WebResponse netResponse, string alternateFileName)
    13.02.2016 19:43.47: PowerShell: type GetType()
    13.02.2016 19:43.47: PowerShell: string GetXml()
    13.02.2016 19:43.47: PowerShell: string GetXmlWithoutGlobalVariables()
    13.02.2016 19:43.47: PowerShell: void Hydrate(System.Data.IDataReader reader)
    13.02.2016 19:43.47: PowerShell: void Install(System.ComponentModel.BackgroundWorker bgwSetup)
    13.02.2016 19:43.47: PowerShell: bool MatchesSearchCriteria(string[] subjects, System.Collections.Generic.Dictionary[string,string] customColumns)
    13.02.2016 19:43.47: PowerShell: bool RequiresDownload(System.Net.WebResponse netResponse, string targetFile)
    13.02.2016 19:43.47: PowerShell: void Save()
    13.02.2016 19:43.47: PowerShell: string ToString()
    13.02.2016 19:43.47: PowerShell: bool UpdateFromXml(string[] xmlValues)
    13.02.2016 19:43.47: PowerShell: bool AvoidDownloadBeta {get;}
    13.02.2016 19:43.47: PowerShell: bool CanBeShared {get;set;}
    13.02.2016 19:43.47: PowerShell: string Category {get;set;}
    13.02.2016 19:43.47: PowerShell: bool CheckForUpdatesOnly {get;set;}
    13.02.2016 19:43.47: PowerShell: string CurrentLocation {get;}
    13.02.2016 19:43.47: PowerShell: bool DeletePreviousFile {get;set;}
    13.02.2016 19:43.47: PowerShell: Ketarin.ApplicationJob+DownloadBetaType DownloadBeta {get;set;}
    13.02.2016 19:43.47: PowerShell: System.Nullable[datetime] DownloadDate {get;set;}
    13.02.2016 19:43.47: PowerShell: Ketarin.ApplicationJob+SourceType DownloadSourceType {get;set;}
    13.02.2016 19:43.47: PowerShell: bool Enabled {get;set;}
    13.02.2016 19:43.47: PowerShell: bool ExclusiveDownload {get;set;}
    13.02.2016 19:43.47: PowerShell: string ExecuteCommand {get;set;}
    13.02.2016 19:43.47: PowerShell: Ketarin.ScriptType ExecuteCommandType {get;set;}
    13.02.2016 19:43.47: PowerShell: string ExecutePreCommand {get;set;}
    13.02.2016 19:43.47: PowerShell: Ketarin.ScriptType ExecutePreCommandType {get;set;}
    13.02.2016 19:43.47: PowerShell: string ExpandedWebsiteUrl {get;}
    13.02.2016 19:43.47: PowerShell: bool FileExists {get;}
    13.02.2016 19:43.47: PowerShell: string FileHippoId {get;set;}
    13.02.2016 19:43.47: PowerShell: string FileHippoVersion {get;set;}
    13.02.2016 19:43.47: PowerShell: string FixedDownloadUrl {get;set;}
    13.02.2016 19:43.47: PowerShell: guid Guid {get;set;}
    13.02.2016 19:43.47: PowerShell: Ketarin.HashType HashType {get;set;}
    13.02.2016 19:43.47: PowerShell: string HashVariable {get;set;}
    13.02.2016 19:43.47: PowerShell: string HttpReferer {get;set;}
    13.02.2016 19:43.47: PowerShell: bool IgnoreFileInformation {get;set;}
    13.02.2016 19:43.47: PowerShell: System.Nullable[datetime] LastFileDate {get;set;}
    13.02.2016 19:43.47: PowerShell: long LastFileSize {get;set;}
    13.02.2016 19:43.47: PowerShell: System.Nullable[datetime] LastUpdated {get;set;}
    13.02.2016 19:43.47: PowerShell: string Name {get;set;}
    13.02.2016 19:43.47: PowerShell: string PreviousLocation {get;set;}
    13.02.2016 19:43.47: PowerShell: System.Collections.Generic.List[Ketarin.SetupInstruction] SetupInstructions {get;set;}
    13.02.2016 19:43.47: PowerShell: bool ShareApplication {get;set;}
    13.02.2016 19:43.47: PowerShell: string SourceTemplate {get;set;}
    13.02.2016 19:43.47: PowerShell: System.Xml.XmlCDataSection SourceTemplateCdata {get;set;}
    13.02.2016 19:43.48: PowerShell: bool TargetIsFolder {get;}
    13.02.2016 19:43.48: PowerShell: string TargetPath {get;set;}
    13.02.2016 19:43.48: PowerShell: string UserAgent {get;set;}
    13.02.2016 19:43.48: PowerShell: string UserNotes {get;set;}
    13.02.2016 19:43.48: PowerShell: string VariableChangeIndicator {get;set;}
    13.02.2016 19:43.48: PowerShell: Ketarin.ApplicationJob+UrlVariableCollection Variables {get;set;}
    13.02.2016 19:43.48: PowerShell: string WebsiteUrl {get;set;}

     

     

     

    Only thing I`m missing, is tab completion in script window, but that is something which I`m just used to so it is not an actual problem...

    Script window is not an console, so it behaves like it is designed to behave. :)

  7. In Internet Explorer on both machines (NOT Edge), go to Menu, Tools, Internet Options, Security, Trusted Sites, Sites. This list probably includes the \\syno device on one of your devices but not the other.

     

    On this list REMOVE the "require server verification" checkbox, then add \\syno\ to your list. Close, OK, reboot.

     

    Try the registry import via Ketarin again.

     

    Nope, both have NAS and LAN domain listed and Server Verification is not checked.

    As Installs are scripted both have pretty much same settings applied, post install.

     

    What I have discovered, it works when I switch to SMB1 on affected machine, but does not if it uses SMB3.

    Working one, does not seem to care, works on both occasions.  :rolleyes:

     

    It is definately something screwed up on Windows side, not sure what yet...

  8. Shawn, both machines run Windows 10, they are identical, one exhibits the problem another is not, and they both were installed approx 6 months ago.

     

    Shares aren`t mapped, they are pure UNC paths.

     

    Anyway, adding registry entries via command line would be probably the way to go on longer term indeed.

    Tried with Reg.exe as well, behavior was exactly the same, no import happening.

     

    Using Regedit instead of Reg.exe allows a bit more flexibility, for example if I would like to import something to HKCU hive while running Ketarin elevated.

    Reg.exe will add it to Administrator account, while Regedit.exe will still add it to Current User.

     

    Unfortunately I cannot get rid of external file dependencies completely, as some programs store their settings into config files which need to be copied during install.

  9. Maybe a path problem?

     

    Interesting indeed, maybe I should try from local drive instead of Network share?

    Still it has worked before...no idea, why it does not work now.

     

    EDIT: Guess what, it works fine on another computer (Identical OS and Hardware), without any changes...  :blink:

    Obviously this problem seems to be isolated to that specific Laptop...thx for checking out though... 

  10.  

    Are there blank lines or blank spaces in the command field below your commands? I had this a few month ago because of some copied/pasted blank lines (maybe hidden characters).

    Would you mind to share your app (without Manifest.reg).

     

    Should not be any, I have already triplechecked it...

     

    Be my guest: http://etz.planet.ee/Serato.xml

    I can upload Manifest.reg as well, if needed, it does not contain any secret data anyway.

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.